Skip to contentSkip to conversation

netdevsim: add ipsec hw_features

PATCH Applied Hangbin Liu 3 participants 3 messages Oct 15, 2025 – Oct 16, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netdevsim: add ipsec hw_features

Currently, netdevsim only sets dev->features, which makes the ESP features fixed. For example:

  # ethtool -k eni0np1 | grep esp
  tx-esp-segmentation: on [fixed]
  esp-hw-offload: on [fixed]
  esp-tx-csum-hw-offload: on [fixed]

This patch adds the ESP features to hw_features, allowing them to be changed manually. For example:

  # ethtool -k eni0np1 | grep esp
  tx-esp-segmentation: on
  esp-hw-offload: on
  esp-tx-csum-hw-offload: on
---
 drivers/net/netdevsim/ipsec.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/netdevsim/ipsec.c +1 -0
index 47cdee5577d4..36a1be4923d6 100644
@@ -277,6 +277,7 @@ void nsim_ipsec_init(struct netdevsim *ns)
 				 NETIF_F_GSO_ESP)
 
 	ns->netdev->features |= NSIM_ESP_FEATURES;
+	ns->netdev->hw_features |= NSIM_ESP_FEATURES;
 	ns->netdev->hw_enc_features |= NSIM_ESP_FEATURES;
 
 	ns->ipsec.pfile = debugfs_create_file("ipsec", 0400,
Signature · 1 line
2.50.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Hangbin Liu

Currently, netdevsim only sets dev->features, which makes the ESP features fixed. For example:

  # ethtool -k eni0np1 | grep esp
  tx-esp-segmentation: on [fixed]
  esp-hw-offload: on [fixed]
  esp-tx-csum-hw-offload: on [fixed]

This patch adds the ESP features to hw_features, allowing them to be changed manually. For example:

Quoted 7 lines
  # ethtool -k eni0np1 | grep esp
  tx-esp-segmentation: on
  esp-hw-offload: on
  esp-tx-csum-hw-offload: on

Thanks Hangbin.

Signature · 1 line
Sabrina
#2 lore raw
In reply to Hangbin Liu
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 9 lines · On Wed, 15 Oct 2025 08:36:49 +0000 you wrote:

Currently, netdevsim only sets dev->features, which makes the ESP features fixed. For example:

  # ethtool -k eni0np1 | grep esp
  tx-esp-segmentation: on [fixed]
  esp-hw-offload: on [fixed]
  esp-tx-csum-hw-offload: on [fixed]

[...]

Here is the summary with links:
- [net-next] netdevsim: add ipsec hw_features

    https://git.kernel.org/netdev/net-next/c/38c31c2620de

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html