All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jim Baxter <jim_baxter@mentor.com>
To: Ben Hutchings <bhutchings@solarflare.com>
Cc: <netdev@vger.kernel.org>
Subject: Re: VLAN driver question
Date: Fri, 21 Jun 2013 18:02:42 +0100	[thread overview]
Message-ID: <51C48732.7040601@mentor.com> (raw)
In-Reply-To: <1371829351.3570.48.camel@bwh-desktop.uk.level5networks.com>

On 21/06/13 16:42, Ben Hutchings wrote:
> On Thu, 2013-06-20 at 20:05 +0100, Jim Baxter wrote:
> [...]
>> Thank you for that information, I have decided to extract the data
>> before copying the data into the skb->data structure.
>>
>> This is the put of the packet showing my removal of the data correctly,
>> however the network is not receiving any data on the VLAN.
>>
>> - data buffer from the Network card
>> ff ff ff ff ff ff 00 26 b9 d4 19 01 81 00 00 0a 08 06 00 01 08 00 06 04
>> 00 01 00 26 b9 d4
>>
>> - skb->data after I have only copied data to it and removed the vlan 4
>> octet header using skb_copy_to_linear_data and
>> skb_copy_to_linear_data_offset.
>> ff ff ff ff ff ff 00 26 b9 d4 19 01 08 06 00 01 08 00 06 04 00 01 00 26
>> b9 d4 19 01 c0 a8
>>
>> - skb-data after eth_type_trans()
>> 00 01 08 00 06 04 00 01 00 26 b9 d4 19 01 c0 a8 01 67 00 00 00 00 00 00
>> c0 a8 01 64 00 00
>>
>> After this point I send the packet into the network stack with:
>> 	__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vlan_tag);
>>
>> 	napi_gro_receive(&fep->napi, skb);
>>
>> Am I missing a kernel call or doing something wrong to cause the packet
>> to be rejected in the kernel?
> 
> That looks about right to me, but perhaps vlan_tag has the wrong byte
> order?  __vlan_hwaccel_put_tag() expects it in host byte order.
> 
> Ben.
> 

Hi, Thank you, I have got it working. The problem was that when I had
changed the code to remove the VLAN before putting the data into the
skb, I was not moving the pointer past the TPID.

It now all works with ping, ssh and scp'ing small files but when I scp a
large file it stalls. I suspect it is because it is not processing
packets that are at the MTU of 1518 bytes (1522 bytes with the VLAN
header) in size.

Jim

      reply	other threads:[~2013-06-21 17:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-17 19:12 VLAN driver question Jim Baxter
2013-06-18 14:41 ` Ben Hutchings
2013-06-19 15:57   ` Jim Baxter
2013-06-19 16:33     ` Ben Hutchings
2013-06-20 19:05       ` Jim Baxter
2013-06-21 15:42         ` Ben Hutchings
2013-06-21 17:02           ` Jim Baxter [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=51C48732.7040601@mentor.com \
    --to=jim_baxter@mentor.com \
    --cc=bhutchings@solarflare.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 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.