today I tried PF_RING(3rd party tool) to set perfect filter
but failed also.
any one can tell me how to use ethtool to set perfect filter?
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?
The current driver and the hardware both support flow director. Which ixgbe driver version are you using?
What happens if you try this command?
ethtool -K eth4 ntuple on (assuming eth4 is your X520 adapter.)
after kernel updated to 2.6.34, the filter works
one more question
does "flow-type" support "ANY" protocol?
otherwise I need to add tcp4 and udp respectively?
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!