Message ID | 20190405090535.7604-2-qi.z.zhang@intel.com (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | Ferruh Yigit |
Headers | show |
Series | This patch set supported new packet type | expand |
Context | Check | Description |
---|---|---|
ci/checkpatch | success | coding style OK |
ci/Intel-compilation | success | Compilation OK |
ci/intel-Performance-Testing | success | Performance Testing PASS |
ci/mellanox-Performance-Testing | success | Performance Testing PASS |
> -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Qi Zhang > Sent: Friday, April 5, 2019 10:06 AM > To: Yigit, Ferruh <ferruh.yigit@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; Iremonger, Bernard <bernard.iremonger@intel.com> > Cc: dev@dpdk.org; Yang, Qiming <qiming.yang@intel.com> > Subject: [dpdk-dev] [PATCH v5 1/5] ethdev: add VXLAN-GPE macro > > From: Qiming Yang <qiming.yang@intel.com> > > This patch added VXLAN-GPE macro in rte_eth_tunnel_type. > This patch will break the ABI, RTE_TUNNEL_TYPE_MAX will have > problem when running with new version of the ethdev shared > library. > > Signed-off-by: Qiming Yang <qiming.yang@intel.com> > --- > lib/librte_ethdev/rte_eth_ctrl.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/lib/librte_ethdev/rte_eth_ctrl.h b/lib/librte_ethdev/rte_eth_ctrl.h > index 5ea8ae24c..b3416341b 100644 > --- a/lib/librte_ethdev/rte_eth_ctrl.h > +++ b/lib/librte_ethdev/rte_eth_ctrl.h > @@ -229,6 +229,7 @@ enum rte_eth_tunnel_type { > RTE_TUNNEL_TYPE_NVGRE, > RTE_TUNNEL_TYPE_IP_IN_GRE, > RTE_L2_TUNNEL_TYPE_E_TAG, > + RTE_TUNNEL_TYPE_VXLAN_GPE, Not sure, why do you consider it as an ABI breakage? Konstantin > RTE_TUNNEL_TYPE_MAX, > }; > > -- > 2.13.6
On 4/5/2019 10:36 AM, Ananyev, Konstantin wrote: > > >> -----Original Message----- >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Qi Zhang >> Sent: Friday, April 5, 2019 10:06 AM >> To: Yigit, Ferruh <ferruh.yigit@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; Iremonger, Bernard <bernard.iremonger@intel.com> >> Cc: dev@dpdk.org; Yang, Qiming <qiming.yang@intel.com> >> Subject: [dpdk-dev] [PATCH v5 1/5] ethdev: add VXLAN-GPE macro >> >> From: Qiming Yang <qiming.yang@intel.com> >> >> This patch added VXLAN-GPE macro in rte_eth_tunnel_type. >> This patch will break the ABI, RTE_TUNNEL_TYPE_MAX will have >> problem when running with new version of the ethdev shared >> library. >> >> Signed-off-by: Qiming Yang <qiming.yang@intel.com> >> --- >> lib/librte_ethdev/rte_eth_ctrl.h | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/lib/librte_ethdev/rte_eth_ctrl.h b/lib/librte_ethdev/rte_eth_ctrl.h >> index 5ea8ae24c..b3416341b 100644 >> --- a/lib/librte_ethdev/rte_eth_ctrl.h >> +++ b/lib/librte_ethdev/rte_eth_ctrl.h >> @@ -229,6 +229,7 @@ enum rte_eth_tunnel_type { >> RTE_TUNNEL_TYPE_NVGRE, >> RTE_TUNNEL_TYPE_IP_IN_GRE, >> RTE_L2_TUNNEL_TYPE_E_TAG, >> + RTE_TUNNEL_TYPE_VXLAN_GPE, > > Not sure, why do you consider it as an ABI breakage? I think it is API breakage instead of ABI. This changes the value of the 'RTE_TUNNEL_TYPE_MAX' If the application is using the MAX enum item, with the new version of the ethdev the MAX value will be different and this can break the app. Like: app_function(..) { ret = lib_foo() if (ret == RTE_TUNNEL_TYPE_MAX) ret -1; } lib_foo(..) { return RTE_TUNNEL_TYPE_MAX; } When app compiled, MAX was '7' and app is comparing ret value against '7', but with new version of DPDK, 'lib_foo()' will return '8' instead. > Konstantin > >> RTE_TUNNEL_TYPE_MAX, >> }; >> >> -- >> 2.13.6 >
Hi, Sorry for not catching it before, but I was not Cc. Please use git send-email --to-cmd devtools/get-maintainer.sh 05/04/2019 11:42, Ferruh Yigit: > On 4/5/2019 10:36 AM, Ananyev, Konstantin wrote: > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Qi Zhang > >> From: Qiming Yang <qiming.yang@intel.com> > >> > >> This patch added VXLAN-GPE macro in rte_eth_tunnel_type. > >> This patch will break the ABI, RTE_TUNNEL_TYPE_MAX will have > >> problem when running with new version of the ethdev shared > >> library. > >> > >> Signed-off-by: Qiming Yang <qiming.yang@intel.com> > >> --- [...] > >> --- a/lib/librte_ethdev/rte_eth_ctrl.h > >> +++ b/lib/librte_ethdev/rte_eth_ctrl.h > >> @@ -229,6 +229,7 @@ enum rte_eth_tunnel_type { > >> RTE_TUNNEL_TYPE_NVGRE, > >> RTE_TUNNEL_TYPE_IP_IN_GRE, > >> RTE_L2_TUNNEL_TYPE_E_TAG, > >> + RTE_TUNNEL_TYPE_VXLAN_GPE, > > > > Not sure, why do you consider it as an ABI breakage? > > I think it is API breakage instead of ABI. > > This changes the value of the 'RTE_TUNNEL_TYPE_MAX' > If the application is using the MAX enum item, with the new version of the > ethdev the MAX value will be different and this can break the app. > > Like: > > app_function(..) { > ret = lib_foo() > if (ret == RTE_TUNNEL_TYPE_MAX) > ret -1; > } > > lib_foo(..) { > return RTE_TUNNEL_TYPE_MAX; > } > > > When app compiled, MAX was '7' and app is comparing ret value against '7', but > with new version of DPDK, 'lib_foo()' will return '8' instead. I would vote for ABI because it is a value change. Anyway, it must be noticed in the release notes. As we are already breaking ethdev ABI in this release, and it is a very basic change, I agree to accept it in 19.05. In future, we should make sure that such addition is possible without any breakage.
On 4/5/2019 11:37 AM, Thomas Monjalon wrote: > Hi, > > Sorry for not catching it before, but I was not Cc. > Please use git send-email --to-cmd devtools/get-maintainer.sh > > 05/04/2019 11:42, Ferruh Yigit: >> On 4/5/2019 10:36 AM, Ananyev, Konstantin wrote: >>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Qi Zhang >>>> From: Qiming Yang <qiming.yang@intel.com> >>>> >>>> This patch added VXLAN-GPE macro in rte_eth_tunnel_type. >>>> This patch will break the ABI, RTE_TUNNEL_TYPE_MAX will have >>>> problem when running with new version of the ethdev shared >>>> library. >>>> >>>> Signed-off-by: Qiming Yang <qiming.yang@intel.com> >>>> --- > [...] >>>> --- a/lib/librte_ethdev/rte_eth_ctrl.h >>>> +++ b/lib/librte_ethdev/rte_eth_ctrl.h >>>> @@ -229,6 +229,7 @@ enum rte_eth_tunnel_type { >>>> RTE_TUNNEL_TYPE_NVGRE, >>>> RTE_TUNNEL_TYPE_IP_IN_GRE, >>>> RTE_L2_TUNNEL_TYPE_E_TAG, >>>> + RTE_TUNNEL_TYPE_VXLAN_GPE, >>> >>> Not sure, why do you consider it as an ABI breakage? >> >> I think it is API breakage instead of ABI. >> >> This changes the value of the 'RTE_TUNNEL_TYPE_MAX' >> If the application is using the MAX enum item, with the new version of the >> ethdev the MAX value will be different and this can break the app. >> >> Like: >> >> app_function(..) { >> ret = lib_foo() >> if (ret == RTE_TUNNEL_TYPE_MAX) >> ret -1; >> } >> >> lib_foo(..) { >> return RTE_TUNNEL_TYPE_MAX; >> } >> >> >> When app compiled, MAX was '7' and app is comparing ret value against '7', but >> with new version of DPDK, 'lib_foo()' will return '8' instead. > > I would vote for ABI because it is a value change. > > Anyway, it must be noticed in the release notes. > > As we are already breaking ethdev ABI in this release, > and it is a very basic change, I agree to accept it in 19.05. +1 > > In future, we should make sure that such addition is possible > without any breakage. +1. Otherwise there is no escape from it and adding a new tunnel type shouldn't cause and ABI/API breakage.
diff --git a/lib/librte_ethdev/rte_eth_ctrl.h b/lib/librte_ethdev/rte_eth_ctrl.h index 5ea8ae24c..b3416341b 100644 --- a/lib/librte_ethdev/rte_eth_ctrl.h +++ b/lib/librte_ethdev/rte_eth_ctrl.h @@ -229,6 +229,7 @@ enum rte_eth_tunnel_type { RTE_TUNNEL_TYPE_NVGRE, RTE_TUNNEL_TYPE_IP_IN_GRE, RTE_L2_TUNNEL_TYPE_E_TAG, + RTE_TUNNEL_TYPE_VXLAN_GPE, RTE_TUNNEL_TYPE_MAX, };