Skip to contentSkip to conversation

switch to using YY.MM version numbers

PATCH In review Bruce Richardson 3 participants 16 messages Dec 21, 2015 – Feb 10, 2016 Network drivers

lore
Share & tools
lore
#0 lore raw

cover switch to using YY.MM version numbers

As discussed on the list, e.g. on threads:
http://dpdk.org/ml/archives/dev/2015-December/030336.html
http://dpdk.org/ml/archives/dev/2015-December/030551.html

switch the release number from 2.3 to 16.04 to have a month/year based numbering scheme.

Bruce Richardson (3):
version: switch to year/month version numbers
version: adjust printing for new version scheme
doc: rename release 2.3 to 16.04

 doc/guides/rel_notes/index.rst              |  2 +-
 doc/guides/rel_notes/release_16_04.rst      | 83 +++++++++++++++++++++++++++++
 doc/guides/rel_notes/release_2_3.rst        | 76 --------------------------
 lib/librte_eal/common/include/rte_version.h | 27 +++++-----
 4 files changed, 97 insertions(+), 91 deletions(-)
 create mode 100644 doc/guides/rel_notes/release_16_04.rst
 delete mode 100644 doc/guides/rel_notes/release_2_3.rst
Signature · 1 line
2.5.0
#1 lore raw

PATCH 1/3 version: switch to year/month version numbers

As discussed on list, switch numbering scheme to be based on year/month. Release 2.3 then becomes 16.04.

Ref: http://dpdk.org/ml/archives/dev/2015-December/030336.html

---
 lib/librte_eal/common/include/rte_version.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/librte_eal/common/include/rte_version.h +2 -2
