[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH net] Xen-netback: Fix issue caused by using gso_type wrongly
On 10/03/14 13:23, annie li wrote: On 2014/3/10 17:51, Paul Durrant wrote:@@ -299,12 +299,12 @@ static void xenvif_gop_frag_copy(struct xenvif *vif, struct sk_buff *skb, } /* Leave a gap for the GSO descriptor. */ - if (skb_shinfo(skb)->gso_type & SKB_GSO_TCPV4) - gso_type = XEN_NETIF_GSO_TYPE_TCPV4; - else if (skb_shinfo(skb)->gso_type & SKB_GSO_TCPV6) - gso_type = XEN_NETIF_GSO_TYPE_TCPV6; - else - gso_type = XEN_NETIF_GSO_TYPE_NONE; + if (skb_shinfo(skb)->gso_size) {You should probably use skb_is_gso(skb) for your test.skb_is_gso does the same thing, skb_iso_gso and skb_shinfo(skb)->gso_size coexist. But I can change the code as you suggested if you like, will post a v2 patch for this. It's always better to use core functions which codify these rules. Also, from the reader's point of view, it's more obvious to see skb_is_gso, than checking gso_size. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |