DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: chas3@att.com, stable@dpdk.org
Subject: [dpdk-dev] [PATCH 2/5] net/bonding: fix incorrect bond port id types
Date: Wed, 20 Mar 2019 12:47:19 +0100	[thread overview]
Message-ID: <1553082442-18850-3-git-send-email-david.marchand@redhat.com> (raw)
Message-ID: <20190320114719.LpC6cWtgxbt8HfW-_nEAubFlmUeSkOdmcWgMtZs2pLQ@z> (raw)
In-Reply-To: <1553082442-18850-1-git-send-email-david.marchand@redhat.com>

Following the port id conversion to 16bits, two references to bonding
port id have been missed.

Fixes: f8244c6399d9 ("ethdev: increase port id range")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index b0d191d..df0a3b4 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -2196,7 +2196,7 @@ struct bwg_slave {
 bond_ethdev_close(struct rte_eth_dev *dev)
 {
 	struct bond_dev_private *internals = dev->data->dev_private;
-	uint8_t bond_port_id = internals->port_id;
+	uint16_t bond_port_id = internals->port_id;
 	int skipped = 0;
 	struct rte_flow_error ferror;
 
@@ -2663,7 +2663,7 @@ struct bwg_slave {
 	if (type != RTE_ETH_EVENT_INTR_LSC || param == NULL)
 		return rc;
 
-	bonded_eth_dev = &rte_eth_devices[*(uint8_t *)param];
+	bonded_eth_dev = &rte_eth_devices[*(uint16_t *)param];
 
 	if (check_for_bonded_ethdev(bonded_eth_dev))
 		return rc;
-- 
1.8.3.1


  parent reply	other threads:[~2019-03-20 11:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-20 11:47 [dpdk-dev] [PATCH 0/5] bonding fixes David Marchand
2019-03-20 11:47 ` David Marchand
2019-03-20 11:47 ` [dpdk-dev] [PATCH 1/5] doc: fix incorrect bond examples David Marchand
2019-03-20 11:47   ` David Marchand
2019-03-20 11:47 ` David Marchand [this message]
2019-03-20 11:47   ` [dpdk-dev] [PATCH 2/5] net/bonding: fix incorrect bond port id types David Marchand
2019-03-20 11:47 ` [dpdk-dev] [PATCH 3/5] net/bonding: fix incorrect slave " David Marchand
2019-03-20 11:47   ` David Marchand
2019-03-20 11:47 ` [dpdk-dev] [PATCH 4/5] net/bonding: fix incorrect packet count type for lacp David Marchand
2019-03-20 11:47   ` David Marchand
2019-03-20 11:47 ` [dpdk-dev] [PATCH 5/5] net/bonding: fix incorrect rxq/txq index types David Marchand
2019-03-20 11:47   ` David Marchand
2019-03-21 20:12 ` [dpdk-dev] [PATCH 0/5] bonding fixes Ferruh Yigit
2019-03-21 20:12   ` Ferruh Yigit
2019-03-21 20:21   ` David Marchand
2019-03-21 20:21     ` David Marchand

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=1553082442-18850-3-git-send-email-david.marchand@redhat.com \
    --to=david.marchand@redhat.com \
    --cc=chas3@att.com \
    --cc=dev@dpdk.org \
    --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).