From: Zoltan Kiss <zoltan.kiss@citrix.com>
To: annie li <annie.li@oracle.com>, Paul Durrant <Paul.Durrant@citrix.com>
Cc: "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Wei Liu <wei.liu2@citrix.com>,
Ian Campbell <Ian.Campbell@citrix.com>
Subject: Re: [Xen-devel] [PATCH net] Xen-netback: Fix issue caused by using gso_type wrongly
Date: Mon, 10 Mar 2014 13:29:08 +0000 [thread overview]
Message-ID: <531DBE24.8020403@citrix.com> (raw)
In-Reply-To: <531DBCEC.4070201@oracle.com>
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.
next prev parent reply other threads:[~2014-03-10 13:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-10 7:44 [PATCH net] Xen-netback: Fix issue caused by using gso_type wrongly Annie Li
2014-03-10 9:51 ` Paul Durrant
2014-03-10 13:23 ` [Xen-devel] " annie li
2014-03-10 13:29 ` Zoltan Kiss [this message]
2014-03-11 12:48 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=531DBE24.8020403@citrix.com \
--to=zoltan.kiss@citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=Paul.Durrant@citrix.com \
--cc=annie.li@oracle.com \
--cc=netdev@vger.kernel.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).