diff options
author | Tonghao Zhang <xiangxia.m.yue@gmail.com> | 2019-01-28 15:28:06 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-02-27 10:08:06 +0100 |
commit | 7c3969ff8bd40272dfbbc00dd16bf87547c818c8 (patch) | |
tree | e18a8e0176f5045d8bb5a0401f6e6103127c02e5 /crypto/asymmetric_keys | |
parent | bb506ddb2f72ca3973f692e7d901776043f62158 (diff) | |
download | linux-stable-7c3969ff8bd40272dfbbc00dd16bf87547c818c8.tar.gz linux-stable-7c3969ff8bd40272dfbbc00dd16bf87547c818c8.tar.bz2 linux-stable-7c3969ff8bd40272dfbbc00dd16bf87547c818c8.zip |
net/mlx5e: Don't overwrite pedit action when multiple pedit used
[ Upstream commit 218d05ce326f9e1b40a56085431fa1068b43d5d9 ]
In some case, we may use multiple pedit actions to modify packets.
The command shown as below: the last pedit action is effective.
$ tc filter add dev netdev_rep parent ffff: protocol ip prio 1 \
flower skip_sw ip_proto icmp dst_ip 3.3.3.3 \
action pedit ex munge ip dst set 192.168.1.100 pipe \
action pedit ex munge eth src set 00:00:00:00:00:01 pipe \
action pedit ex munge eth dst set 00:00:00:00:00:02 pipe \
action csum ip pipe \
action tunnel_key set src_ip 1.1.1.100 dst_ip 1.1.1.200 dst_port 4789 id 100 \
action mirred egress redirect dev vxlan0
To fix it, we add max_mod_hdr_actions to mlx5e_tc_flow_parse_attr struction,
max_mod_hdr_actions will store the max pedit action number we support and
num_mod_hdr_actions indicates how many pedit action we used, and store all
pedit action to mod_hdr_actions.
Fixes: d79b6df6b10a ("net/mlx5e: Add parsing of TC pedit actions to HW format")
Cc: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
Acked-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'crypto/asymmetric_keys')
0 files changed, 0 insertions, 0 deletions