Skip to content

Commit dfb71e3

Browse files
authored
Merge pull request #52 from Vincinator/master
Doc: Added flow steering example for ethtool
2 parents db1f646 + e4ffc74 commit dfb71e3

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

advanced03-AF_XDP/README.org

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,23 @@ receiving raw-frames from a specific RX-queue id number. NICs will by
6565
default spread flows with RSS-hashing over all available RX-queues. Thus,
6666
traffic likely not hitting queue you expect.
6767

68-
You *MUST* configure NIC *HW filters* to /steer to RX-queue id/. This can be
69-
configured by use of ethtool or TC HW offloading filter setup.
68+
In order to fix that problem, you *MUST* configure the NIC to steer flow to a specific RX-queue.
69+
This can be done via ethtool or TC HW offloading filter setup.
70+
71+
The following example shows how to configure the NIC to steer all UDP ipv4 traffic
72+
to /RX-queue id/ 42:
73+
74+
#+begin_example sh
75+
ethtool -N <interface> flow-type udp4 action 42
76+
#+end_example
77+
78+
The parameter /action/ specifies the id of the target /RX-queue/.
79+
80+
In general, a flow rule is composed of a matching criteria and an action.
81+
L2, L3 and L4 header values can be used to specify the matching criteria.
82+
For a comprehensive documentation, please check out the man page of ethtool.
83+
It documents all available header values that can be used as part of the matching criteria.
7084

71-
TODO: This lesson should contain some examples on howto use ethtool.
7285

7386
Alternative work-arounds:
7487
1. Create as many AF_XDP sockets as RXQs, and have userspace poll()/select

0 commit comments

Comments
 (0)