Skip to contentSkip to conversation

100GbE Intel Wired LAN Driver Updates 2021-11-30

GIT PULL In review Tony Nguyen 3 participants 5 messages Nov 30, 2021 – Dec 2, 2021

Subsystems (4)
lore
Share & tools
lore

Tony Nguyen

author maintainer
#0 lore raw

This series contains updates to ice driver only.

Shiraz corrects assignment of boolean variable and removes an unused enum.

The following are changes since commit 196073f9c44be0b4758ead11e51bc2875f98df29:
net: ixp4xx_hss: drop kfree for memory allocated with devm_kzalloc
and are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue 100GbE

Shiraz Saleem (2):
net/ice: Fix boolean assignment
net/ice: Remove unused enum

 drivers/net/ethernet/intel/ice/ice_devlink.c | 2 +-
 drivers/net/ethernet/intel/ice/ice_devlink.h | 4 ----
 2 files changed, 1 insertion(+), 5 deletions(-)
Signature · 1 line
2.31.1
author maintainer
#1 lore raw

PATCH 1/2 net/ice: Fix boolean assignment

From: Shiraz Saleem <[email protected]>

vbool in ice_devlink_enable_roce_get can be assigned to a non-0/1 constant.

Fix this assignment of vbool to be 0/1.

Fixes e523af4ee560 ("net/ice: Add support for enable_iwarp and enable_roce devlink param")
---
 drivers/net/ethernet/intel/ice/ice_devlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/ice/ice_devlink.c +1 -1
index 478412b28a76..1cfe918db8b9 100644
@@ -436,7 +436,7 @@ ice_devlink_enable_roce_get(struct devlink *devlink, u32 id,
 {
 	struct ice_pf *pf = devlink_priv(devlink);
 
-	ctx->val.vbool = pf->rdma_mode & IIDC_RDMA_PROTOCOL_ROCEV2;
+	ctx->val.vbool = pf->rdma_mode & IIDC_RDMA_PROTOCOL_ROCEV2 ? true : false;
 
 	return 0;
 }
Signature · 1 line
2.31.1
#2 lore raw

Re: [PATCH net-next 1/2] net/ice: Fix boolean assignment

Quoted 6 lines · Tony Nguyen

From: Shiraz Saleem <[email protected]>

vbool in ice_devlink_enable_roce_get can be assigned to a non-0/1 constant.

Fix this assignment of vbool to be 0/1.

This one seems fine, but another use of vbool in ice still exists

drivers/net/ethernet/intel/ice/ice_devlink.c:617: value.vbool = test_bit(ICE_FLAG_RDMA_ENA, pf->flags) ? true : false;

Curiously, the vbool is defined in a union so it's possible for the vbool value in the union to not just be 0 or 1.

drivers/net/ethernet/intel/ice/ice_devlink.c

Quoted 1 line
drivers/net/ethernet/intel/ice/ice_devlink.c +0 -0

[]

Quoted 9 lines
drivers/net/ethernet/intel/ice/ice_devlink.c +1 -1
@@ -436,7 +436,7 @@ ice_devlink_enable_roce_get(struct devlink *devlink, u32 id,
 {
 	struct ice_pf *pf = devlink_priv(devlink);
 
-	ctx->val.vbool = pf->rdma_mode & IIDC_RDMA_PROTOCOL_ROCEV2;
+	ctx->val.vbool = pf->rdma_mode & IIDC_RDMA_PROTOCOL_ROCEV2 ? true : false;
 
 	return 0;
 }
author maintainer
#3 lore raw

PATCH 2/2 net/ice: Remove unused enum

In reply to Tony Nguyen

From: Shiraz Saleem <[email protected]>

Remove ice_devlink_param_id enum as its not used.

---
 drivers/net/ethernet/intel/ice/ice_devlink.h | 4 ----
 1 file changed, 4 deletions(-)
drivers/net/ethernet/intel/ice/ice_devlink.h +0 -4
index faea757fcf5d..fe006d9946f8 100644
@@ -4,10 +4,6 @@
 #ifndef _ICE_DEVLINK_H_
 #define _ICE_DEVLINK_H_
 
-enum ice_devlink_param_id {
-	ICE_DEVLINK_PARAM_ID_BASE = DEVLINK_PARAM_GENERIC_ID_MAX,
-};
-
 struct ice_pf *ice_allocate_pf(struct device *dev);
 
 void ice_devlink_register(struct ice_pf *pf);
Signature · 1 line
2.31.1
#4 lore raw
In reply to Tony Nguyen
This series was applied to netdev/net-next.git (master) by Tony Nguyen <[email protected]>:

Hello:

This series was applied to netdev/net-next.git (master) by Tony Nguyen <[email protected]>:

Quoted 11 lines · On Tue, 30 Nov 2021 10:12:41 -0800 you wrote:

This series contains updates to ice driver only.

Shiraz corrects assignment of boolean variable and removes an unused enum.

The following are changes since commit 196073f9c44be0b4758ead11e51bc2875f98df29:
net: ixp4xx_hss: drop kfree for memory allocated with devm_kzalloc
and are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue 100GbE

[...]

Here is the summary with links:
- [net-next,1/2] net/ice: Fix boolean assignment

    https://git.kernel.org/netdev/net-next/c/7b62483f64dd
  - [net-next,2/2] net/ice: Remove unused enum
    https://git.kernel.org/netdev/net-next/c/244714da8d5d

You are awesome, thank you!

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