netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Issue with adding classification rules RX flows using ethtool, igb
@ 2023-08-14 12:35 Andrzej Turko
  0 siblings, 0 replies; only message in thread
From: Andrzej Turko @ 2023-08-14 12:35 UTC (permalink / raw)
  To: netdev

Hi,

I was trying to add classification rules for RX flows using ethtool,
but I got an invalid argument error.
This happened in two slightly different scenarios:

Dropping packets:

root@amwld-aturko1:~# ethtool -K enp1s0f1 ntuple on
root@amwld-aturko1:~# ethtool -N enp1s0f1 flow-type udp4 dst-port
34567 action -1
rmgr: Cannot insert RX class rule: Invalid argument

At the same time there was a following error message in dmesg:

igb 0000:01:00.1: ethtool -N: The specified action is invalid

As far as I could tell, this message is generated there:
https://github.com/torvalds/linux/blob/master/drivers/net/ethernet/intel/igb/igb_ethtool.c#L2916

The reason for it is that the target queue index is higher than the
number of queues (fsp->ring_cookie >= adapter->num_rx_queues).
The ring_cookie field is an unsigned int, so my guess is that the
check for the special semantics of -1 is missing and the value of the
action I specified (-1) is just being treated as a queue to forward
data to.
And because it is stored in an unsigned variable, it ends up being
interpreted as a non-existent queue.


Forwarding to a queue:

root@amwld-aturko1:~# ethtool -K enp1s0f1 ntuple on
root@amwld-aturko1:~# ethtool -N enp1s0f1 flow-type udp4 dst-port 34567 queue 0
rmgr: Cannot insert RX class rule: Invalid argument

In this case I didn't notice any error messages in dmesg.


For reference, my network device is I350 Gigabit Network Connection
1521 and was bound to the igb driver. I have used ethtool 6.4
downloaded from there:
https://mirrors.edge.kernel.org/pub/software/network/ethtool/
Also, those are the queues I had available:

root@amwld-aturko1:~# ethtool -l enp1s0f1
Channel parameters for enp1s0f1:
Pre-set maximums:
RX:             n/a
TX:             n/a
Other:          1
Combined:       8


Are those bugs in ethtool or could these be due to a misconfiguration?


Thanks,
Andrzej

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-08-14 12:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-14 12:35 Issue with adding classification rules RX flows using ethtool, igb Andrzej Turko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).