[dpdk-stable] patch 'net/ring: fix coding style' has been queued to LTS release 18.11.2

Kevin Traynor ktraynor at redhat.com
Wed May 8 18:02:15 CEST 2019


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 05/14/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.

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

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/997a9f97348da498caf69278ef15c3396b8f3ea5

Thanks.

Kevin Traynor

---
>From 997a9f97348da498caf69278ef15c3396b8f3ea5 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Tue, 23 Apr 2019 09:53:32 -0700
Subject: [PATCH] net/ring: fix coding style

[ upstream commit 869bf6d222bb05502bd5b508eb1cfed4e7d2623b ]

Whitespace fixes to bring inline with current DPDK style.

Fixes: e1e4017751f1 ("ring: add new driver")
Fixes: a74a99bbb8ed ("ring: free rings when detaching device")
Fixes: 61934c0956d4 ("ring: convert to use of PMD_REGISTER_DRIVER and fix linking")

Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit at intel.com>
---
 drivers/net/ring/rte_eth_ring.c | 58 ++++++++++++++++++---------------
 1 file changed, 32 insertions(+), 26 deletions(-)

diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c
index aeb48f5ec..f301ba9f4 100644
--- a/drivers/net/ring/rte_eth_ring.c
+++ b/drivers/net/ring/rte_eth_ring.c
@@ -46,6 +46,6 @@ struct ring_queue {
 
 struct pmd_internals {
-	unsigned max_rx_queues;
-	unsigned max_tx_queues;
+	unsigned int max_rx_queues;
+	unsigned int max_tx_queues;
 
 	struct ring_queue rx_ring_queues[RTE_PMD_RING_MAX_RX_RINGS];
@@ -56,10 +56,9 @@ struct pmd_internals {
 };
 
-
 static struct rte_eth_link pmd_link = {
-		.link_speed = ETH_SPEED_NUM_10G,
-		.link_duplex = ETH_LINK_FULL_DUPLEX,
-		.link_status = ETH_LINK_DOWN,
-		.link_autoneg = ETH_LINK_FIXED,
+	.link_speed = ETH_SPEED_NUM_10G,
+	.link_duplex = ETH_LINK_FULL_DUPLEX,
+	.link_status = ETH_LINK_DOWN,
+	.link_autoneg = ETH_LINK_FIXED,
 };
 
@@ -139,4 +138,5 @@ eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id,
 {
 	struct pmd_internals *internals = dev->data->dev_private;
+
 	dev->data->rx_queues[rx_queue_id] = &internals->rx_ring_queues[rx_queue_id];
 	return 0;
@@ -150,4 +150,5 @@ eth_tx_queue_setup(struct rte_eth_dev *dev, uint16_t tx_queue_id,
 {
 	struct pmd_internals *internals = dev->data->dev_private;
+
 	dev->data->tx_queues[tx_queue_id] = &internals->tx_ring_queues[tx_queue_id];
 	return 0;
@@ -157,7 +158,8 @@ eth_tx_queue_setup(struct rte_eth_dev *dev, uint16_t tx_queue_id,
 static void
 eth_dev_info(struct rte_eth_dev *dev,
-		struct rte_eth_dev_info *dev_info)
+	     struct rte_eth_dev_info *dev_info)
 {
 	struct pmd_internals *internals = dev->data->dev_private;
+
 	dev_info->max_mac_addrs = 1;
 	dev_info->max_rx_pktlen = (uint32_t)-1;
@@ -170,5 +172,5 @@ static int
 eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 {
-	unsigned i;
+	unsigned int i;
 	unsigned long rx_total = 0, tx_total = 0, tx_err_total = 0;
 	const struct pmd_internals *internal = dev->data->dev_private;
@@ -198,6 +200,7 @@ static void
 eth_stats_reset(struct rte_eth_dev *dev)
 {
-	unsigned i;
+	unsigned int i;
 	struct pmd_internals *internal = dev->data->dev_private;
+
 	for (i = 0; i < dev->data->nb_rx_queues; i++)
 		internal->rx_ring_queues[i].rx_pkts.cnt = 0;
@@ -251,6 +254,8 @@ static struct rte_vdev_driver pmd_ring_drv;
 static int
 do_eth_dev_ring_create(const char *name,
-		struct rte_ring * const rx_queues[], const unsigned nb_rx_queues,
-		struct rte_ring *const tx_queues[], const unsigned nb_tx_queues,
+		struct rte_ring * const rx_queues[],
+		const unsigned int nb_rx_queues,
+		struct rte_ring *const tx_queues[],
+		const unsigned int nb_tx_queues,
 		const unsigned int numa_node, enum dev_action action,
 		struct rte_eth_dev **eth_dev_p)
@@ -261,5 +266,5 @@ do_eth_dev_ring_create(const char *name,
 	void **rx_queues_local = NULL;
 	void **tx_queues_local = NULL;
-	unsigned i;
+	unsigned int i;
 
 	PMD_LOG(INFO, "Creating rings-backed ethdev on numa socket %u",
@@ -345,8 +350,8 @@ error:
 int
 rte_eth_from_rings(const char *name, struct rte_ring *const rx_queues[],
-		const unsigned nb_rx_queues,
+		const unsigned int nb_rx_queues,
 		struct rte_ring *const tx_queues[],
-		const unsigned nb_tx_queues,
-		const unsigned numa_node)
+		const unsigned int nb_tx_queues,
+		const unsigned int numa_node)
 {
 	struct ring_internal_args args = {
@@ -399,5 +404,5 @@ rte_eth_from_ring(struct rte_ring *r)
 
 static int
-eth_dev_ring_create(const char *name, const unsigned numa_node,
+eth_dev_ring_create(const char *name, const unsigned int numa_node,
 		enum dev_action action, struct rte_eth_dev **eth_dev)
 {
@@ -406,7 +411,7 @@ eth_dev_ring_create(const char *name, const unsigned numa_node,
 	 */
 	struct rte_ring *rxtx[RTE_PMD_RING_MAX_RX_RINGS];
-	unsigned i;
+	unsigned int i;
 	char rng_name[RTE_RING_NAMESIZE];
-	unsigned num_rings = RTE_MIN(RTE_PMD_RING_MAX_RX_RINGS,
+	unsigned int num_rings = RTE_MIN(RTE_PMD_RING_MAX_RX_RINGS,
 			RTE_PMD_RING_MAX_TX_RINGS);
 
@@ -430,15 +435,16 @@ eth_dev_ring_create(const char *name, const unsigned numa_node,
 struct node_action_pair {
 	char name[PATH_MAX];
-	unsigned node;
+	unsigned int node;
 	enum dev_action action;
 };
 
 struct node_action_list {
-	unsigned total;
-	unsigned count;
+	unsigned int total;
+	unsigned int count;
 	struct node_action_pair *list;
 };
 
-static int parse_kvlist (const char *key __rte_unused, const char *value, void *data)
+static int parse_kvlist(const char *key __rte_unused,
+			const char *value, void *data)
 {
 	struct node_action_list *info = data;
@@ -553,6 +559,6 @@ rte_pmd_ring_probe(struct rte_vdev_device *dev)
 
 		if (!kvlist) {
-			PMD_LOG(INFO, "Ignoring unsupported parameters when creating"
-					" rings-backed ethernet device");
+			PMD_LOG(INFO,
+				"Ignoring unsupported parameters when creatingrings-backed ethernet device");
 			ret = eth_dev_ring_create(name, rte_socket_id(),
 						  DEV_CREATE, &eth_dev);
@@ -598,5 +604,5 @@ rte_pmd_ring_probe(struct rte_vdev_device *dev)
 
 			info->total = ret;
-			info->list = (struct node_action_pair*)(info + 1);
+			info->list = (struct node_action_pair *)(info + 1);
 
 			ret = rte_kvargs_process(kvlist, ETH_RING_NUMA_NODE_ACTION_ARG,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 16:33:58.393611691 +0100
+++ 0018-net-ring-fix-coding-style.patch	2019-05-08 16:33:57.393578764 +0100
@@ -1 +1 @@
-From 869bf6d222bb05502bd5b508eb1cfed4e7d2623b Mon Sep 17 00:00:00 2001
+From 997a9f97348da498caf69278ef15c3396b8f3ea5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 869bf6d222bb05502bd5b508eb1cfed4e7d2623b ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index 115a882b5..91e5f5f8f 100644
+index aeb48f5ec..f301ba9f4 100644
@@ -153 +154 @@
-@@ -554,6 +560,6 @@ rte_pmd_ring_probe(struct rte_vdev_device *dev)
+@@ -553,6 +559,6 @@ rte_pmd_ring_probe(struct rte_vdev_device *dev)
@@ -162 +163 @@
-@@ -599,5 +605,5 @@ rte_pmd_ring_probe(struct rte_vdev_device *dev)
+@@ -598,5 +604,5 @@ rte_pmd_ring_probe(struct rte_vdev_device *dev)


More information about the stable mailing list