From: David Miller <davem@davemloft.net>
To: Ian.Campbell@citrix.com
Cc: paul.durrant@citrix.com, xen-devel@lists.xen.org,
netdev@vger.kernel.org, wei.liu2@citrix.com,
david.vrabel@citrix.com
Subject: Re: [PATCH net] xen-netback: fix gso_prefix check
Date: Thu, 12 Dec 2013 15:48:15 -0500 (EST) [thread overview]
Message-ID: <20131212.154815.2086817276719433173.davem@davemloft.net> (raw)
In-Reply-To: <1386859342.18946.18.camel@kazak.uk.xensource.com>
From: Ian Campbell <Ian.Campbell@citrix.com>
Date: Thu, 12 Dec 2013 14:42:22 +0000
> On Thu, 2013-12-12 at 14:20 +0000, Paul Durrant wrote:
>> There is a mistake in checking the gso_prefix mask when passing large
>> packets to a guest. The wrong shift is applied to the bit - the raw skb
>> gso type is used rather then the translated one. This leads to large packets
>> being handed to the guest without the GSO metadata. This patch fixes the
>> check.
>>
>> The mistake manifested as errors whilst running Microsoft HCK large packet
>> offload tests between a pair of Windows 8 VMs. I have verified this patch
>> fixes those errors.
>>
>> Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
>> Cc: Wei Liu <wei.liu2@citrix.com>
>> Cc: Ian Campbell <ian.campbell@citrix.com>
>> Cc: David Vrabel <david.vrabel@citrix.com>
>> ---
>> drivers/net/xen-netback/netback.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c
>> index 56c3e5a..999e290 100644
>> --- a/drivers/net/xen-netback/netback.c
>> +++ b/drivers/net/xen-netback/netback.c
>> @@ -452,7 +452,7 @@ static int xenvif_gop_skb(struct sk_buff *skb,
>> }
>>
>> /* Set up a GSO prefix descriptor, if necessary */
>> - if ((1 << skb_shinfo(skb)->gso_type) & vif->gso_prefix_mask) {
>> + if ((1 << gso_type) & vif->gso_prefix_mask) {
>
> gso_type here is XEN_NETIF_GSO_TYPE_TCPV4, vif->gso_prefix_mask is
> initialised with GSO_BIT(TCPV4) et al. Where
> #define GSO_BIT(type) \
> (1 << XEN_NETIF_GSO_TYPE_ ## type)
>
> So,
> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Applied and queued up for -stable, thanks.
prev parent reply other threads:[~2013-12-12 20:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-12 14:20 [PATCH net] xen-netback: fix gso_prefix check Paul Durrant
2013-12-12 14:42 ` Ian Campbell
2013-12-12 14:44 ` Paul Durrant
2013-12-12 20:48 ` David Miller [this message]
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=20131212.154815.2086817276719433173.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=Ian.Campbell@citrix.com \
--cc=david.vrabel@citrix.com \
--cc=netdev@vger.kernel.org \
--cc=paul.durrant@citrix.com \
--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).