Skip to contentSkip to conversation

ethdev: expand size of eth_dev_name in next release

RFC In review Stephen Hemminger 2 participants 2 messages Dec 8, 2016

lore
Share & tools
lore
#0 lore raw

RFC 1/1 ethdev: expand size of eth_dev_name in next release

This came up while revising earlier work on Hyper-V. The current versions of DPDK does not have enough space to support a logical device name in VMBUS. The kernel exposes the VMBUS devices by GUID in a manner similar to how PCI is expressed with domain:host:function notation.

In order to support Hyper-V in a direct fashion, the eth_dev name needs to be expanded. The standard format for text representation of GUID is 36 bytes (plus null). See uuid_unparse(3).

The other alternative is to use base64 encoding, but this worse for humans to read, and isn't directly handled by lib uuid.

---
 doc/guides/rel_notes/release_17_02.rst | 4 +++-
 lib/librte_ether/rte_ethdev.h          | 4 ++++
 2 files changed, 7 insertions(+), 1 deletion(-)
doc/guides/rel_notes/release_17_02.rst +3 -1
index 3b65038..52c97c6 100644
@@ -116,7 +116,9 @@ ABI Changes
    Also, make sure to start the actual text at the margin.
    =========================================================
 
-
+ * The macro ``RTE_ETH_NAME_MAX_LEN`` used in rte_eth_dev_data will be
+   increased from 32 to 40 characters to allow for longer values such
+   as GUID which is 36 characters long (plus null character).
 
 Shared Library Versions
 -----------------------
lib/librte_ether/rte_ethdev.h +4 -0
index 9678179..68cb956 100644
@@ -1652,7 +1652,11 @@ struct rte_eth_dev_sriov {
 };
 #define RTE_ETH_DEV_SRIOV(dev)         ((dev)->data->sriov)
 
+#ifdef RTE_NEXT_ABI
+#define RTE_ETH_NAME_MAX_LEN 40
+#else
 #define RTE_ETH_NAME_MAX_LEN (32)
+#endif
 
 /**
  * @internal
Signature · 1 line
2.10.2
#1 lore raw

2016-12-07 18:27, Stephen Hemminger:

Quoted 3 lines

In order to support Hyper-V in a direct fashion, the eth_dev name needs to be expanded. The standard format for text representation of GUID is 36 bytes (plus null). See uuid_unparse(3).

[...]

doc/guides/rel_notes/release_17_02.rst ABI Changes · line 121

Quoted 10 lines
doc/guides/rel_notes/release_17_02.rst +3 -1
@@ -116,7 +116,9 @@ ABI Changes
    Also, make sure to start the actual text at the margin.
    =========================================================
 
-
+ * The macro ``RTE_ETH_NAME_MAX_LEN`` used in rte_eth_dev_data will be
+   increased from 32 to 40 characters to allow for longer values such
+   as GUID which is 36 characters long (plus null character).

Please start at the margin and keep the double blank lines before the next title.

Quoted 7 lines
doc/guides/rel_notes/release_17_02.rst +0 -0
 Shared Library Versions
 -----------------------
lib/librte_ether/rte_ethdev.h +0 -0
index 9678179..68cb956 100644

lib/librte_ether/rte_ethdev.h struct rte_eth_dev_sriov { · line 1659

Quoted 8 lines
lib/librte_ether/rte_ethdev.h +4 -0
@@ -1652,7 +1652,11 @@ struct rte_eth_dev_sriov {
 };
 #define RTE_ETH_DEV_SRIOV(dev)         ((dev)->data->sriov)
 
+#ifdef RTE_NEXT_ABI
+#define RTE_ETH_NAME_MAX_LEN 40
+#else
 #define RTE_ETH_NAME_MAX_LEN (32)
+#endif

No need for RTE_NEXT_ABI as it was planned to break ethdev ABI for several reasons (see doc/guides/rel_notes/deprecation.rst).

Note that we should continue the discussion about the ABI process, but I prefer avoiding this debate during December as we are really too busy until the RC1.