On Mon, Sep 19, 2011 at 4:28 PM, Ben Pfaff <[email protected]> wrote: > On Mon, Sep 19, 2011 at 04:27:11PM -0700, Jesse Gross wrote: >> @@ -465,6 +467,7 @@ static int queue_userspace_packets(struct datapath *dp, >> struct sk_buff *skb, >> user_skb = genlmsg_new(len, GFP_ATOMIC); >> if (!user_skb) { >> netlink_set_err(INIT_NET_GENL_SOCK, 0, group, >> -ENOBUFS); >> + err = -ENOMEM; >> goto err_kfree_skbs; >> } > > Why do we use two different error codes here?
-ENOBUFS is special for Netlink as there is a flag that userspace can set to indicate whether it wants to receive messages about lost datagrams. -ENOMEM is the more traditional value in this situation. I actually don't think that we should be calling netlink_set_err() at all here because there is nothing that userspace can do about it. My unicast Netlink series drops it, so I didn't do it again here. > Otherwise: > Acked-by: Ben Pfaff <[email protected]> Thanks, pushed. _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
