[PATCH net v2 0/2][pull request] Intel Wired LAN Driver Updates 2021-03-04

STALE1978d

5 messages, 3 authors, 2021-03-04 · open the first message on its own page

[PATCH net v2 0/2][pull request] Intel Wired LAN Driver Updates 2021-03-04

From: Tony Nguyen <anthony.l.nguyen@intel.com>
Date: 2021-03-04 19:20:51

This series contains updates to ixgbe and ixgbevf drivers.

Antony Antony adds a check to fail for non transport mode SA with
offload as this is not supported for ixgbe and ixgbevf.

Dinghao Liu fixes a memory leak on failure to program a perfect filter
for ixgbe.

v2:
- Dropped patch 1

The following are changes since commit a9ecb0cbf03746b17a7c13bd8e3464e6789f73e8:
  rtnetlink: using dev_base_seq from target net
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue 10GbE

Antony Antony (1):
  ixgbe: fail to create xfrm offload of IPsec tunnel mode SA

Dinghao Liu (1):
  ixgbe: Fix memleak in ixgbe_configure_clsu32

 drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | 5 +++++
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c  | 6 ++++--
 drivers/net/ethernet/intel/ixgbevf/ipsec.c     | 5 +++++
 3 files changed, 14 insertions(+), 2 deletions(-)

-- 
2.26.2

[PATCH net v2 1/2] ixgbe: fail to create xfrm offload of IPsec tunnel mode SA

From: Tony Nguyen <anthony.l.nguyen@intel.com>
Date: 2021-03-04 19:21:23

From: Antony Antony <redacted>

Based on talks and indirect references ixgbe IPsec offlod do not
support IPsec tunnel mode offload. It can only support IPsec transport
mode offload. Now explicitly fail when creating non transport mode SA
with offload to avoid false performance expectations.

Fixes: 63a67fe229ea ("ixgbe: add ipsec offload add and remove SA")
Signed-off-by: Antony Antony <redacted>
Acked-by: Shannon Nelson <redacted>
Tested-by: Tony Brelinski <redacted>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | 5 +++++
 drivers/net/ethernet/intel/ixgbevf/ipsec.c     | 5 +++++
 2 files changed, 10 insertions(+)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
index eca73526ac86..54d47265a7ac 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
@@ -575,6 +575,11 @@ static int ixgbe_ipsec_add_sa(struct xfrm_state *xs)
 		return -EINVAL;
 	}
 
+	if (xs->props.mode != XFRM_MODE_TRANSPORT) {
+		netdev_err(dev, "Unsupported mode for ipsec offload\n");
+		return -EINVAL;
+	}
+
 	if (ixgbe_ipsec_check_mgmt_ip(xs)) {
 		netdev_err(dev, "IPsec IP addr clash with mgmt filters\n");
 		return -EINVAL;
diff --git a/drivers/net/ethernet/intel/ixgbevf/ipsec.c b/drivers/net/ethernet/intel/ixgbevf/ipsec.c
index 5170dd9d8705..caaea2c920a6 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ipsec.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ipsec.c
@@ -272,6 +272,11 @@ static int ixgbevf_ipsec_add_sa(struct xfrm_state *xs)
 		return -EINVAL;
 	}
 
+	if (xs->props.mode != XFRM_MODE_TRANSPORT) {
+		netdev_err(dev, "Unsupported mode for ipsec offload\n");
+		return -EINVAL;
+	}
+
 	if (xs->xso.flags & XFRM_OFFLOAD_INBOUND) {
 		struct rx_sa rsa;
 
-- 
2.26.2

[PATCH net v2 2/2] ixgbe: Fix memleak in ixgbe_configure_clsu32

From: Tony Nguyen <anthony.l.nguyen@intel.com>
Date: 2021-03-04 19:21:25

From: Dinghao Liu <redacted>

When ixgbe_fdir_write_perfect_filter_82599() fails,
input allocated by kzalloc() has not been freed,
which leads to memleak.

Signed-off-by: Dinghao Liu <redacted>
Reviewed-by: Paul Menzel <redacted>
Tested-by: Tony Brelinski <redacted>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index fae84202d870..9f3f12e2ccf2 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -9565,8 +9565,10 @@ static int ixgbe_configure_clsu32(struct ixgbe_adapter *adapter,
 	ixgbe_atr_compute_perfect_hash_82599(&input->filter, mask);
 	err = ixgbe_fdir_write_perfect_filter_82599(hw, &input->filter,
 						    input->sw_idx, queue);
-	if (!err)
-		ixgbe_update_ethtool_fdir_entry(adapter, input, input->sw_idx);
+	if (err)
+		goto err_out_w_lock;
+
+	ixgbe_update_ethtool_fdir_entry(adapter, input, input->sw_idx);
 	spin_unlock(&adapter->fdir_perfect_lock);
 
 	if ((uhtid != 0x800) && (adapter->jump_tables[uhtid]))
-- 
2.26.2

Re: [PATCH net v2 0/2][pull request] Intel Wired LAN Driver Updates 2021-03-04

From: patchwork-bot+netdevbpf@kernel.org
Date: 2021-03-04 22:01:49

Hello:

This series was applied to netdev/net.git (refs/heads/master):

On Thu,  4 Mar 2021 11:20:15 -0800 you wrote:
This series contains updates to ixgbe and ixgbevf drivers.

Antony Antony adds a check to fail for non transport mode SA with
offload as this is not supported for ixgbe and ixgbevf.

Dinghao Liu fixes a memory leak on failure to program a perfect filter
for ixgbe.

[...]
Here is the summary with links:
  - [net,v2,1/2] ixgbe: fail to create xfrm offload of IPsec tunnel mode SA
    https://git.kernel.org/netdev/net/c/d785e1fec601
  - [net,v2,2/2] ixgbe: Fix memleak in ixgbe_configure_clsu32
    https://git.kernel.org/netdev/net/c/7a766381634d

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

Re: [PATCH net v2 0/2][pull request] Intel Wired LAN Driver Updates 2021-03-04

From: David Miller <davem@davemloft.net>
Date: 2021-03-04 22:03:08

From: Tony Nguyen <anthony.l.nguyen@intel.com>
Date: Thu,  4 Mar 2021 11:20:15 -0800
This series contains updates to ixgbe and ixgbevf drivers.

Antony Antony adds a check to fail for non transport mode SA with
offload as this is not supported for ixgbe and ixgbevf.

Dinghao Liu fixes a memory leak on failure to program a perfect filter
for ixgbe.

v2:
- Dropped patch 1

The following are changes since commit a9ecb0cbf03746b17a7c13bd8e3464e6789f73e8:
  rtnetlink: using dev_base_seq from target net
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue 10GbE
This is the same URL as your previous pull request so these changes went in via that pull.

Just FYI...
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help