From: Haiyang Zhang <haiyangz@microsoft.com>
To: Olaf Hering <olaf@aepfle.de>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
KY Srinivasan <kys@microsoft.com>,
"jasowang@redhat.com" <jasowang@redhat.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"devel@linuxdriverproject.org" <devel@linuxdriverproject.org>
Subject: RE: [PATCH net] hyperv: Fix vlan_proto setting in netvsc_recv_callback()
Date: Fri, 14 Jun 2013 16:24:16 +0000 [thread overview]
Message-ID: <807a9b192c2d4ce1b0c6d037968ddf4c@DFM-DB3MBX15-06.exchange.corp.microsoft.com> (raw)
In-Reply-To: <20130614152843.GA11368@aepfle.de>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 2042 bytes --]
> -----Original Message-----
> From: Olaf Hering [mailto:olaf@aepfle.de]
> Sent: Friday, June 14, 2013 11:29 AM
> To: Haiyang Zhang
> Cc: davem@davemloft.net; netdev@vger.kernel.org; KY Srinivasan;
> jasowang@redhat.com; linux-kernel@vger.kernel.org;
> devel@linuxdriverproject.org
> Subject: Re: [PATCH net] hyperv: Fix vlan_proto setting in
> netvsc_recv_callback()
>
> On Tue, May 28, Haiyang Zhang wrote:
>
> > Since the recent addition of 8021AD, we need to set the new field
> > vlan_proto in sk_buff. Otherwise, it will trigger BUG() call in
> vlan_proto_idx().
>
> > @@ -284,7 +285,7 @@ int netvsc_recv_callback(struct hv_device
> > *device_obj,
> >
> > skb->protocol = eth_type_trans(skb, net);
> > skb->ip_summed = CHECKSUM_NONE;
> > - skb->vlan_tci = packet->vlan_tci;
> > + __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), packet-
> >vlan_tci);
>
>
> Just curious:
>
> Doesnt that change behaviour in the sense that __vlan_hwaccel_put_tag()
> now always adds VLAN_TAG_PRESENT to skb->vlan_tci, while before that
> change packet->vlan_tci may or may not had this flag?
>
> In other words, should a variant of this patch be backported if it was a bug
> not not use __vlan_hwaccel_put_tag right from the start?
>
Thanks for looking at this. Actually, the previous code was correct, because I
add the VLAN_TAG_PRESENT if the packet comes from vlan in function
rndis_filter_receive_data():
if (vlan) {
pkt->vlan_tci = VLAN_TAG_PRESENT | vlan->vlanid |
(vlan->pri << VLAN_PRIO_SHIFT);
} else {
pkt->vlan_tci = 0;
}
But, the new code should be updated below, so the VLAN_TAG_PRESENT won't be set
when it's not from a vlan:
If (VLAN_TAG_PRESENT & packet->vlan_tci)
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), packet- vlan_tci);
I will submit a patch soon.
Thanks,
- Haiyang
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
prev parent reply other threads:[~2013-06-14 16:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-28 16:15 Haiyang Zhang
2013-06-01 0:34 ` David Miller
2013-06-14 15:28 ` Olaf Hering
2013-06-14 16:24 ` Haiyang Zhang [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=807a9b192c2d4ce1b0c6d037968ddf4c@DFM-DB3MBX15-06.exchange.corp.microsoft.com \
--to=haiyangz@microsoft.com \
--cc=davem@davemloft.net \
--cc=devel@linuxdriverproject.org \
--cc=jasowang@redhat.com \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olaf@aepfle.de \
/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
all inboxes | Powered by JetHome®