Skip to content

Commit c21ab2a

Browse files
mkp-rhdavem330
authored andcommitted
openvswitch: Fix overreporting of drops in dropwatch
Currently queue_userspace_packet will call kfree_skb for all frames, whether or not an error occurred. This can result in a single dropped frame being reported as multiple drops in dropwatch. This functions caller may also call kfree_skb in case of an error. This patch will consume the skbs instead and allow caller's to use kfree_skb. Signed-off-by: Mike Pattrick <[email protected]> Link: https://bugzilla.redhat.com/show_bug.cgi?id=2109957 Signed-off-by: David S. Miller <[email protected]>
1 parent 1100248 commit c21ab2a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

net/openvswitch/datapath.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -558,8 +558,9 @@ static int queue_userspace_packet(struct datapath *dp, struct sk_buff *skb,
558558
out:
559559
if (err)
560560
skb_tx_error(skb);
561-
kfree_skb(user_skb);
562-
kfree_skb(nskb);
561+
consume_skb(user_skb);
562+
consume_skb(nskb);
563+
563564
return err;
564565
}
565566

0 commit comments

Comments
 (0)