From: Ivan Vecera <ivecera@redhat.com>
To: Vlad Yasevich <vyasevich@gmail.com>, netdev@vger.kernel.org
Subject: Re: [PATCH net] macvtap: fix network header pointer for VLAN tagged pkts
Date: Tue, 21 Jul 2015 09:11:38 +0200 [thread overview]
Message-ID: <55ADF0AA.1020209@redhat.com> (raw)
In-Reply-To: <55AD2502.5060203@gmail.com>
On 07/20/2015 06:42 PM, Vlad Yasevich wrote:
> On 07/20/2015 11:44 AM, Ivan Vecera wrote:
>> Network header is set with offset ETH_HLEN but it is not true for VLAN
>> (multiple-)tagged and results in checksum issues in lower devices.
>>
>> Signed-off-by: Ivan Vecera <ivecera@redhat.com>
>> ---
>> drivers/net/macvtap.c | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
>> diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
>> index 3b933bb..cdcbab4 100644
>> --- a/drivers/net/macvtap.c
>> +++ b/drivers/net/macvtap.c
>> @@ -796,6 +796,12 @@ static ssize_t macvtap_get_user(struct macvtap_queue *q, struct msghdr *m,
>> skb_reset_mac_header(skb);
>> skb->protocol = eth_hdr(skb)->h_proto;
>>
>> + if (skb_vlan_tagged(skb)) {
>> + int depth;
>> + skb->protocol = __vlan_get_protocol(skb, skb->protocol, &depth);
>
> I don't think this is right. This would reset the protocol to the encapsulated
> protocol which isn't really the case since you are not really stripping vlan
> encapsulations.
>
> -vlad
Yup, you are right, skb->protocol should be untouched. Will post v2.
Ivan
prev parent reply other threads:[~2015-07-21 7:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-20 15:44 [PATCH net] macvtap: fix network header pointer for VLAN tagged pkts Ivan Vecera
2015-07-20 16:42 ` Vlad Yasevich
2015-07-21 7:11 ` Ivan Vecera [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=55ADF0AA.1020209@redhat.com \
--to=ivecera@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=vyasevich@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.