netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Chiachang Wang <chiachangwang@google.com>
Cc: netdev@vger.kernel.org, steffen.klassert@secunet.com,
	stanleyjhu@google.com, yumike@google.com
Subject: Re: [PATCH ipsec-next v5 1/2] xfrm: Migrate offload configuration
Date: Thu, 13 Mar 2025 14:05:38 +0200	[thread overview]
Message-ID: <20250313120538.GJ1322339@unreal> (raw)
In-Reply-To: <20250313023641.1007052-2-chiachangwang@google.com>

On Thu, Mar 13, 2025 at 02:36:40AM +0000, Chiachang Wang wrote:
> Add hardware offload configuration to XFRM_MSG_MIGRATE
> using an option netlink attribute XFRMA_OFFLOAD_DEV.
> 
> In the existing xfrm_state_migrate(), the xfrm_init_state()
> is called assuming no hardware offload by default. Even the
> original xfrm_state is configured with offload, the setting will
> be reset. If the device is configured with hardware offload,
> it's reasonable to allow the device to maintain its hardware
> offload mode. But the device will end up with offload disabled
> after receiving a migration event when the device migrates the
> connection from one netdev to another one.
> 
> The devices that support migration may work with different
> underlying networks, such as mobile devices. The hardware setting
> should be forwarded to the different netdev based on the
> migration configuration. This change provides the capability
> for user space to migrate from one netdev to another.
> 
> Test: Tested with kernel test in the Android tree located
>       in https://android.googlesource.com/kernel/tests/
>       The xfrm_tunnel_test.py under the tests folder in
>       particular.
> Signed-off-by: Chiachang Wang <chiachangwang@google.com>
> ---
>  v3 -> v4:
>  - Rebase commit to adopt updated xfrm_init_state()
>  - Remove redundant variable to rely on validiaty of pointer
>  v2 -> v3:
>  - Modify af_key to fix kbuild error
>  v1 -> v2:
>  - Address review feedback to correct the logic in the
>    xfrm_state_migrate in the migration offload configuration
>    change
>  - Revise the commit message for "xfrm: Migrate offload configuration"
> ---
>  include/net/xfrm.h     |  8 ++++++--
>  net/key/af_key.c       |  2 +-
>  net/xfrm/xfrm_policy.c |  4 ++--
>  net/xfrm/xfrm_state.c  |  9 ++++++++-
>  net/xfrm/xfrm_user.c   | 15 ++++++++++++---
>  5 files changed, 29 insertions(+), 9 deletions(-)
> 

I already posted it, but let's repost.

Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>

  reply	other threads:[~2025-03-13 12:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-13  2:36 [PATCH ipsec-next v5 0/2] Update offload configuration with SA Chiachang Wang
2025-03-13  2:36 ` [PATCH ipsec-next v5 1/2] xfrm: Migrate offload configuration Chiachang Wang
2025-03-13 12:05   ` Leon Romanovsky [this message]
2025-03-13  2:36 ` [PATCH ipsec-next v5 2/2] xfrm: Refactor migration setup during the cloning process Chiachang Wang
2025-03-13 12:06   ` Leon Romanovsky
2025-04-15  3:03 ` [PATCH ipsec-next v5 0/2] Update offload configuration with SA Chiachang Wang
2025-04-16  9:07   ` Steffen Klassert
2025-04-18  9:02 ` Steffen Klassert

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=20250313120538.GJ1322339@unreal \
    --to=leon@kernel.org \
    --cc=chiachangwang@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=stanleyjhu@google.com \
    --cc=steffen.klassert@secunet.com \
    --cc=yumike@google.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).