patch 'net/bonding: fix mode type mismatch' has been queued to stable release 21.11.1

Kevin Traynor ktraynor at redhat.com
Mon Feb 21 16:34:20 CET 2022


Hi,

FYI, your patch has been queued to stable release 21.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/83774f8a67df75f671ac0918d21e1fcea1e93035

Thanks.

Kevin

---
>From 83774f8a67df75f671ac0918d21e1fcea1e93035 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian at huawei.com>
Date: Fri, 10 Dec 2021 19:41:01 +0800
Subject: [PATCH] net/bonding: fix mode type mismatch

[ upstream commit cc5097b1e46ddee8df8d2210a67ec675f3807ba2 ]

There were some type-mismatch issues in bonding and fix them:
- Use %u to fix argument type mismatch in RTE_BOND_LOG.
- The internals->mode is of type uint8_t. But the function
  parameter 'mode' is of type int. So change the mode type
  from int to uint8_t.

Fixes: 2efb58cbab6e ("bond: new link bonding library")
Fixes: a45b288ef21a ("bond: support link status polling")
Fixes: 68451eb6698c ("net/bonding: call through EAL on create/free")

Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
Acked-by: Min Hu (Connor) <humin29 at huawei.com>
---
 drivers/net/bonding/eth_bond_private.h | 2 +-
 drivers/net/bonding/rte_eth_bond_api.c | 2 +-
 drivers/net/bonding/rte_eth_bond_pmd.c | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/bonding/eth_bond_private.h b/drivers/net/bonding/eth_bond_private.h
index 9626b26d67..156335c425 100644
--- a/drivers/net/bonding/eth_bond_private.h
+++ b/drivers/net/bonding/eth_bond_private.h
@@ -241,5 +241,5 @@ slave_remove_mac_addresses(struct rte_eth_dev *bonded_eth_dev,
 
 int
-bond_ethdev_mode_set(struct rte_eth_dev *eth_dev, int mode);
+bond_ethdev_mode_set(struct rte_eth_dev *eth_dev, uint8_t mode);
 
 int
diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
index 2d5cac6c51..8840d9e17b 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -669,5 +669,5 @@ __eth_bond_slave_remove_lock_free(uint16_t bonded_port_id,
 
 	if (slave_idx < 0) {
-		RTE_BOND_LOG(ERR, "Couldn't find slave in port list, slave count %d",
+		RTE_BOND_LOG(ERR, "Couldn't find slave in port list, slave count %u",
 				internals->slave_count);
 		return -1;
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 0f11a2f5a8..9607141b39 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1555,5 +1555,5 @@ mac_address_slaves_update(struct rte_eth_dev *bonded_eth_dev)
 
 int
-bond_ethdev_mode_set(struct rte_eth_dev *eth_dev, int mode)
+bond_ethdev_mode_set(struct rte_eth_dev *eth_dev, uint8_t mode)
 {
 	struct bond_dev_private *internals;
@@ -3301,5 +3301,5 @@ bond_alloc(struct rte_vdev_device *dev, uint8_t mode)
 	bond_mode_8023ad_setup(eth_dev, NULL);
 	if (bond_ethdev_mode_set(eth_dev, mode)) {
-		RTE_BOND_LOG(ERR, "Failed to set bonded device %d mode to %d",
+		RTE_BOND_LOG(ERR, "Failed to set bonded device %u mode to %u",
 				 eth_dev->data->port_id, mode);
 		goto err;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-02-21 15:22:46.186872701 +0000
+++ 0071-net-bonding-fix-mode-type-mismatch.patch	2022-02-21 15:22:44.152704263 +0000
@@ -1 +1 @@
-From cc5097b1e46ddee8df8d2210a67ec675f3807ba2 Mon Sep 17 00:00:00 2001
+From 83774f8a67df75f671ac0918d21e1fcea1e93035 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cc5097b1e46ddee8df8d2210a67ec675f3807ba2 ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org



More information about the stable mailing list