> -----Original Message----- > From: Intel-wired-lan <[email protected]> On Behalf Of > Ivan Vecera > Sent: Sunday, November 5, 2023 5:46 PM > To: [email protected] > Cc: Drewek, Wojciech <[email protected]>; intel-wired- > [email protected]; Brandeburg, Jesse <[email protected]>; linux- > [email protected]; Eric Dumazet <[email protected]>; Nguyen, > Anthony L <[email protected]>; Simon Horman > <[email protected]>; Keller, Jacob E <[email protected]>; Jakub Kicinski > <[email protected]>; Paolo Abeni <[email protected]>; David S. Miller > <[email protected]> > Subject: [Intel-wired-lan] [PATCH net v2] i40e: Fix adding unsupported cloud > filters > > If a VF tries to add unsupported cloud filter through virchnl then > i40e_add_del_cloud_filter(_big_buf) returns -ENOTSUPP but this error code is > stored in 'ret' instead of 'aq_ret' that is used as error code sent back to > VF. In > this scenario where one of the mentioned functions fails the value of 'aq_ret' > is zero so the VF will incorrectly receive a 'success'. > > Use 'aq_ret' to store return value and remove 'ret' local variable. > Additionally > fix the issue when filter allocation fails, in this case no notification is > sent back > to the VF. > > Fixes: e284fc280473be ("i40e: Add and delete cloud filter") > Reviewed-by: Simon Horman <[email protected]> > Signed-off-by: Ivan Vecera <[email protected]> > --- > .../net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 16 +++++++++------- > 1 file changed, 9 insertions(+), 7 deletions(-) > > diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c > b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c > index 08d7edccfb8ddb..3f99eb19824527 100644 > --- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c > +++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c > @@ -3844,7 +3844,7 @@ static int i40e_vc_add_cloud_filter(struct i40e_vf
Tested-by: Rafal Romanowski <[email protected]> _______________________________________________ Intel-wired-lan mailing list [email protected] https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
