octeontx2-pf: Fix ntuple rule creation to direct packet to VF with higher Rx queue...
authorSuman Ghosh <sumang@marvell.com>
Tue, 21 Nov 2023 16:56:24 +0000 (22:26 +0530)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 23 Nov 2023 11:55:32 +0000 (12:55 +0100)
commit4aa1d8f89b10cdc25a231dabf808d8935e0b137a
treeb3be378f52396514d5d54db43a742bcfa159a672
parent99360d9620f09fb8bc15548d855011bbb198c680
octeontx2-pf: Fix ntuple rule creation to direct packet to VF with higher Rx queue than its PF

It is possible to add a ntuple rule which would like to direct packet to
a VF whose number of queues are greater/less than its PF's queue numbers.
For example a PF can have 2 Rx queues but a VF created on that PF can have
8 Rx queues. As of today, ntuple rule will reject rule because it is
checking the requested queue number against PF's number of Rx queues.
As a part of this fix if the action of a ntuple rule is to move a packet
to a VF's queue then the check is removed. Also, a debug information is
printed to aware user that it is user's responsibility to cross check if
the requested queue number on that VF is a valid one.

Fixes: f0a1913f8a6f ("octeontx2-pf: Add support for ethtool ntuple filters")
Signed-off-by: Suman Ghosh <sumang@marvell.com>
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20231121165624.3664182-1-sumang@marvell.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c