DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] ethdev: ensure same name size for device and ethdev
@ 2017-05-26 16:11 Ferruh Yigit
  2017-05-26 16:11 ` [dpdk-dev] [PATCH 2/2] drivers/net: use device name from device structure Ferruh Yigit
  2017-06-09 18:36 ` [dpdk-dev] [PATCH v2 1/3] ethdev: ensure same name size for device and ethdev Ferruh Yigit
  0 siblings, 2 replies; 10+ messages in thread
From: Ferruh Yigit @ 2017-05-26 16:11 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, Ferruh Yigit

rte_device->name copied into eth_dev->name, right now size is same for
both but the requirement is not clear.

This patch highlights the relation without changing actual sizes.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_eal/common/include/rte_dev.h     | 2 ++
 lib/librte_eal/common/include/rte_devargs.h | 2 +-
 lib/librte_ether/rte_ethdev.h               | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h
index de20c06..fdd5b11 100644
--- a/lib/librte_eal/common/include/rte_dev.h
+++ b/lib/librte_eal/common/include/rte_dev.h
@@ -132,6 +132,8 @@ struct rte_driver {
 	const char *alias;              /**< Driver alias. */
 };
 
+#define RTE_DEV_NAME_MAX_LEN (32)
+
 /**
  * A structure describing a generic device.
  */
diff --git a/lib/librte_eal/common/include/rte_devargs.h b/lib/librte_eal/common/include/rte_devargs.h
index 88120a1..b11cbfc 100644
--- a/lib/librte_eal/common/include/rte_devargs.h
+++ b/lib/librte_eal/common/include/rte_devargs.h
@@ -86,7 +86,7 @@ struct rte_devargs {
 		/** Used if type is RTE_DEVTYPE_VIRTUAL. */
 		struct {
 			/** Driver name. */
-			char drv_name[32];
+			char drv_name[RTE_DEV_NAME_MAX_LEN];
 		} virt;
 	};
 	/** Arguments string as given by user or "" for no argument. */
diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index 97c3b8e..d1da369 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -1689,7 +1689,7 @@ struct rte_eth_dev_sriov {
 };
 #define RTE_ETH_DEV_SRIOV(dev)         ((dev)->data->sriov)
 
-#define RTE_ETH_NAME_MAX_LEN (32)
+#define RTE_ETH_NAME_MAX_LEN RTE_DEV_NAME_MAX_LEN
 
 /**
  * @internal
-- 
2.9.3

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-07-05 22:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-26 16:11 [dpdk-dev] [PATCH 1/2] ethdev: ensure same name size for device and ethdev Ferruh Yigit
2017-05-26 16:11 ` [dpdk-dev] [PATCH 2/2] drivers/net: use device name from device structure Ferruh Yigit
2017-06-09 13:52   ` Thomas Monjalon
2017-06-09 14:16     ` Ferruh Yigit
2017-06-10  7:35     ` Jan Blunck
2017-06-12  8:57       ` Ferruh Yigit
2017-06-09 18:36 ` [dpdk-dev] [PATCH v2 1/3] ethdev: ensure same name size for device and ethdev Ferruh Yigit
2017-06-09 18:36   ` [dpdk-dev] [PATCH v2 2/3] drivers/net: use device name from device structure Ferruh Yigit
2017-06-09 18:36   ` [dpdk-dev] [PATCH v2 3/3] ethdev: " Ferruh Yigit
2017-07-05 22:11     ` Thomas Monjalon

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).