From: Andrzej Turko <andrzej.tadeusz.turko@gmail.com>
To: netdev@vger.kernel.org
Subject: Issue with adding classification rules RX flows using ethtool, igb
Date: Mon, 14 Aug 2023 14:35:44 +0200 [thread overview]
Message-ID: <CAFTCNRex-NrtgcMQ+Cpw020QMy7erWB2EJU_t19eFCOA-QeBzA@mail.gmail.com> (raw)
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
reply other threads:[~2023-08-14 12:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFTCNRex-NrtgcMQ+Cpw020QMy7erWB2EJU_t19eFCOA-QeBzA@mail.gmail.com \
--to=andrzej.tadeusz.turko@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).