From: Hariprasad Kelam <hkelam@marvell.com>
To: Tony Nguyen <anthony.l.nguyen@intel.com>
Cc: <davem@davemloft.net>, <kuba@kernel.org>, <pabeni@redhat.com>,
<edumazet@google.com>, <andrew+netdev@lunn.ch>,
<netdev@vger.kernel.org>,
Mateusz Polchlopek <mateusz.polchlopek@intel.com>,
Przemek Kitszel <przemyslaw.kitszel@intel.com>,
Simon Horman <horms@kernel.org>,
Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com>
Subject: Re: [PATCH net 2/6] ice: change q_index variable type to s16 to store -1 value
Date: Tue, 5 Nov 2024 10:56:23 +0530 [thread overview]
Message-ID: <Zymsf2A9KMxROZkh@test-OptiPlex-Tower-Plus-7010> (raw)
In-Reply-To: <20241104223639.2801097-3-anthony.l.nguyen@intel.com>
On 2024-11-05 at 04:06:30, Tony Nguyen (anthony.l.nguyen@intel.com) wrote:
> From: Mateusz Polchlopek <mateusz.polchlopek@intel.com>
>
> Fix Flow Director not allowing to re-map traffic to 0th queue when action
> is configured to drop (and vice versa).
>
> The current implementation of ethtool callback in the ice driver forbids
> change Flow Director action from 0 to -1 and from -1 to 0 with an error,
> e.g:
>
> # ethtool -U eth2 flow-type tcp4 src-ip 1.1.1.1 loc 1 action 0
> # ethtool -U eth2 flow-type tcp4 src-ip 1.1.1.1 loc 1 action -1
> rmgr: Cannot insert RX class rule: Invalid argument
>
> We set the value of `u16 q_index = 0` at the beginning of the function
> ice_set_fdir_input_set(). In case of "drop traffic" action (which is
> equal to -1 in ethtool) we store the 0 value. Later, when want to change
> traffic rule to redirect to queue with index 0 it returns an error
> caused by duplicate found.
>
> Fix this behaviour by change of the type of field `q_index` from u16 to s16
> in `struct ice_fdir_fltr`. This allows to store -1 in the field in case
> of "drop traffic" action. What is more, change the variable type in the
> function ice_set_fdir_input_set() and assign at the beginning the new
> `#define ICE_FDIR_NO_QUEUE_IDX` which is -1. Later, if the action is set
> to another value (point specific queue index) the variable value is
> overwritten in the function.
>
> Fixes: cac2a27cd9ab ("ice: Support IPv4 Flow Director filters")
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> Signed-off-by: Mateusz Polchlopek <mateusz.polchlopek@intel.com>
> Reviewed-by: Simon Horman <horms@kernel.org>
> Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
> ---
Reviewed-by: Hariprasad Kelam <hkelam@marvell.com>
next prev parent reply other threads:[~2024-11-05 5:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-04 22:36 [PATCH net 0/6][pull request] Intel Wired LAN Driver Updates 2024-11-04 (ice, idpf, i40e, e1000e) Tony Nguyen
2024-11-04 22:36 ` [PATCH net 1/6] ice: Fix use after free during unload with ports in bridge Tony Nguyen
2024-11-04 22:36 ` [PATCH net 2/6] ice: change q_index variable type to s16 to store -1 value Tony Nguyen
2024-11-05 5:26 ` Hariprasad Kelam [this message]
2024-11-04 22:36 ` [PATCH net 3/6] idpf: avoid vport access in idpf_get_link_ksettings Tony Nguyen
2024-11-04 22:36 ` [PATCH net 4/6] idpf: fix idpf_vc_core_init error path Tony Nguyen
2024-11-04 22:36 ` [PATCH net 5/6] i40e: fix race condition by adding filter's intermediate sync state Tony Nguyen
2024-11-04 22:36 ` [PATCH net 6/6] e1000e: Remove Meteor Lake SMBUS workarounds Tony Nguyen
2024-11-06 2:20 ` [PATCH net 0/6][pull request] Intel Wired LAN Driver Updates 2024-11-04 (ice, idpf, i40e, e1000e) patchwork-bot+netdevbpf
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=Zymsf2A9KMxROZkh@test-OptiPlex-Tower-Plus-7010 \
--to=hkelam@marvell.com \
--cc=andrew+netdev@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=himasekharx.reddy.pucha@intel.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=mateusz.polchlopek@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
/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