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 filed 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. 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 _______________________________________________ E1000-devel mailing list E1000-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/e1000-devel To learn more about Intel Ethernet, visit https://community.intel.com/t5/Ethernet-Products/bd-p/ethernet-products