net/mlx5e: Refactor duplicated code in mlx5e_ipsec_init_macs
authorLeon Romanovsky <leonro@nvidia.com>
Thu, 20 Apr 2023 08:02:51 +0000 (11:02 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 21 Apr 2023 10:49:47 +0000 (11:49 +0100)
commit45fd01f2fbf1119d083931b095ad6d0f13443d0e
treee3f0bad10e659a50a5c6add96edb185e6e731585
parent94edec448479e302b7c7e18f40cb0d7f32e71682
net/mlx5e: Refactor duplicated code in mlx5e_ipsec_init_macs

ARP discovery code has same logic for RX and TX flows, but with
different source and destination fields. Instead of duplicating
same code in mlx5e_ipsec_init_macs, let's refactor.

Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c