datapath: Record upcall errors as lost packets.
authorJesse Gross <jesse@nicira.com>
Mon, 28 Feb 2011 22:26:39 +0000 (14:26 -0800)
committerJesse Gross <jesse@nicira.com>
Thu, 3 Mar 2011 20:12:53 +0000 (12:12 -0800)
It's possible to encounter a few different errors when preparing
to send a packet to userspace in queue_control_packet().  This
ensures that if we encounter one of these problems, the issue is
properly recorded as a lost packet.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
datapath/datapath.c

index 733acad720c05fcefc726dc7ad662076b6bee013..69b524c548f8612717b7e0b83b185a1e3bfb242b 100644 (file)
@@ -441,7 +441,11 @@ int dp_upcall(struct datapath *dp, struct sk_buff *skb, const struct dp_upcall_i
                }
        }
 
-       return queue_control_packets(dp, skb, upcall_info);
+       err = queue_control_packets(dp, skb, upcall_info);
+       if (err)
+               goto err;
+
+       return 0;
 
 err_kfree_skb:
        kfree_skb(skb);