]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ice: refactor ice_fdir_create_dflt_rules() function
authorMateusz Polchlopek <mateusz.polchlopek@intel.com>
Fri, 17 Jan 2025 08:06:32 +0000 (09:06 +0100)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Mon, 10 Feb 2025 18:43:48 +0000 (10:43 -0800)
commit5a7b0b6ff49ba5148cfa87c2fbe39a2b22266b1f
tree6029dfc47c3a79c7d115f3843a390aae320ed93c
parentf003075227864344c14f53302c28acd0174d9225
ice: refactor ice_fdir_create_dflt_rules() function

The Flow Director function ice_fdir_create_dflt_rules() calls few
times function ice_create_init_fdir_rule() each time with different
enum ice_fltr_ptype parameter. Next step is to return error code if
error occurred.

Change the code to store all necessary default rules in constant array
and call ice_create_init_fdir_rule() in the loop. It makes it easy to
extend the list of default rules in the future, without the need of
duplicate code more and more.

Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Signed-off-by: Mateusz Polchlopek <mateusz.polchlopek@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c