patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: David Marchand <david.marchand@redhat.com>
Cc: Ferruh Yigit <ferruh.yigit@intel.com>, dpdk stable <stable@dpdk.org>
Subject: [dpdk-stable] patch 'net/bonding: fix slave id types' has been queued to LTS release 18.11.2
Date: Tue, 16 Apr 2019 15:36:59 +0100	[thread overview]
Message-ID: <20190416143719.21601-41-ktraynor@redhat.com> (raw)
In-Reply-To: <20190416143719.21601-1-ktraynor@redhat.com>

Hi,

FYI, your patch has been queued to LTS release 18.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 04/24/19. 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.

Thanks.

Kevin Traynor

---
From a48b960a6d4c325a62c6480fe1e4311423c353b0 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 20 Mar 2019 12:47:20 +0100
Subject: [PATCH] net/bonding: fix slave id types

[ upstream commit 1d6cab8a91ba461b6a223f98a527d81182c9a6d2 ]

Caught by code review, with port id conversion to 16bits, the slave id
have been extended to 16bits as well (both slave index and count).

Fixes: f8244c6399d9 ("ethdev: increase port id range")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/bonding/rte_eth_bond_8023ad.c  | 10 +++---
 drivers/net/bonding/rte_eth_bond_alb.c     |  4 +--
 drivers/net/bonding/rte_eth_bond_api.c     |  4 +--
 drivers/net/bonding/rte_eth_bond_pmd.c     | 36 ++++++++++++----------
 drivers/net/bonding/rte_eth_bond_private.h |  8 ++---
 5 files changed, 33 insertions(+), 29 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index dac23ac7b..1e6a3fc7c 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -665,5 +665,5 @@ max_index(uint64_t *a, int n)
  */
 static void
