From: Jesse Gross Date: Thu, 9 Dec 2010 07:55:20 +0000 (-0800) Subject: datapth: Drop check for impossible condition after skb_gso_segment(). X-Git-Tag: v1.1.0~654 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=2d7ce2ee1af5c4925ebbc681bb72e660d87faa71;p=sliver-openvswitch.git datapth: Drop check for impossible condition after skb_gso_segment(). It's possible for skb_gso_segment to return NULL but only if the hardware supports the correct form of segmentation offload but just wants software to verify the offload parameters. However, since we're not hardware and don't support any kind of segmentation offload natively, we can never get in this situation. Therefore drop the check and comment. Signed-off-by: Jesse Gross Acked-by: Ben Pfaff --- diff --git a/datapath/datapath.c b/datapath/datapath.c index ffe3bd869..cc7672058 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -609,16 +609,12 @@ int dp_output_control(struct datapath *dp, struct sk_buff *skb, int queue_no, * userspace may try to stuff a 64kB packet into a 1500-byte MTU. */ if (skb_is_gso(skb)) { struct sk_buff *nskb = skb_gso_segment(skb, NETIF_F_SG | NETIF_F_HW_CSUM); - if (nskb) { - kfree_skb(skb); - skb = nskb; - if (unlikely(IS_ERR(skb))) { - err = PTR_ERR(skb); - goto err; - } - } else { - /* XXX This case might not be possible. It's hard to - * tell from the skb_gso_segment() code and comment. */ + + kfree_skb(skb); + skb = nskb; + if (unlikely(IS_ERR(skb))) { + err = PTR_ERR(skb); + goto err; } }