netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Simon Horman <simon.horman@corigine.com>
Cc: David Miller <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, oss-drivers@corigine.com,
	Huanhuan Wang <huanhuan.wang@corigine.com>
Subject: Re: [PATCH net-next] nfp: support IPsec offloading for NFP3800
Date: Sun, 22 Jan 2023 10:50:24 +0200	[thread overview]
Message-ID: <Y8z40Dt0ZiETMurg@unreal> (raw)
In-Reply-To: <20230119113842.146884-1-simon.horman@corigine.com>

On Thu, Jan 19, 2023 at 12:38:42PM +0100, Simon Horman wrote:
> From: Huanhuan Wang <huanhuan.wang@corigine.com>
> 
> Add IPsec offloading support for NFP3800.
> Including data plane and control plane.
> 
> Data plane: add IPsec packet process flow in NFP3800 datapath (NFDK).
> 
> Control plane: add a algorithm support distinction of flow
> in xfrm hook function xdo_dev_state_add as NFP3800
> supports a different set of IPsec algorithms.
> 
> This matches existing support for the NFP6000/NFP4000 and
> their NFD3 datapath.
> 
> Signed-off-by: Huanhuan Wang <huanhuan.wang@corigine.com>
> Signed-off-by: Simon Horman <simon.horman@corigine.com>
> ---
>  drivers/net/ethernet/netronome/nfp/Makefile   |  2 +-
>  .../net/ethernet/netronome/nfp/crypto/ipsec.c |  9 ++++
>  drivers/net/ethernet/netronome/nfp/nfd3/dp.c  |  5 +-
>  drivers/net/ethernet/netronome/nfp/nfdk/dp.c  | 47 +++++++++++++++++--
>  .../net/ethernet/netronome/nfp/nfdk/ipsec.c   | 17 +++++++
>  .../net/ethernet/netronome/nfp/nfdk/nfdk.h    |  8 ++++
>  6 files changed, 79 insertions(+), 9 deletions(-)
>  create mode 100644 drivers/net/ethernet/netronome/nfp/nfdk/ipsec.c

<...>

>  	md_bytes = sizeof(meta_id) +
>  		   !!md_dst * NFP_NET_META_PORTID_SIZE +
> -		   vlan_insert * NFP_NET_META_VLAN_SIZE;
> +		   vlan_insert * NFP_NET_META_VLAN_SIZE +
> +		   *ipsec * NFP_NET_META_IPSEC_FIELD_SIZE;

*ipsec is boolean variable, so you are assuming that true is always 1.
I'm not sure that it is always correct.

Thanks

  reply	other threads:[~2023-01-22  8:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-19 11:38 [PATCH net-next] nfp: support IPsec offloading for NFP3800 Simon Horman
2023-01-22  8:50 ` Leon Romanovsky [this message]
2023-01-23 13:15   ` Simon Horman
2023-01-23 13:36     ` Leon Romanovsky
2023-01-23 13:39       ` Simon Horman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y8z40Dt0ZiETMurg@unreal \
    --to=leon@kernel.org \
    --cc=davem@davemloft.net \
    --cc=huanhuan.wang@corigine.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oss-drivers@corigine.com \
    --cc=pabeni@redhat.com \
    --cc=simon.horman@corigine.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).