From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <luca.boccassi@gmail.com>
Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68])
 by dpdk.org (Postfix) with ESMTP id E2FCA1DB9
 for <stable@dpdk.org>; Mon, 30 Apr 2018 16:07:34 +0200 (CEST)
Received: by mail-wm0-f68.google.com with SMTP id j4so13407777wme.1
 for <stable@dpdk.org>; Mon, 30 Apr 2018 07:07:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:date:message-id:in-reply-to:references;
 bh=EK5Pbi+UA4DAMCGoTlQMc4VaT8Hvoun8zZfVZjHMaF0=;
 b=uMwiBNd8qamkdtC4ym+e/Ob+JTunXcW7c2unawdaMzQxooeXgU3LwVTAsjTeYMmg0+
 CcFTm6G51D5k5pd8mJvekieR5otSjx1Po3MCG686jIpcfoY7oq5M0vduzVeOljYBAbP7
 yIdFwXcDBnwgUvDhBk/QVdrtDyWgrSM/VA9py4/OUw5o02muzj1jqhtECvL+cg/wl9UB
 MFI83CGLnELTLwsilHzLzocLaW9lEXBFhx/A5SLXevUifsCv5GQm6DNbiN/NEPTObfDS
 LOiFVm/qGRotE+n+89PQqnO4wvFpV7cnByoFIe2YJQLmHU9QSo3nANAlsgDskP/wlnUC
 vVqA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
 :references;
 bh=EK5Pbi+UA4DAMCGoTlQMc4VaT8Hvoun8zZfVZjHMaF0=;
 b=kXauVKE3wCccx0X6aahcAZfS+8663n8nF5C9FRxX/kgE8kS7Bvt81WuPxpNaE2DH2Q
 GyCYm8wvTq1J+TYrePyK1ESj0mnFVDkEEhkoSeCV7g54f6JuWewRvwPkwiFTgVuDt8dS
 OX0XUW1z6N6ILaQcaG0z2f1ZLTSaQUm+OeX6AT/L1Dnutsq9C5PFYxKrLLLpnhS7DRlY
 pUcdfivYPLdJmtCEN7BN96uRQuEJSYDr9IPCMQGflvGsuZ4yQWRo7mQAxMe4t6Rxs/g9
 mDcDT8tjCNIPYPcz5tXFI7cze4zUB7WeRW5esPv+cFDTjoVuCZJkL3BUr1Nmx27K2s3y
 y20Q==
X-Gm-Message-State: ALQs6tAnGaEvobc84IXmKTPX3H6cyzPNzG5shJ5be61OfbvrATWGulXh
 m38by1S0GeJlLeMaOq3tShQ=
X-Google-Smtp-Source: AB8JxZqYoj4GMPl50IqssiUYH0TQc0Q3x2G/AUDlgOTUsDA3g+2x5QLTAI7xP7Um58bE7n4cncLZCA==
X-Received: by 10.28.0.206 with SMTP id 197mr7102557wma.118.1525097254617;
 Mon, 30 Apr 2018 07:07:34 -0700 (PDT)
Received: from localhost ([2a00:23c5:be9a:5200:ce4c:82c0:d567:ecbb])
 by smtp.gmail.com with ESMTPSA id d9-v6sm1278381wrn.71.2018.04.30.07.07.33
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Mon, 30 Apr 2018 07:07:33 -0700 (PDT)
From: luca.boccassi@gmail.com
To: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
Cc: Ferruh Yigit <ferruh.yigit@intel.com>,
	dpdk stable <stable@dpdk.org>
Date: Mon, 30 Apr 2018 15:03:22 +0100
Message-Id: <20180430140606.4615-44-luca.boccassi@gmail.com>
X-Mailer: git-send-email 2.14.2
In-Reply-To: <20180430140606.4615-1-luca.boccassi@gmail.com>
References: <20180430140606.4615-1-luca.boccassi@gmail.com>
Subject: [dpdk-stable] patch 'net/bonding: fix primary slave port id storage
	type' has been queued to stable release 18.02.2
X-BeenThere: stable@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches for DPDK stable branches <stable.dpdk.org>
List-Unsubscribe: <https://dpdk.org/ml/options/stable>,
 <mailto:stable-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/stable/>
List-Post: <mailto:stable@dpdk.org>
List-Help: <mailto:stable-request@dpdk.org?subject=help>
List-Subscribe: <https://dpdk.org/ml/listinfo/stable>,
 <mailto:stable-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Mon, 30 Apr 2018 14:07:35 -0000

Hi,

FYI, your patch has been queued to stable release 18.02.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 05/02/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>>From bcd2ced705ee3f1aa883981b0daea88a53055960 Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
Date: Tue, 6 Mar 2018 15:07:04 +0530
Subject: [PATCH] net/bonding: fix primary slave port id storage type

[ upstream commit e54b560d2892e540567476e2588be42dbd15d957 ]

primary_slave_port_id is uint16_t which needs to be correctly stored
with the same data type of input parameter in bond_ethdev_configure.

In powerpc, creating bond pmd results in below error due to wrong
cast on input param. This is reproducible, only when using shared
libraries.

sudo -E LD_LIBRARY_PATH=$PWD/$RTE_TARGET/lib $RTE_TARGET/app/testpmd \
  -l 0,8 --socket-mem=1024,1024 \
  --vdev 'net_tap0,iface=dpdktap0' --vdev 'net_tap1,iface=dpdktap1' \
  --vdev 'net_bonding0,mode=1,slave=0,slave=1,primary=0,socket_id=1' \
  -d $RTE_TARGET/lib/librte_pmd_tap.so \
  -d $RTE_TARGET/lib/librte_mempool_ring.so -- --forward-mode=rxonly

Configuring Port 0 (socket 0)
PMD: net_tap0: 0x70a854070280: TX configured queues number: 1
PMD: net_tap0: 0x70a854070280: RX configured queues number: 1
Port 0: 86:EA:6D:52:3E:DB
Configuring Port 1 (socket 0)
PMD: net_tap1: 0x70a854074300: TX configured queues number: 1
PMD: net_tap1: 0x70a854074300: RX configured queues number: 1
Port 1: 42:9A:B8:49:B6:00
Configuring Port 2 (socket 1)
EAL: Failed to set primary slave port 7424 on bonded device net_bonding0
Fail to configure port 2
EAL: Error - exiting with code: 1
  Cause: Start ports failed

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

Signed-off-by: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/bonding/rte_eth_bond_args.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bonding/rte_eth_bond_args.c b/drivers/net/bonding/rte_eth_bond_args.c
index 27d3101b9..e99681e2d 100644
--- a/drivers/net/bonding/rte_eth_bond_args.c
+++ b/drivers/net/bonding/rte_eth_bond_args.c
@@ -244,7 +244,7 @@ bond_ethdev_parse_primary_slave_port_id_kvarg(const char *key __rte_unused,
 	if (primary_slave_port_id < 0)
 		return -1;
 
-	*(uint8_t *)extra_args = (uint8_t)primary_slave_port_id;
+	*(uint16_t *)extra_args = (uint16_t)primary_slave_port_id;
 
 	return 0;
 }
-- 
2.14.2