From: Ben Pfaff Date: Thu, 28 Apr 2011 23:13:39 +0000 (-0700) Subject: datapath: No need to zero cb anymore in odp_packet_cmd_execute(). X-Git-Tag: v1.2.0~398 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=ebca7787e50327716e2c2ea4a7cc2656fd4e9fd5;p=sliver-openvswitch.git datapath: No need to zero cb anymore in odp_packet_cmd_execute(). Before commit 3f19d399f "datapath: Fix mysterious GRE-over-IPSEC problems," 'packet' in opd_packet_cmd_execute() was an skb cloned from one created by Netlink, so its cb member wasn't necessarily zeroed. But that commit changed 'packet' to be freshly allocated with __dev_alloc_skb(), which means that cb is zeroed, so we don't have to do it again. Signed-off-by: Ben Pfaff Acked-by: Jesse Gross --- diff --git a/datapath/datapath.c b/datapath/datapath.c index 5ce77cd34..20ae4d82e 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -714,9 +714,6 @@ static int odp_packet_cmd_execute(struct sk_buff *skb, struct genl_info *info) else packet->protocol = htons(ETH_P_802_2); - /* Initialize OVS_CB (it came from Netlink so might not be zeroed). */ - memset(OVS_CB(packet), 0, sizeof(struct ovs_skb_cb)); - err = flow_extract(packet, -1, &key, &is_frag); if (err) goto err_kfree_skb;