index 6b1890e..f1c7b98 100644
@@ -55,12 +55,12 @@ extern "C" {
 /**
  * Major version number i.e. the x in x.y.z
  */
-#define RTE_VER_MAJOR 2
+#define RTE_VER_MAJOR 16
 
 /**
  * Minor version number i.e. the y in x.y.z
  */
-#define RTE_VER_MINOR 3
+#define RTE_VER_MINOR 4
 
 /**
  * Patch level number i.e. the z in x.y.z
Signature · 1 line
2.5.0
#2 lore raw

PATCH v2 1/2 version: switch to year/month version numbers

From: "Richardson, Bruce" <[email protected]>

As discussed on list, switch numbering scheme to be based on year/month. Release 2.3 then becomes 16.04.

    Ref: http://dpdk.org/ml/archives/dev/2015-December/030336.html

Also, added zero padding to the month so that it appear as 16.04 and not 16.4 in "make showversion" and rte_version().

---
 lib/librte_eal/common/include/rte_version.h | 10 +++++-----
 mk/rte.sdkconfig.mk                         |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)
lib/librte_eal/common/include/rte_version.h +5 -5
index 6b1890e..4784e67 100644
@@ -50,17 +50,17 @@ extern "C" {
 /**
  * String that appears before the version number
  */
-#define RTE_VER_PREFIX "RTE"
+#define RTE_VER_PREFIX "DPDK"
 
 /**
  * Major version number i.e. the x in x.y.z
  */
-#define RTE_VER_MAJOR 2
+#define RTE_VER_MAJOR 16
 
 /**
  * Minor version number i.e. the y in x.y.z
  */
-#define RTE_VER_MINOR 3
+#define RTE_VER_MINOR 4
 
 /**
  * Patch level number i.e. the z in x.y.z
@@ -105,13 +105,13 @@ rte_version(void)
 	if (version[0] != 0)
 		return version;
 	if (strlen(RTE_VER_SUFFIX) == 0)
-		snprintf(version, sizeof(version), "%s %d.%d.%d",
+		snprintf(version, sizeof(version), "%s %d.%02d.%d",
 			RTE_VER_PREFIX,
 			RTE_VER_MAJOR,
 			RTE_VER_MINOR,
 			RTE_VER_PATCH_LEVEL);
 	else
-		snprintf(version, sizeof(version), "%s %d.%d.%d%s%d",
+		snprintf(version, sizeof(version), "%s %d.%02d.%d%s%d",
 			RTE_VER_PREFIX,
 			RTE_VER_MAJOR,
 			RTE_VER_MINOR,
mk/rte.sdkconfig.mk +1 -1
index f8d95b1..564a5c3 100644
@@ -35,7 +35,7 @@ showversion:
 		$$(sed -rne 's,^#define RTE_VER_[A-Z_]*[[:space:]]+([0-9]+).*,\1,p' \
 			-e 's,^#define RTE_VER_SUFFIX[[:space:]]+"(.*)",\1,p' \
 			$(RTE_SRCDIR)/lib/librte_eal/common/include/rte_version.h) ;\
-		printf '%d.%d.%d' "$$1" "$$2" "$$3"; \
+		printf '%d.%02d.%d' "$$1" "$$2" "$$3"; \
 		if [ -z "$$5" ]; then echo; \
 		else printf '%s' "$$4"; \
 			if [ $$5 -lt 16 ] ; then echo $$5; \
Signature · 1 line
2.5.0
#3 lore raw

PATCH v2 2/2 doc: rename release notes 2.3 to 16.04

From: "Richardson, Bruce" <[email protected]>

Updated release documentation to reflect new numbering scheme.

---
 doc/guides/rel_notes/index.rst         |   2 +-
 doc/guides/rel_notes/release_16_04.rst | 138 +++++++++++++++++++++++++++++++++
 doc/guides/rel_notes/release_2_3.rst   | 138 ---------------------------------
 3 files changed, 139 insertions(+), 139 deletions(-)
 create mode 100644 doc/guides/rel_notes/release_16_04.rst
 delete mode 100644 doc/guides/rel_notes/release_2_3.rst
doc/guides/rel_notes/index.rst +1 -1
index 29013cf..84317b8 100644
@@ -36,7 +36,7 @@ Release Notes
     :numbered:
 
     rel_description
-    release_2_3
+    release_16_04
     release_2_2
     release_2_1
     release_2_0
doc/guides/rel_notes/release_16_04.rst new file +138 -0

138 lines not on this page · raw message

doc/guides/rel_notes/release_2_3.rst deleted +0 -138

138 lines not on this page · raw message

Signature · 1 line
2.5.0
#4 lore raw

Re: [PATCH v2 1/2] version: switch to year/month version numbers

In reply to John McNamara

2016-02-10 14:33, John McNamara:

lib/librte_eal/common/include/rte_version.h extern "C" { · line 63

Quoted 12 lines

/**
* Major version number i.e. the x in x.y.z
*/

lib/librte_eal/common/include/rte_version.h +2 -2
-#define RTE_VER_MAJOR 2
+#define RTE_VER_MAJOR 16
 
 /**
  * Minor version number i.e. the y in x.y.z
  */
-#define RTE_VER_MINOR 3
+#define RTE_VER_MINOR 4

I liked the idea of Bruce of renaming these constants to *_YEAR and *_MONTH.
I also think RTE_VER_PATCH_LEVEL should be RTE_VER_MINOR. And maybe that RTE_VER_PATCH_RELEASE should be RTE_VER_RELEASE.

It shouldn't hurt applications as they must use RTE_VERSION and rte_version().

Opinions?

#5 lore raw

Re: [PATCH v2 1/2] version: switch to year/month version numbers

Quoted 19 lines · Thomas Monjalon

2016-02-10 14:33, John McNamara:

lib/librte_eal/common/include/rte_version.h extern "C" { · line 63

Quoted 12 lines

/**
* Major version number i.e. the x in x.y.z
*/

lib/librte_eal/common/include/rte_version.h +2 -2
-#define RTE_VER_MAJOR 2
+#define RTE_VER_MAJOR 16
 
 /**
  * Minor version number i.e. the y in x.y.z
  */
-#define RTE_VER_MINOR 3
+#define RTE_VER_MINOR 4

I liked the idea of Bruce of renaming these constants to *_YEAR and *_MONTH.
I also think RTE_VER_PATCH_LEVEL should be RTE_VER_MINOR. And maybe that RTE_VER_PATCH_RELEASE should be RTE_VER_RELEASE.

Quoted 4 lines

It shouldn't hurt applications as they must use RTE_VERSION and rte_version().

Opinions?

Well, I always tend to like Bruce's ideas too, so +1 from me :-)

/Bruce

#6 lore raw

Re: [PATCH v2 1/2] version: switch to year/month version numbers

In reply to Thomas Monjalon
Quoted 14 lines

-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Wednesday, February 10, 2016 3:12 PM
To: Mcnamara, John <[email protected]>
Cc: [email protected]; Richardson, Bruce <[email protected]>
Subject: Re: [PATCH v2 1/2] version: switch to year/month version numbers

...

I liked the idea of Bruce of renaming these constants to *_YEAR and *_MONTH.
I also think RTE_VER_PATCH_LEVEL should be RTE_VER_MINOR. And maybe that RTE_VER_PATCH_RELEASE should be RTE_VER_RELEASE.

Quoted 4 lines

It shouldn't hurt applications as they must use RTE_VERSION and rte_version().

Opinions?

That seems like a good change. I'll resubmit.

John.

#7 lore raw

PATCH 2/3 version: adjust printing for new version scheme

In reply to Bruce Richardson

Since we are now using a year-month numbering scheme, adjust the printing of the version to always use 2-digits for YY.MM format.
Also omit the patch version unless there is a patch version present, since patches for releases are rare on DPDK. This means that the final release of 16.04 will report as 16.04, rather than 16.04.0. Release candidates for it will similarly report as 16.04-rcX.

---
 lib/librte_eal/common/include/rte_version.h | 27 +++++++++++++--------------
 1 file changed, 13 insertions(+), 14 deletions(-)
lib/librte_eal/common/include/rte_version.h +13 -14
index f1c7b98..7feea73 100644
@@ -55,12 +55,12 @@ extern "C" {
 /**
  * Major version number i.e. the x in x.y.z
  */
-#define RTE_VER_MAJOR 16
+#define RTE_REL_YEAR 16
 
 /**
  * Minor version number i.e. the y in x.y.z
  */
-#define RTE_VER_MINOR 4
+#define RTE_REL_MONTH 4
 
 /**
  * Patch level number i.e. the z in x.y.z
@@ -88,8 +88,8 @@ extern "C" {
  * All version numbers in one to compare with RTE_VERSION_NUM()
  */
 #define RTE_VERSION RTE_VERSION_NUM( \
-			RTE_VER_MAJOR, \
-			RTE_VER_MINOR, \
+			RTE_REL_YEAR, \
+			RTE_REL_MONTH, \
 			RTE_VER_PATCH_LEVEL, \
 			RTE_VER_PATCH_RELEASE)
 
@@ -102,20 +102,19 @@ static inline const char *
 rte_version(void)
 {
 	static char version[32];
+	int pos;
 	if (version[0] != 0)
 		return version;
-	if (strlen(RTE_VER_SUFFIX) == 0)
-		snprintf(version, sizeof(version), "%s %d.%d.%d",
+
+	pos = snprintf(version, sizeof(version), "%s %02d.%02d",
 			RTE_VER_PREFIX,
-			RTE_VER_MAJOR,
-			RTE_VER_MINOR,
+			RTE_REL_YEAR,
+			RTE_REL_MONTH);
+	if (RTE_VER_PATCH_LEVEL > 0)
+		pos += snprintf(version + pos, sizeof(version) - pos, ".%d",
 			RTE_VER_PATCH_LEVEL);
-	else
-		snprintf(version, sizeof(version), "%s %d.%d.%d%s%d",
-			RTE_VER_PREFIX,
-			RTE_VER_MAJOR,
-			RTE_VER_MINOR,
-			RTE_VER_PATCH_LEVEL,
+	if (strlen(RTE_VER_SUFFIX) > 0)
+		pos += snprintf(version + pos, sizeof(version) - pos, "%s%d",
 			RTE_VER_SUFFIX,
 			RTE_VER_PATCH_RELEASE < 16 ?
 				RTE_VER_PATCH_RELEASE :
Signature · 1 line
2.5.0
#8 lore raw

Re: [PATCH 2/3] version: adjust printing for new version scheme

2015-12-21 13:26, Bruce Richardson:

Quoted 3 lines

Since we are now using a year-month numbering scheme, adjust the printing of the version to always use 2-digits for YY.MM format.

Yes
It must be done for "make showversion" also.

Quoted 3 lines

Also omit the patch version unless there is a patch version present, since patches for releases are rare on DPDK. This means that the final release of 16.04 will report as 16.04, rather than 16.04.0.

So the numbering of master and maintenance releases will not be consistent:

	16.04 and then 16.04.1

It's true that maintenance releases are rare but it has been discussed at Dublin to have ones in future.
So are we OK to omit the .0 even if not consistent?

Quoted 1 line

Release candidates for it will similarly report as 16.04-rcX.

Yes, 16.04-rcX looks nicer than 16.04.0-rcX.

Shouldn't we take the opportunity to update RTE_VER_PREFIX from "RTE" to "DPDK"?

lib/librte_eal/common/include/rte_version.h extern "C" { · line 63

Quoted 11 lines

/**
* Major version number i.e. the x in x.y.z
*/

lib/librte_eal/common/include/rte_version.h +2 -2
-#define RTE_VER_MAJOR 16
+#define RTE_REL_YEAR 16
 
 /**
  * Minor version number i.e. the y in x.y.z
  */
-#define RTE_VER_MINOR 4
+#define RTE_REL_MONTH 4

Why renaming from _VER_ to _REL_?
mk/rte.sdkconfig.mk is not updated accordingly
(make showversion is broken)

[...]

lib/librte_eal/common/include/rte_version.h extern "C" { · line 94

Quoted 7 lines

#define RTE_VERSION RTE_VERSION_NUM( \

lib/librte_eal/common/include/rte_version.h +2 -2
-			RTE_VER_MAJOR, \
-			RTE_VER_MINOR, \
+			RTE_REL_YEAR, \
+			RTE_REL_MONTH, \
 			RTE_VER_PATCH_LEVEL, \
 			RTE_VER_PATCH_RELEASE)

Is there a better name for RTE_VER_PATCH_LEVEL and RTE_VER_PATCH_RELEASE? I think PATCH_LEVEL should be MINOR, i.e. the number increased when doing some maintenance releases.
The last digit is useful for release candidates and non-official packaging (downstream consumers like Linux distros or vendors). It should be updated when delivering a patched DPDK version. RTE_VER_SUFFIX should also be updated accordingly. So is RTE_VER_PATCH_RELEASE the right name? I guess yes but not sure.

[...]

lib/librte_eal/common/include/rte_version.h static inline const char * · line 115

Quoted 3 lines
lib/librte_eal/common/include/rte_version.h +2 -0
+	if (RTE_VER_PATCH_LEVEL > 0)
+		pos += snprintf(version + pos, sizeof(version) - pos, ".%d",
 			RTE_VER_PATCH_LEVEL);

I disagree.
It's important to know that it is the first of the major release (.0). I think we can remove it elsewhere. Example: PROJECT_NUMBER in doxygen.

#9 lore raw

Re: [PATCH 2/3] version: adjust printing for new version scheme

Quoted 11 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Thomas Monjalon
Sent: Monday, December 28, 2015 10:25 PM
To: Richardson, Bruce <[email protected]>
Cc: [email protected]
Subject: Re: [dpdk-dev] [PATCH 2/3] version: adjust printing for new version scheme

2015-12-21 13:26, Bruce Richardson:

Quoted 2 lines

Since we are now using a year-month numbering scheme, adjust the printing of the version to always use 2-digits for YY.MM format.

Hi,

In the interest of getting the version patch in and the release notes renamed I'm going to drop this part of the patchset and resubmit 1/3 and 3/3. If we want to rework the version output we can do it in a separate patch.

I am going to maintain the zero padding of the month so that it appear as 16.04 and not 16.4 in "make showversion" and rte_version().

Quoted 2 lines

Shouldn't we take the opportunity to update RTE_VER_PREFIX from "RTE" to "DPDK"?

I'm also going to make this change "en passant" since it makes sense and is in the same file. The version outputs now look like this:

    $ make showversion
    16.04.0-rc0
    RTE>> version_autotest
    Version string: 'DPDK 16.04.0-rc0'

Note, if the s/RTE/DPDK/ change breaks anyone's parsing of output for tests or otherwise, let me know.

John.

#10 lore raw

PATCH 3/3 doc: rename release 2.3 to 16.04

In reply to Bruce Richardson

Update documentation to reflect new numbering scheme

---
 doc/guides/rel_notes/index.rst         |  2 +-
 doc/guides/rel_notes/release_16_04.rst | 83 ++++++++++++++++++++++++++++++++++
 doc/guides/rel_notes/release_2_3.rst   | 76 -------------------------------
 3 files changed, 84 insertions(+), 77 deletions(-)
 create mode 100644 doc/guides/rel_notes/release_16_04.rst
 delete mode 100644 doc/guides/rel_notes/release_2_3.rst
doc/guides/rel_notes/index.rst +1 -1
index 29013cf..84317b8 100644
@@ -36,7 +36,7 @@ Release Notes
     :numbered:
 
     rel_description
-    release_2_3
+    release_16_04
     release_2_2
     release_2_1
     release_2_0
doc/guides/rel_notes/release_16_04.rst new file +83 -0

83 lines not on this page · raw message

doc/guides/rel_notes/release_2_3.rst deleted +0 -76

76 lines not on this page · raw message

Signature · 1 line
2.5.0
#11 lore raw

PATCH v3 1/2 version: switch to year/month version numbers

In reply to Bruce Richardson

From: "Richardson, Bruce" <[email protected]>

As discussed on list, switch numbering scheme to be based on year/month. Release 2.3 then becomes 16.04.

    Ref: http://dpdk.org/ml/archives/dev/2015-December/030336.html

Also, added zero padding to the month so that it appear as 16.04 and not 16.4 in "make showversion" and rte_version().

---
 drivers/net/nfp/nfp_net.c                   |  2 --
 lib/librte_eal/common/include/rte_version.h | 42 ++++++++++++++---------------
 mk/rte.sdkconfig.mk                         |  2 +-
 3 files changed, 22 insertions(+), 24 deletions(-)
drivers/net/nfp/nfp_net.c +0 -2
index ffa5730..fd4dd39 100644
@@ -1070,9 +1070,7 @@ nfp_net_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 	};
 
 	dev_info->reta_size = NFP_NET_CFG_RSS_ITBL_SZ;
-#if RTE_VER_MAJOR == 2 && RTE_VER_MINOR >= 1
 	dev_info->hash_key_size = NFP_NET_CFG_RSS_KEY_SZ;
-#endif
 }
 
 static uint32_t
lib/librte_eal/common/include/rte_version.h +21 -21

81 lines not on this page · raw message

mk/rte.sdkconfig.mk +1 -1
index f8d95b1..564a5c3 100644
@@ -35,7 +35,7 @@ showversion:
 		$$(sed -rne 's,^#define RTE_VER_[A-Z_]*[[:space:]]+([0-9]+).*,\1,p' \
 			-e 's,^#define RTE_VER_SUFFIX[[:space:]]+"(.*)",\1,p' \
 			$(RTE_SRCDIR)/lib/librte_eal/common/include/rte_version.h) ;\
-		printf '%d.%d.%d' "$$1" "$$2" "$$3"; \
+		printf '%d.%02d.%d' "$$1" "$$2" "$$3"; \
 		if [ -z "$$5" ]; then echo; \
 		else printf '%s' "$$4"; \
 			if [ $$5 -lt 16 ] ; then echo $$5; \
Signature · 1 line
2.5.0
#12 lore raw

PATCH v3 2/2 doc: rename release notes 2.3 to 16.04

From: "Richardson, Bruce" <[email protected]>

Updated release documentation to reflect new numbering scheme.

---
 doc/guides/rel_notes/index.rst         |   2 +-
 doc/guides/rel_notes/release_16_04.rst | 138 +++++++++++++++++++++++++++++++++
 doc/guides/rel_notes/release_2_3.rst   | 138 ---------------------------------
 3 files changed, 139 insertions(+), 139 deletions(-)
 create mode 100644 doc/guides/rel_notes/release_16_04.rst
 delete mode 100644 doc/guides/rel_notes/release_2_3.rst
doc/guides/rel_notes/index.rst +1 -1
index 29013cf..84317b8 100644
@@ -36,7 +36,7 @@ Release Notes
     :numbered:
 
     rel_description
-    release_2_3
+    release_16_04
     release_2_2
     release_2_1
     release_2_0
doc/guides/rel_notes/release_16_04.rst new file +138 -0

138 lines not on this page · raw message

doc/guides/rel_notes/release_2_3.rst deleted +0 -138

138 lines not on this page · raw message

Signature · 1 line
2.5.0
#13 lore raw

Re: [PATCH v3 1/2] version: switch to year/month version numbers

In reply to John McNamara
Quoted 14 lines

-----Original Message-----
From: Mcnamara, John
Sent: Wednesday, February 10, 2016 5:02 PM
To: [email protected]
Cc: [email protected]; Richardson, Bruce <[email protected]>; Mcnamara, John <[email protected]>
Subject: [PATCH v3 1/2] version: switch to year/month version numbers

drivers/net/nfp/nfp_net.c index renamed from drivers/net/nfp/nfp_net.c +0 -0

ffa5730..fd4dd39 100644

drivers/net/nfp/nfp_net.c nfp_net_infos_get(struct rte_eth_dev *dev, struct · line 1075

Quoted 8 lines
drivers/net/nfp/nfp_net.c +0 -2
@@ -1070,9 +1070,7 @@ nfp_net_infos_get(struct rte_eth_dev *dev, struct
 rte_eth_dev_info *dev_info)
 	};
 
 	dev_info->reta_size = NFP_NET_CFG_RSS_ITBL_SZ; 
-#if RTE_VER_MAJOR == 2 && RTE_VER_MINOR >= 1
 	dev_info->hash_key_size = NFP_NET_CFG_RSS_KEY_SZ;
-#endif  }
 

Hi Alejandro,

Please note the above change to the nfp_net.c code due to the name change in the version macro names.

I was originally going to change it to this:

    #if RTE_VER_YEAR == 2 && RTE_VER_MONTH >= 1
        dev_info->hash_key_size = NFP_NET_CFG_RSS_KEY_SZ;
    #endif

Or better:

    #if RTE_VERSION >= 0x02010000
        dev_info->hash_key_size = NFP_NET_CFG_RSS_KEY_SZ;
    #endif

However, since the code was added in DPDK 2.2 the version check doesn't seem necessary, so I removed it. If you need it back in for some reason let me know.

John

#14 lore raw

Re: [PATCH v3 1/2] version: switch to year/month version numbers

2016-02-10 17:11, Mcnamara, John:

Quoted 12 lines

Hi Alejandro,

Please note the above change to the nfp_net.c code due to the name change in the version macro names.

I was originally going to change it to this:

    #if RTE_VER_YEAR == 2 && RTE_VER_MONTH >= 1
        dev_info->hash_key_size = NFP_NET_CFG_RSS_KEY_SZ;
    #endif
Quoted 5 lines

Or better:

    #if RTE_VERSION >= 0x02010000
        dev_info->hash_key_size = NFP_NET_CFG_RSS_KEY_SZ;
    #endif

Or better:

	#if RTE_VERSION >= RTE_VERSION_NUM(2,1,0,0)
Quoted 2 lines

However, since the code was added in DPDK 2.2 the version check doesn't seem necessary, so I removed it. If you need it back in for some reason let me know.

A version check is needed for external applications or external drivers. It should not exist in the git tree.

Acked-by on v3 1/2
#15 lore raw

Re: [PATCH v3 1/2] version: switch to year/month version numbers

In reply to John McNamara

2016-02-10 17:02, John McNamara:

Quoted 5 lines

From: "Richardson, Bruce" <[email protected]>

As discussed on list, switch numbering scheme to be based on year/month. Release 2.3 then becomes 16.04.

Quoted 7 lines
    Ref: http://dpdk.org/ml/archives/dev/2015-December/030336.html

Also, added zero padding to the month so that it appear as 16.04 and not 16.4 in "make showversion" and rte_version().

Series applied, thanks