Discussion:
[E1000-devel] ixgbe-3.17.3 :VLAN tagged packets does not work when using PF-PACKET socket
Vijay Agrawal
2014-01-28 06:02:28 UTC
Permalink
Hi ,

We are observing a issue with this driver , we are using PF-Packet sockets for sending receiving Ethernet packets, but if the packet is Vlan tagged it is not sent/received on the interface. Neither the packet is seen on the ethereal capture. Here we are just using PF-PACKET socket and no IP and Vlan is configured on the physical interface.
The same test if we run on 1 G node it works , so as it seems there is some limitations with this 10G driver.
Can you please help.

Thanks & Regards
Vijay Agrawal
Fujinaka, Todd
2014-01-28 20:33:39 UTC
Permalink
Our hardware strips VLAN tags in order to support Data Center Bridging (I think the details are in 802.1Q for DCB). DCB uses the same offset as VLAN tags and if we didn't strip the tags we couldn't have interoperability between endpoints that had DCB enabled and not enabled.

Todd Fujinaka
Software Application Engineer
Networking Division (ND)
Intel Corporation
***@intel.com
(503) 712-4565


-----Original Message-----
From: Vijay Agrawal [mailto:***@ixiacom.com]
Sent: Monday, January 27, 2014 10:02 PM
To: e1000-***@lists.sf.net
Subject: [E1000-devel] ixgbe-3.17.3 :VLAN tagged packets does not work when using PF-PACKET socket

Hi ,

We are observing a issue with this driver , we are using PF-Packet sockets for sending receiving Ethernet packets, but if the packet is Vlan tagged it is not sent/received on the interface. Neither the packet is seen on the ethereal capture. Here we are just using PF-PACKET socket and no IP and Vlan is configured on the physical interface.
The same test if we run on 1 G node it works , so as it seems there is some limitations with this 10G driver.
Can you please help.

Thanks & Regards
Vijay Agrawal
Vijay Agrawal
2014-01-29 04:59:49 UTC
Permalink
Hi Todd,

Thanks a lot for the response.
Can you please explain this a bit more.
When you say you are stripping the VLAN tags , so the packet with VLAN tag should go out without VLAN tag , but here we observe that no packet is going out , so it look like the hardware drops the VLAN tag packet, we see no packet on the ethereal. Can you please explain this ?
Is there any work around solution to work with VLAN? Or with this driver it's just not possible.

Thanks again for your quick response .

Thanks & Regards
Vijay Agrawal

-----Original Message-----
From: Fujinaka, Todd [mailto:***@intel.com]
Sent: 29 January 2014 02:04
To: Vijay Agrawal; e1000-***@lists.sf.net
Subject: RE: [E1000-devel] ixgbe-3.17.3 :VLAN tagged packets does not work when using PF-PACKET socket

Our hardware strips VLAN tags in order to support Data Center Bridging (I think the details are in 802.1Q for DCB). DCB uses the same offset as VLAN tags and if we didn't strip the tags we couldn't have interoperability between endpoints that had DCB enabled and not enabled.

Todd Fujinaka
Software Application Engineer
Networking Division (ND)
Intel Corporation
***@intel.com
(503) 712-4565


-----Original Message-----
From: Vijay Agrawal [mailto:***@ixiacom.com]
Sent: Monday, January 27, 2014 10:02 PM
To: e1000-***@lists.sf.net
Subject: [E1000-devel] ixgbe-3.17.3 :VLAN tagged packets does not work when using PF-PACKET socket

Hi ,

We are observing a issue with this driver , we are using PF-Packet sockets for sending receiving Ethernet packets, but if the packet is Vlan tagged it is not sent/received on the interface. Neither the packet is seen on the ethereal capture. Here we are just using PF-PACKET socket and no IP and Vlan is configured on the physical interface.
The same test if we run on 1 G node it works , so as it seems there is some limitations with this 10G driver.
Can you please help.

Thanks & Regards
Vijay Agrawal
Vijay Agrawal
2014-01-29 06:07:14 UTC
Permalink
Hi Todd,

Just wanted to help you to understand the issue we are facing .
With static VLAN configured on the interface , hardware sends the packet but vlan is stripped.
With PF_PACKET socket where we are constructing entire Ethernet packet our self , the packet is dropped by the hardware.

I have attached a simple C program which uses PF_PACKET SOCKET to send one test ARP packet with VLAN, and you can clearly observe that packet is dropped.

You can compile it with
Sudo make compile
Run it with

./test "interface name (example eth0)"

I hope it will help you to quickly identify the issue , and may be you can suggest something to fix it or if you can confirm if this is as expected as per design.

Thanks & Regards
Vijay Agrawal

-----Original Message-----
From: Vijay Agrawal
Sent: 29 January 2014 10:30
To: 'Fujinaka, Todd'; e1000-***@lists.sf.net
Subject: RE: [E1000-devel] ixgbe-3.17.3 :VLAN tagged packets does not work when using PF-PACKET socket

Hi Todd,

Thanks a lot for the response.
Can you please explain this a bit more.
When you say you are stripping the VLAN tags , so the packet with VLAN tag should go out without VLAN tag , but here we observe that no packet is going out , so it look like the hardware drops the VLAN tag packet, we see no packet on the ethereal. Can you please explain this ?
Is there any work around solution to work with VLAN? Or with this driver it's just not possible.

Thanks again for your quick response .

Thanks & Regards
Vijay Agrawal

