All of lore.kernel.org
 help / color / mirror / Atom feed
From: Milan Dadok <milan@dadok.name>
To: "'Patrick McHardy'" <kaber@trash.net>
Cc: <uaca@alumni.uv.es>, <johann.baudy@gnu-log.net>,
	<linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>
Subject: RE: [PATCH] 1/1 net: packet: Keep 802.1Q VLAN tag in packet on SOCK_DGRAM socket - resend
Date: Mon, 4 Jan 2010 16:28:03 +0100	[thread overview]
Message-ID: <001b01ca8d52$817d07d0$84771770$@name> (raw)
In-Reply-To: <4B41F292.8080908@trash.net>

Patrick McHardy wrote:

>Milan Dadok wrote:
>> Keep 802.1Q VLAN tag on non HW vlan accelerated network card received to SOCK_DGRAM socket.

>So not including the link layer header for SOCK_DGRAM sockets
>seems to be the intended behaviour.

>From my point of view i have question
Is 802.1Q encapsulation (or another type of encapsulation (IPSec?)) part of link level header or part of data packet?

Currently pseudo-header contains for OUTGOING packet on physical card (vlan10@eth1)
a) HW accelarated network card  
protocol = ethertype IPv4 (0x0800)
tci = vlan number = 10
and data starts with 4500 0028

b) non HW accelerated network card 
protocol = ethertype 802.1Q (0x8100)
tci = 0
and data starts with 4500 0028
vlan tci and real protocol number (ARP,IPV4,IPV6) of data is lost 

And with more nested vlans it is getting worse
for example

vlan1010@vlan10@eth1

a) HW accelarated network card  
protocol = ethertype IPv4 (0x8100)
tci = 10
and data starts with 4500 0028

the 4 bytes of real packet 03f2 0800 is lost too

b) non HW accelarated network card  
4 words of data packet are lost ...

I have no problems with received packets, only outgoing packet have problem.
I think that out packet on SOCK_DGRAM sockets MUST BE in same format as in (received) packet on same interface.
Can we agree on this?

Milan




  reply	other threads:[~2010-01-04 15:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-04  9:09 [PATCH] 1/1 net: packet: Keep 802.1Q VLAN tag in packet on SOCK_DGRAM socket - resend Milan Dadok
2010-01-04 10:36 ` Eric Dumazet
2010-01-04 13:52 ` Patrick McHardy
2010-01-04 15:28   ` Milan Dadok [this message]
2010-01-04 16:29     ` Patrick McHardy
2010-01-04 17:11       ` Milan Dadok
2010-01-05  5:17         ` Patrick McHardy

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='001b01ca8d52$817d07d0$84771770$@name' \
    --to=milan@dadok.name \
    --cc=johann.baudy@gnu-log.net \
    --cc=kaber@trash.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=uaca@alumni.uv.es \
    /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.