lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 17 Dec 2019 19:50:05 +0000
From:   Saeed Mahameed <saeedm@...lanox.com>
To:     "saeedm@....mellanox.co.il" <saeedm@....mellanox.co.il>,
        Mark Bloch <markb@...lanox.com>,
        "xiangxia.m.yue@...il.com" <xiangxia.m.yue@...il.com>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] net/mlx5e: Support accept action on nic table

On Tue, 2019-12-10 at 22:49 +0800, xiangxia.m.yue@...il.com wrote:
> From: Tonghao Zhang <xiangxia.m.yue@...il.com>
> 
> In one case, we may forward packets from one vport
> to others, but only one packets flow will be accepted,
> which destination ip was assign to VF.
> 
> +-----+     +-----+            +-----+
> > VFn |     | VF1 |            | VF0 | accept
> +--+--+     +--+--+  hairpin   +--^--+
>    |           | <--------------- |
>    |           |                  |
> +--+-----------v-+             +--+-------------+
> >   eswitch PF1  |             |   eswitch PF0  |
> +----------------+             +----------------+
> 
> tc filter add dev $PF0 protocol all parent ffff: prio 1 handle 1 \
> 	flower skip_sw action mirred egress redirect dev $VF0_REP
> tc filter add dev $VF0 protocol ip  parent ffff: prio 1 handle 1 \
> 	flower skip_sw dst_ip $VF0_IP action pass
> tc filter add dev $VF0 protocol all parent ffff: prio 2 handle 2 \
> 	flower skip_sw action mirred egress redirect dev $VF1
> 
> Signed-off-by: Tonghao Zhang <xiangxia.m.yue@...il.com>
> ---
>  drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
> b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
> index 0d5d84b..f91e057e 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
> @@ -2839,6 +2839,10 @@ static int parse_tc_nic_actions(struct
> mlx5e_priv *priv,
>  
>  	flow_action_for_each(i, act, flow_action) {
>  		switch (act->id) {
> +		case FLOW_ACTION_ACCEPT:
> +			action |= MLX5_FLOW_CONTEXT_ACTION_FWD_DEST |
> +				  MLX5_FLOW_CONTEXT_ACTION_COUNT;
> +			break;
>  		case FLOW_ACTION_DROP:
>  			action |= MLX5_FLOW_CONTEXT_ACTION_DROP;
>  			if (MLX5_CAP_FLOWTABLE(priv->mdev,

Applied to net-next-mlx5, will submit to net-next soon.
thanks a lot

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