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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZD1Ia0ZB6mbZkQEC@corigine.com>
Date:   Mon, 17 Apr 2023 15:23:55 +0200
From:   Simon Horman <simon.horman@...igine.com>
To:     Leon Romanovsky <leon@...nel.org>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Leon Romanovsky <leonro@...dia.com>,
        Steffen Klassert <steffen.klassert@...unet.com>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        netdev@...r.kernel.org, Saeed Mahameed <saeedm@...dia.com>,
        Raed Salem <raeds@...dia.com>, Emeel Hakim <ehakim@...dia.com>
Subject: Re: [PATCH net-next v1 06/10] net/mlx5e: Support IPsec TX packet
 offload in tunnel mode

On Thu, Apr 13, 2023 at 03:29:24PM +0300, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@...dia.com>
> 
> Extend mlx5 driver with logic to support IPsec TX packet offload
> in tunnel mode.
> 
> Signed-off-by: Leon Romanovsky <leonro@...dia.com>

Nit below not withstanding,

Reviewed-by: Simon Horman <simon.horman@...igine.com>

...

> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c
> index 7c55b37c1c01..36f3ffd54355 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c
> @@ -271,6 +271,18 @@ static void mlx5e_ipsec_init_macs(struct mlx5e_ipsec_sa_entry *sa_entry,
>  		neigh_ha_snapshot(addr, n, netdev);
>  		ether_addr_copy(attrs->smac, addr);
>  		break;
> +	case XFRM_DEV_OFFLOAD_OUT:
> +		ether_addr_copy(attrs->smac, addr);
> +		n = neigh_lookup(&arp_tbl, &attrs->daddr.a4, netdev);
> +		if (!n) {
> +			n = neigh_create(&arp_tbl, &attrs->daddr.a4, netdev);
> +			if (IS_ERR(n))
> +				return;
> +			neigh_event_send(n, NULL);
> +		}
> +		neigh_ha_snapshot(addr, n, netdev);
> +		ether_addr_copy(attrs->dmac, addr);
> +		break;

I see no problem with the above code.
However, it does seem very similar to the code for the previous case,
XFRM_DEV_OFFLOAD_IN. Perhaps this could be refactored somehow.

I'm not suggesting this warrants a respin; a follow-up would be fine IMHO.
I could be wrong entirely :)

>  	default:
>  		return;
>  	}

...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