-----Original Message-----
From: Fujinaka, Todd [mailto:***@intel.com]
Sent: 29 January 2014 02:04
To: Vijay Agrawal; e1000-***@lists.sf.net
Subject: RE: [E1000-devel] ixgbe-3.17.3 :VLAN tagged packets does not work when using PF-PACKET socket

Our hardware strips VLAN tags in order to support Data Center Bridging (I think the details are in 802.1Q for DCB). DCB uses the same offset as VLAN tags and if we didn't strip the tags we couldn't have interoperability between endpoints that had DCB enabled and not enabled.

Todd Fujinaka
Software Application Engineer
Networking Division (ND)
Intel Corporation
***@intel.com
(503) 712-4565


-----Original Message-----
From: Vijay Agrawal [mailto:***@ixiacom.com]
Sent: Monday, January 27, 2014 10:02 PM
To: e1000-***@lists.sf.net
Subject: [E1000-devel] ixgbe-3.17.3 :VLAN tagged packets does not work when using PF-PACKET socket

Hi ,

We are observing a issue with this driver , we are using PF-Packet sockets for sending receiving Ethernet packets, but if the packet is Vlan tagged it is not sent/received on the interface. Neither the packet is seen on the ethereal capture. Here we are just using PF-PACKET socket and no IP and Vlan is configured on the physical interface.
The same test if we run on 1 G node it works , so as it seems there is some limitations with this 10G driver.
Can you please help.

Thanks & Regards
Vijay Agrawal
Fujinaka, Todd
2014-01-29 21:54:36 UTC
Permalink
We don't seem to have any issues:
Vijay Agrawal
2014-02-04 12:54:53 UTC
Permalink
Hi Todd,

Basically it's only with vlan that 10G interface is not working and we are using the latest driver ixgbe-3.18.7.
In last mail the packet was actually sent without VLAN so there was no issue.
I have tested it more , and the problem reduced to this :
With VLAN the 10G driver is not accepting the vlan tagged packets unless that vlan is configured on the physical interface, we are using PF_PACKET sockets here and we don't want to configure VLAN physically on the interface. No such limitation exists on 1 G driver (igbvf).

Here I have modified the simple program to explain the problem in some more detail.
It has two programs here , sender and receiver.

Suppose we are sending packets on interface eth0 and receiving on interface eth1.
Run ethereal on interface eth0 and eth1 .

Run Receiver on one interface as
# ./receiver interface_name
Example :
# ./receiver eth1

Run sender on one interface as
# ./sender interface_name with_vlan (1/0) ( 1(one) will add vlan , 0(zero) will not).
Example :
# ./sender eth0 1

Now you will be able to observer that on interface eth0 , the ethereal will show that one arp request is sent with vlan in it , but at the same time you will receive nothing on eth1, neither on ethereal nor , receiver program will say anything.

Now just run sender again without vlan as
#./sender eth0 0

Now u will observe that packet is successfully sent and received , we can capture the packet on eth1 on ethereal and receiver program will also dump the packet on console.

Thanks & Regards
Vijay Agrawal

-----Original Message-----
From: Fujinaka, Todd [mailto:***@intel.com]
Sent: 30 January 2014 03:25
To: Vijay Agrawal; e1000-***@lists.sf.net
Subject: RE: [E1000-devel] ixgbe-3.17.3 :VLAN tagged packets does not work when using PF-PACKET socket

We don't seem to have any issues:
Tantilov, Emil S
2014-02-04 18:40:46 UTC
Permalink
The ixgbe driver strips vlan tags and this is by design as Todd mentioned this due to 8021P support. There are different cases where the result may differ based on the kernel version.

There is a long discussion regarding this issue here:
sourceforge.net/p/e1000/bugs/355/

You can also modify the driver to not strip the vlan tags in all cases.

Thanks,
Emil
Post by Fujinaka, Todd
-----Original Message-----
Sent: Tuesday, February 04, 2014 4:55 AM
Subject: Re: [E1000-devel] ixgbe-3.17.3 :VLAN tagged packets
does not work when using PF-PACKET socket
Hi Todd,
Basically it's only with vlan that 10G interface is not
working and we are using the latest driver ixgbe-3.18.7.
In last mail the packet was actually sent without VLAN so
there was no issue.
With VLAN the 10G driver is not accepting the vlan
tagged packets unless that vlan is configured on the
physical interface, we are using PF_PACKET sockets here and
we don't want to configure VLAN physically on the
interface. No such limitation exists on 1 G driver (igbvf).
Here I have modified the simple program to explain the
problem in some more detail.
It has two programs here , sender and receiver.
Suppose we are sending packets on interface eth0 and
receiving on interface eth1.
Run ethereal on interface eth0 and eth1 .
Run Receiver on one interface as
# ./receiver interface_name
# ./receiver eth1
Run sender on one interface as
# ./sender interface_name with_vlan (1/0) ( 1(one) will
add vlan , 0(zero) will not).
# ./sender eth0 1
Now you will be able to observer that on interface eth0 ,
the ethereal will show that one arp request is sent with
vlan in it , but at the same time you will receive nothing
on eth1, neither on ethereal nor , receiver program will say
anything.
Now just run sender again without vlan as
#./sender eth0 0
Now u will observe that packet is successfully sent and
received , we can capture the packet on eth1 on ethereal and
receiver program will also dump the packet on console.
Thanks & Regards
Vijay Agrawal
-----Original Message-----
Sent: 30 January 2014 03:25
Subject: RE: [E1000-devel] ixgbe-3.17.3 :VLAN tagged packets
does not work when using PF-PACKET socket
Loading...