RE: [EXT] [PATCH iwl-next v6] ice: Add support for packet mirroring using hardware in switchdev mode

From: Staikov, Andrii
Date: Fri Dec 15 2023 - 06:36:57 EST


>
>
> -----Original Message-----
> From: Suman Ghosh <sumang@xxxxxxxxxxx>
> Sent: Tuesday, December 12, 2023 3:31 PM
> To: Staikov, Andrii <andrii.staikov@xxxxxxxxx>
> Cc: netdev@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Szycik, Marcin <marcin.szycik@xxxxxxxxx>; Drewek, Wojciech <wojciech.drewek@xxxxxxxxx>
> Subject: RE: [EXT] [PATCH iwl-next v6] ice: Add support for packet mirroring using hardware in switchdev mode
>
> > break;
> >
> >+ case FLOW_ACTION_MIRRED:
> [Suman] Hi Andrei,
> I guess we have two flow_action_ids FLOW_ACTION_MIRRED (for egress) and FLOW_ACTION_MIRRED_INGRESS (for ingress). The sample command used in above is of type ingress
> and that is not handled here. My guess is, ingress command should show "not supported" error from tc right? Please let me know if I am missing something.

Yes, we'll return 'unsupported' since we currently don't support ingress action for mirror and redirect.

> >+ err = ice_tc_setup_mirror_action(filter_dev, fltr, act->dev);
> >+ if (err)
> >+ return err;
> >+ break;
> >+
> > default:
> > NL_SET_ERR_MSG_MOD(fltr->extack, "Unsupported action in
> >switchdev mode");
> > return -EINVAL;
> >diff --git a/drivers/net/ethernet/intel/ice/ice_type.h
> >b/drivers/net/ethernet/intel/ice/ice_type.h
> >index 5a80158e49ed..20c014e9b6c0 100644
> >--- a/drivers/net/ethernet/intel/ice/ice_type.h
> >+++ b/drivers/net/ethernet/intel/ice/ice_type.h
> >@@ -1055,6 +1055,7 @@ enum ice_sw_fwd_act_type {
> > ICE_FWD_TO_Q,
> > ICE_FWD_TO_QGRP,
> > ICE_DROP_PACKET,
> >+ ICE_MIRROR_PACKET,
> > ICE_NOP,
> > ICE_INVAL_ACT
> > };
> >--
> >2.25.1
> >
>
>