Message ID | 20240910065507.2436394-2-steffen.klassert@secunet.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 9b49f55838b1f42b2624216ce494f0536669e8f0 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [01/13] xfrm: Remove documentation WARN_ON to limit return values for offloaded SA | expand |
Hello: This series was applied to netdev/net-next.git (main) by Steffen Klassert <steffen.klassert@secunet.com>: On Tue, 10 Sep 2024 08:54:55 +0200 you wrote: > From: Patrisious Haddad <phaddad@nvidia.com> > > The original idea to put WARN_ON() on return value from driver code was > to make sure that packet offload doesn't have silent fallback to > SW implementation, like crypto offload has. > > In reality, this is not needed as all *swan implementations followed > this request and used explicit configuration style to make sure that > "users will get what they ask". > So instead of forcing drivers to make sure that even their internal flows > don't return -EOPNOTSUPP, let's remove this WARN_ON. > > [...] Here is the summary with links: - [01/13] xfrm: Remove documentation WARN_ON to limit return values for offloaded SA https://git.kernel.org/netdev/net-next/c/9b49f55838b1 - [02/13] net: add copy from skb_seq_state to buffer function https://git.kernel.org/netdev/net-next/c/6ad8bc92a477 - [03/13] xfrm: Correct spelling in xfrm.h https://git.kernel.org/netdev/net-next/c/54f2f78d6b9f - [04/13] selftests: add xfrm policy insertion speed test script https://git.kernel.org/netdev/net-next/c/9c5b6d4e33dd - [05/13] xfrm: policy: don't iterate inexact policies twice at insert time https://git.kernel.org/netdev/net-next/c/33f611cf7d52 - [06/13] xfrm: switch migrate to xfrm_policy_lookup_bytype https://git.kernel.org/netdev/net-next/c/563d5ca93e88 - [07/13] xfrm: policy: remove remaining use of inexact list https://git.kernel.org/netdev/net-next/c/a54ad727f745 - [08/13] xfrm: add SA information to the offloaded packet https://git.kernel.org/netdev/net-next/c/e7cd191f83fd - [09/13] xfrm: policy: use recently added helper in more places https://git.kernel.org/netdev/net-next/c/08c2182cf0b4 - [10/13] xfrm: minor update to sdb and xfrm_policy comments https://git.kernel.org/netdev/net-next/c/17163f23678c - [11/13] Revert "xfrm: add SA information to the offloaded packet" https://git.kernel.org/netdev/net-next/c/69716a3babe1 - [12/13] xfrm: policy: fix null dereference https://git.kernel.org/netdev/net-next/c/6a13f5afd39d - [13/13] xfrm: policy: Restore dir assignments in xfrm_hash_rebuild() https://git.kernel.org/netdev/net-next/c/e62d39332d4b You are awesome, thank you!
diff --git a/net/xfrm/xfrm_device.c b/net/xfrm/xfrm_device.c index 9a44d363ba62..f123b7c9ec82 100644 --- a/net/xfrm/xfrm_device.c +++ b/net/xfrm/xfrm_device.c @@ -328,12 +328,8 @@ int xfrm_dev_state_add(struct net *net, struct xfrm_state *x, /* User explicitly requested packet offload mode and configured * policy in addition to the XFRM state. So be civil to users, * and return an error instead of taking fallback path. - * - * This WARN_ON() can be seen as a documentation for driver - * authors to do not return -EOPNOTSUPP in packet offload mode. */ - WARN_ON(err == -EOPNOTSUPP && is_packet_offload); - if (err != -EOPNOTSUPP || is_packet_offload) { + if ((err != -EOPNOTSUPP && !is_packet_offload) || is_packet_offload) { NL_SET_ERR_MSG_WEAK(extack, "Device failed to offload this state"); return err; }