-selection_logic(struct bond_dev_private *internals, uint8_t slave_id)
+selection_logic(struct bond_dev_private *internals, uint16_t slave_id)
 {
 	struct port *agg, *port;
@@ -782,5 +782,5 @@ link_speed_key(uint16_t speed) {
 
 static void
-rx_machine_update(struct bond_dev_private *internals, uint8_t slave_id,
+rx_machine_update(struct bond_dev_private *internals, uint16_t slave_id,
 		struct rte_mbuf *lacp_pkt) {
 	struct lacpdu_header *lacp;
@@ -813,6 +813,6 @@ bond_mode_8023ad_periodic_cb(void *arg)
 	struct ether_addr slave_addr;
 	struct rte_mbuf *lacp_pkt = NULL;
-
-	uint8_t i, slave_id;
+	uint16_t slave_id;
+	uint16_t i;
 
 
@@ -1157,5 +1157,5 @@ bond_mode_8023ad_enable(struct rte_eth_dev *bond_dev)
 {
 	struct bond_dev_private *internals = bond_dev->data->dev_private;
-	uint8_t i;
+	uint16_t i;
 
 	for (i = 0; i < internals->active_slave_count; i++)
diff --git a/drivers/net/bonding/rte_eth_bond_alb.c b/drivers/net/bonding/rte_eth_bond_alb.c
index c3891c7e3..d3e16d4bd 100644
--- a/drivers/net/bonding/rte_eth_bond_alb.c
+++ b/drivers/net/bonding/rte_eth_bond_alb.c
@@ -19,8 +19,8 @@ simple_hash(uint8_t *hash_start, int hash_size)
 }
 
-static uint8_t
+static uint16_t
 calculate_slave(struct bond_dev_private *internals)
 {
-	uint8_t idx;
+	uint16_t idx;
 
 	idx = (internals->mode6.last_slave + 1) % internals->active_slave_count;
diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
index b55752ed3..a23988dc7 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -77,5 +77,5 @@ activate_slave(struct rte_eth_dev *eth_dev, uint16_t port_id)
 {
 	struct bond_dev_private *internals = eth_dev->data->dev_private;
-	uint8_t active_count = internals->active_slave_count;
+	uint16_t active_count = internals->active_slave_count;
 
 	if (internals->mode == BONDING_MODE_8023AD)
@@ -797,5 +797,5 @@ rte_eth_bond_slaves_get(uint16_t bonded_port_id, uint16_t slaves[],
 {
 	struct bond_dev_private *internals;
-	uint8_t i;
+	uint16_t i;
 
 	if (valid_bonded_port_id(bonded_port_id) != 0)
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index df0a3b419..bbe2568cd 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -354,5 +354,5 @@ bond_ethdev_tx_burst_8023ad_fast_queue(void *queue, struct rte_mbuf **bufs,
 	for (i = 0; i < nb_bufs; i++) {
 		/* Populate slave mbuf arrays with mbufs for that slave. */
-		uint8_t slave_idx = bufs_slave_port_idxs[i];
+		uint16_t slave_idx = bufs_slave_port_idxs[i];
 
 		slave_bufs[slave_idx][slave_nb_bufs[slave_idx]++] = bufs[i];
@@ -405,6 +405,7 @@ bond_ethdev_rx_burst_8023ad(void *queue, struct rte_mbuf **bufs,
 	uint8_t collecting;  /* current slave collecting status */
 	const uint8_t promisc = internals->promiscuous_en;
-	uint8_t i, j, k;
 	uint8_t subtype;
+	uint8_t j, k;
+	uint16_t i;
 
 	/* Copy slave list to protect against slave up/down changes during tx
@@ -775,5 +776,5 @@ ipv6_hash(struct ipv6_hdr *ipv6_hdr)
 void
 burst_xmit_l2_hash(struct rte_mbuf **buf, uint16_t nb_pkts,
-		uint8_t slave_count, uint16_t *slaves)
+		uint16_t slave_count, uint16_t *slaves)
 {
 	struct ether_hdr *eth_hdr;
@@ -792,5 +793,5 @@ burst_xmit_l2_hash(struct rte_mbuf **buf, uint16_t nb_pkts,
 void
 burst_xmit_l23_hash(struct rte_mbuf **buf, uint16_t nb_pkts,
-		uint8_t slave_count, uint16_t *slaves)
+		uint16_t slave_count, uint16_t *slaves)
 {
 	uint16_t i;
@@ -830,5 +831,5 @@ burst_xmit_l23_hash(struct rte_mbuf **buf, uint16_t nb_pkts,
 void
 burst_xmit_l34_hash(struct rte_mbuf **buf, uint16_t nb_pkts,
-		uint8_t slave_count, uint16_t *slaves)
+		uint16_t slave_count, uint16_t *slaves)
 {
 	struct ether_hdr *eth_hdr;
@@ -900,5 +901,5 @@ struct bwg_slave {
 	uint64_t bwg_left_int;
 	uint64_t bwg_left_remainder;
-	uint8_t slave;
+	uint16_t slave;
 };
 
@@ -953,9 +954,10 @@ bond_ethdev_update_tlb_slave_cb(void *arg)
 	struct rte_eth_stats slave_stats;
 	struct bwg_slave bwg_array[RTE_MAX_ETHPORTS];
-	uint8_t slave_count;
+	uint16_t slave_count;
 	uint64_t tx_bytes;
 
 	uint8_t update_stats = 0;
-	uint8_t i, slave_id;
+	uint16_t slave_id;
+	uint16_t i;
 
 	internals->slave_update_idx++;
@@ -1244,5 +1246,5 @@ bond_ethdev_tx_burst_balance(void *queue, struct rte_mbuf **bufs,
 	for (i = 0; i < nb_bufs; i++) {
 		/* Populate slave mbuf arrays with mbufs for that slave. */
-		uint8_t slave_idx = bufs_slave_port_idxs[i];
+		uint16_t slave_idx = bufs_slave_port_idxs[i];
 
 		slave_bufs[slave_idx][slave_nb_bufs[slave_idx]++] = bufs[i];
@@ -1355,5 +1357,5 @@ bond_ethdev_tx_burst_8023ad(void *queue, struct rte_mbuf **bufs,
 			 * slave
 			 */
-			uint8_t slave_idx = bufs_slave_port_idxs[i];
+			uint16_t slave_idx = bufs_slave_port_idxs[i];
 
 			slave_bufs[slave_idx][slave_nb_bufs[slave_idx]++] =
@@ -1397,6 +1399,7 @@ bond_ethdev_tx_burst_broadcast(void *queue, struct rte_mbuf **bufs,
 	struct bond_tx_queue *bd_tx_q;
 
-	uint8_t tx_failed_flag = 0, num_of_slaves;
 	uint16_t slaves[RTE_MAX_ETHPORTS];
+	uint8_t tx_failed_flag = 0;
+	uint16_t num_of_slaves;
 
 	uint16_t max_nb_of_tx_pkts = 0;
@@ -1949,5 +1952,5 @@ slave_remove(struct bond_dev_private *internals,
 		struct rte_eth_dev *slave_eth_dev)
 {
-	uint8_t i;
+	uint16_t i;
 
 	for (i = 0; i < internals->slave_count; i++)
@@ -2148,5 +2151,5 @@ bond_ethdev_stop(struct rte_eth_dev *eth_dev)
 {
 	struct bond_dev_private *internals = eth_dev->data->dev_private;
-	uint8_t i;
+	uint16_t i;
 
 	if (internals->mode == BONDING_MODE_8023AD) {
@@ -2244,5 +2247,5 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 	if (internals->slave_count > 0) {
 		struct rte_eth_dev_info slave_info;
-		uint8_t idx;
+		uint16_t idx;
 
 		for (idx = 0; idx < internals->slave_count; idx++) {
@@ -2657,7 +2660,8 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
 	int rc = -1;
 
-	int i, valid_slave = 0;
-	uint8_t active_pos;
 	uint8_t lsc_flag = 0;
+	int valid_slave = 0;
+	uint16_t active_pos;
+	uint16_t i;
 
 	if (type != RTE_ETH_EVENT_INTR_LSC || param == NULL)
diff --git a/drivers/net/bonding/rte_eth_bond_private.h b/drivers/net/bonding/rte_eth_bond_private.h
index 032ffed02..8afef39ba 100644
--- a/drivers/net/bonding/rte_eth_bond_private.h
+++ b/drivers/net/bonding/rte_eth_bond_private.h
@@ -101,5 +101,5 @@ struct rte_flow {
 
 typedef void (*burst_xmit_hash_t)(struct rte_mbuf **buf, uint16_t nb_pkts,
-		uint8_t slave_count, uint16_t *slaves);
+		uint16_t slave_count, uint16_t *slaves);
 
 /** Link Bonding PMD device private configuration Structure */
@@ -257,13 +257,13 @@ slave_add(struct bond_dev_private *internals,
 void
 burst_xmit_l2_hash(struct rte_mbuf **buf, uint16_t nb_pkts,
-		uint8_t slave_count, uint16_t *slaves);
+		uint16_t slave_count, uint16_t *slaves);
 
 void
 burst_xmit_l23_hash(struct rte_mbuf **buf, uint16_t nb_pkts,
-		uint8_t slave_count, uint16_t *slaves);
+		uint16_t slave_count, uint16_t *slaves);
 
 void
 burst_xmit_l34_hash(struct rte_mbuf **buf, uint16_t nb_pkts,
-		uint8_t slave_count, uint16_t *slaves);
+		uint16_t slave_count, uint16_t *slaves);
 
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:27.020153420 +0100
+++ 0041-net-bonding-fix-slave-id-types.patch	2019-04-16 15:34:25.199179528 +0100
@@ -1,13 +1,14 @@
-From 1d6cab8a91ba461b6a223f98a527d81182c9a6d2 Mon Sep 17 00:00:00 2001
+From a48b960a6d4c325a62c6480fe1e4311423c353b0 Mon Sep 17 00:00:00 2001
 From: David Marchand <david.marchand@redhat.com>
 Date: Wed, 20 Mar 2019 12:47:20 +0100
 Subject: [PATCH] net/bonding: fix slave id types
 
+[ upstream commit 1d6cab8a91ba461b6a223f98a527d81182c9a6d2 ]
+
 Caught by code review, with port id conversion to 16bits, the slave id
 have been extended to 16bits as well (both slave index and count).
 
 Fixes: f8244c6399d9 ("ethdev: increase port id range")
-Cc: stable@dpdk.org
 
 Signed-off-by: David Marchand <david.marchand@redhat.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

  parent reply	other threads:[~2019-04-16 14:38 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'common/cpt: fix null auth only' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'crypto/openssl: fix big numbers after computations' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'crypto/openssl: fix modexp' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'test/crypto: fix duplicate id used by CCP device' " Kevin Traynor
2019-04-17  6:55   ` [dpdk-stable] [EXT] " Hemant Agrawal
2019-04-16 14:36 ` [dpdk-stable] patch 'event/opdl: replace sprintf with snprintf' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/nfp: fix setting MAC address' " Kevin Traynor
2019-04-23 10:24   ` Pablo Cascón
2019-04-23 13:03     ` Kevin Traynor
2019-04-23 13:35       ` Pablo Cascón
2019-04-25 16:02         ` Kevin Traynor
2019-04-26  9:26           ` Pablo Cascón
2019-04-26  9:32             ` Kevin Traynor
2019-04-26 10:00               ` Pablo Cascón
2019-04-16 14:36 ` [dpdk-stable] patch 'net/i40e: fix time sync for 25G' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/qede: support IOVA VA mode' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/mlx5: fix packet inline on Tx queue wraparound' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/bnxt: silence IOVA warnings' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/bnxt: suppress spurious error log' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/nfp: fix RSS query' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/ixgbe: restore VLAN filter for VF' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'app/testpmd: remove unused field from port struct' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'app/testpmd: fix a typo in log message' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'ethdev: fix method name in doxygen comment' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/qede: fix Rx packet drop' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/atlantic: fix negative error codes' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/atlantic: remove unused variable' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/atlantic: remove extra checks for error codes' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/atlantic: fix buffer overflow' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/atlantic: fix EEPROM get for small and uneven lengths' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/atlantic: fix link configuration' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/atlantic: fix missing VLAN filter offload' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/atlantic: fix xstats return' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/enic: fix max MTU calculation' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/octeontx: fix vdev name' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'vhost: prevent disabled rings to be processed with zero-copy' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/virtio-user: fix multiqueue with vhost kernel' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'vhost: fix interrupt suppression for the split ring' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/virtio: add barrier in interrupt enable' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'app/testpmd: fix stdout flush after printing stats' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/nfp: fix possible buffer overflow' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/tap: fix getting max iovec' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/sfc: fix speed capabilities reported in device info' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/bonding: fix LACP negotiation' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/cxgbe: fix missing checksum flags and packet type' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'doc: fix examples in bonding guide' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/bonding: fix port id types' " Kevin Traynor
2019-04-16 14:36 ` Kevin Traynor [this message]
2019-04-16 14:37 ` [dpdk-stable] patch 'net/bonding: fix packet count type for LACP' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'net/bonding: fix queue index types' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'drivers/net: fix possible overflow using strlcat' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'compress/qat: fix setup inter buffers' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix AES-CTR block size' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix debug logs' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'cryptodev: fix driver name comparison' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'test/crypto: fix possible overflow using strlcat' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'build: remove meson warning for Arm' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'doc: update cross Arm toolchain in Linux guide' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'acl: fix compiler flags with meson and AVX2 runtime' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'malloc: fix documentation of realloc function' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'eal/linux: fix log levels for pagemap reading failure' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'ring: enforce reading tail before slots' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'test/spinlock: remove delay for correct benchmarking' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'test/spinlock: amortize the cost of getting time' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'spinlock: reimplement with atomic one-way barrier' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'rwlock: reimplement with atomic builtins' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'eal/ppc: fix global memory barrier' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'vfio: document multiprocess limitation for container API' " Kevin Traynor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190416143719.21601-41-ktraynor@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=david.marchand@redhat.com \
    --cc=ferruh.yigit@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).