Now I am using intel X520 10G nic, the driver is ixgbe.
how to filter packet by VLAN priority? i.e, I just want those packets which VLAN priority are 1.
as I known vconfig is used to tag VLAN priority Not filter by VLAN priority.
X520 support the flowdirector(perfect filter), but I can't find anything about the VLAN priority filter setting,
looks its filter set are ip src/dst,port,vlan id,etc
I asked our software engineers about your question, and this is what I learned.
You cannot filter by just VLAN or VLAN priority. The L4 type will also play a role in the filter and as such you would only be able to filter TCP, UDP, and SCTP packets that are bound for a VLAN.
The command itself to setup a filter is "ethtool –U ethX flow-type tcp4 vlan 0x2000 vlan-mask 0xE000 action Y" where X is the correct index for the interface and Y is the queue you want to route the traffic to. This would have to be repeated for udp4 and sctp4.
I hope this will help.
I got this msg:
ethtool -U eth4 flow-type tcp4 vlan 0x2000 vlan-mask 0xE000 action 1
Cannot add new RX n-tuple filter: Operation not supported
Linux linaspl50 126.96.36.199-0.7-default # 1 SMP 2010-05-20 11:14:20 +0200 x86_64 x86_64 x86_64 GNU/Linux
is the kernel or the HW(X520) that doesn't support the operation?
FThe flow-type parameter does not support ANY. The flow-type parameter only supports tcp4, udp4, and sctp4 on ixgbe. If you want to setup a rule it must be specified for each protocol individually. Therefore, you will have to setup separate rules for tcp4 and udp4.
thanks for your help
I heard from an intel engineer that the filter (or the perfect filter / flow director) only support a set of tcp/ip field as filter keyword
that means I cann't write a filter to handle packets with this rule: if (packet[55}&packet&0x07=1) action.....
is that true?
is the HW or the driver(ixgbe) does not support it?
I have seen posts where Alex Duyck has been answering the same questions. I am assuming those posts are from you since the examples are the same.
Alex is the ultimate authority on the subject on the software implementation of flow director and perfect filters. He is the same person I go to for the answers I have posted on that subject, and I completely trust that those answers are true.
Have a great day!