From: Vlad Yasevich <vyasevic@redhat.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH v2 net] net: Account for all vlan headers in skb_mac_gso_segment
Date: Thu, 27 Mar 2014 21:05:41 -0400 [thread overview]
Message-ID: <5334CAE5.6020806@redhat.com> (raw)
In-Reply-To: <1395958890.12610.324.camel@edumazet-glaptop2.roam.corp.google.com>
On 03/27/2014 06:21 PM, Eric Dumazet wrote:
> On Thu, 2014-03-27 at 17:26 -0400, Vlad Yasevich wrote:
>
>> diff --git a/net/core/skbuff.c b/net/core/skbuff.c
>> index 869c7af..cac38ba 100644
>> --- a/net/core/skbuff.c
>> +++ b/net/core/skbuff.c
>> @@ -2866,8 +2866,9 @@ struct sk_buff *skb_segment(struct sk_buff *head_skb,
>> int err = -ENOMEM;
>> int i = 0;
>> int pos;
>> + int dummy;
>>
>> - proto = skb_network_protocol(head_skb);
>> + proto = skb_network_protocol(head_skb, &dummy);
>> if (unlikely(!proto))
>> return ERR_PTR(-EINVAL);
>>
>
> I am wondering if '&dummy' could be replaced by &doffset.
>
> We have :
>
> unsigned int doffset = head_skb->data - skb_mac_header(head_skb);
>
> It looks like this is the same content than 'dummy', right ?
>
No, that shouldn't be. doffset is the offset of data past the
ip and tcp headers. Dummy above will usually be the size of mac header
which at this point is useless to us. The only time it might
be useful is if we have more encapsulations inside the tcp/udp
headers that skb_network_protocol would actually parse
(may be vlan on top of vxlan, so that vlan tagged frame is put
inside the UDP payload. not sure if its possible). But I think
this is already handled.
-vlad
next prev parent reply other threads:[~2014-03-28 1:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-27 21:26 [PATCH v2 net] net: Account for all vlan headers in skb_mac_gso_segment Vlad Yasevich
2014-03-27 22:21 ` Eric Dumazet
2014-03-28 1:05 ` Vlad Yasevich [this message]
2014-03-28 21:10 ` David Miller
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=5334CAE5.6020806@redhat.com \
--to=vyasevic@redhat.com \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.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).