DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] mbuf: remove unused next member
@ 2020-06-09  5:29 Xiaolong Ye
  2020-06-09  7:12 ` [dpdk-dev] [PATCH v2] mbuf: remove unused next member in dyn flag/field Xiaolong Ye
  2020-06-09  7:17 ` [dpdk-dev] [PATCH] mbuf: remove unused next member Olivier Matz
  0 siblings, 2 replies; 7+ messages in thread
From: Xiaolong Ye @ 2020-06-09  5:29 UTC (permalink / raw)
  To: Olivier Matz, Konstantin Ananyev, Thomas Monjalon
  Cc: dev, haiyue.wang, Xiaolong Ye, stable

TAILQ_ENTRY next is not needed in struct mbuf_dynfield_elt and
mbuf_dynflag_elt, since they are actually chained by rte_tailq_entry's
next field when calling TAILQ_INSERT_TAIL(mbuf_dynfield/dynflag_list, te,
next).

Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")
Cc: stable@dpdk.org

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
---

I found this issue when reading the mbuf dynfiled/dynflag feature code,
mbuf_autotest is passed with this change, though I may miss something or
this filed has some special design purpose, please correct me if I am
wrong.

 lib/librte_mbuf/rte_mbuf_dyn.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/librte_mbuf/rte_mbuf_dyn.c b/lib/librte_mbuf/rte_mbuf_dyn.c
index d6931f847..953e3ec31 100644
--- a/lib/librte_mbuf/rte_mbuf_dyn.c
+++ b/lib/librte_mbuf/rte_mbuf_dyn.c
@@ -19,7 +19,6 @@
 #define RTE_MBUF_DYN_MZNAME "rte_mbuf_dyn"
 
 struct mbuf_dynfield_elt {
-	TAILQ_ENTRY(mbuf_dynfield_elt) next;
 	struct rte_mbuf_dynfield params;
 	size_t offset;
 };
@@ -31,7 +30,6 @@ static struct rte_tailq_elem mbuf_dynfield_tailq = {
 EAL_REGISTER_TAILQ(mbuf_dynfield_tailq);
 
 struct mbuf_dynflag_elt {
-	TAILQ_ENTRY(mbuf_dynflag_elt) next;
 	struct rte_mbuf_dynflag params;
 	unsigned int bitnum;
 };
-- 
2.17.1


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

* [dpdk-dev] [PATCH v2] mbuf: remove unused next member in dyn flag/field
  2020-06-09  5:29 [dpdk-dev] [PATCH] mbuf: remove unused next member Xiaolong Ye
@ 2020-06-09  7:12 ` Xiaolong Ye
  2020-06-11  7:42   ` Thomas Monjalon
  2020-06-09  7:17 ` [dpdk-dev] [PATCH] mbuf: remove unused next member Olivier Matz
  1 sibling, 1 reply; 7+ messages in thread
From: Xiaolong Ye @ 2020-06-09  7:12 UTC (permalink / raw)
  To: Olivier Matz, Thomas Monjalon, Konstantin Ananyev
  Cc: dev, haiyue.wang, Xiaolong Ye, stable

TAILQ_ENTRY next is not needed in struct mbuf_dynfield_elt and
mbuf_dynflag_elt, since they are actually chained by rte_tailq_entry's
next field when calling TAILQ_INSERT_TAIL(mbuf_dynfield/dynflag_list, te,
next).

Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")
Cc: stable@dpdk.org

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---

V2: update subject as Olivier suggested.

 lib/librte_mbuf/rte_mbuf_dyn.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/librte_mbuf/rte_mbuf_dyn.c b/lib/librte_mbuf/rte_mbuf_dyn.c
index d6931f847..953e3ec31 100644
--- a/lib/librte_mbuf/rte_mbuf_dyn.c
+++ b/lib/librte_mbuf/rte_mbuf_dyn.c
@@ -19,7 +19,6 @@
 #define RTE_MBUF_DYN_MZNAME "rte_mbuf_dyn"
 
 struct mbuf_dynfield_elt {
-	TAILQ_ENTRY(mbuf_dynfield_elt) next;
 	struct rte_mbuf_dynfield params;
 	size_t offset;
 };
@@ -31,7 +30,6 @@ static struct rte_tailq_elem mbuf_dynfield_tailq = {
 EAL_REGISTER_TAILQ(mbuf_dynfield_tailq);
 
 struct mbuf_dynflag_elt {
-	TAILQ_ENTRY(mbuf_dynflag_elt) next;
 	struct rte_mbuf_dynflag params;
 	unsigned int bitnum;
 };
-- 
2.17.1


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

* Re: [dpdk-dev] [PATCH] mbuf: remove unused next member
  2020-06-09  7:17 ` [dpdk-dev] [PATCH] mbuf: remove unused next member Olivier Matz
@ 2020-06-09  7:15   ` Ye Xiaolong
  2020-06-09 15:29     ` Stephen Hemminger
  0 siblings, 1 reply; 7+ messages in thread
From: Ye Xiaolong @ 2020-06-09  7:15 UTC (permalink / raw)
  To: Olivier Matz
  Cc: Konstantin Ananyev, Thomas Monjalon, dev, haiyue.wang, stable

On 06/09, Olivier Matz wrote:
>Hi Xialong,
>
>On Tue, Jun 09, 2020 at 01:29:55PM +0800, Xiaolong Ye wrote:
>> TAILQ_ENTRY next is not needed in struct mbuf_dynfield_elt and
>> mbuf_dynflag_elt, since they are actually chained by rte_tailq_entry's
>> next field when calling TAILQ_INSERT_TAIL(mbuf_dynfield/dynflag_list, te,
>> next).
>> 
>> Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")
>> Cc: stable@dpdk.org
>> 
>> Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
>
>Good catch, I forgot to remove this field which was used in former
>implementations. Thanks!
>
>I suggest to update the title to highlight it's about dynamic mbuf:
>  mbuf: remove unused next member in dyn flag/field
>
>Apart from this:
>Acked-by: Olivier Matz <olivier.matz@6wind.com>

Thanks for the ack, I'll submit V2 with suggested subject.

Thanks,
Xiaolong

>
>> ---
>> 
>> I found this issue when reading the mbuf dynfiled/dynflag feature code,
>> mbuf_autotest is passed with this change, though I may miss something or
>> this filed has some special design purpose, please correct me if I am
>> wrong.
>> 
>>  lib/librte_mbuf/rte_mbuf_dyn.c | 2 --
>>  1 file changed, 2 deletions(-)
>> 
>> diff --git a/lib/librte_mbuf/rte_mbuf_dyn.c b/lib/librte_mbuf/rte_mbuf_dyn.c
>> index d6931f847..953e3ec31 100644
>> --- a/lib/librte_mbuf/rte_mbuf_dyn.c
>> +++ b/lib/librte_mbuf/rte_mbuf_dyn.c
>> @@ -19,7 +19,6 @@
>>  #define RTE_MBUF_DYN_MZNAME "rte_mbuf_dyn"
>>  
>>  struct mbuf_dynfield_elt {
>> -	TAILQ_ENTRY(mbuf_dynfield_elt) next;
>>  	struct rte_mbuf_dynfield params;
>>  	size_t offset;
>>  };
>> @@ -31,7 +30,6 @@ static struct rte_tailq_elem mbuf_dynfield_tailq = {
>>  EAL_REGISTER_TAILQ(mbuf_dynfield_tailq);
>>  
>>  struct mbuf_dynflag_elt {
>> -	TAILQ_ENTRY(mbuf_dynflag_elt) next;
>>  	struct rte_mbuf_dynflag params;
>>  	unsigned int bitnum;
>>  };
>> -- 
>> 2.17.1
>> 

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

* Re: [dpdk-dev] [PATCH] mbuf: remove unused next member
  2020-06-09  5:29 [dpdk-dev] [PATCH] mbuf: remove unused next member Xiaolong Ye
  2020-06-09  7:12 ` [dpdk-dev] [PATCH v2] mbuf: remove unused next member in dyn flag/field Xiaolong Ye
@ 2020-06-09  7:17 ` Olivier Matz
  2020-06-09  7:15   ` Ye Xiaolong
  1 sibling, 1 reply; 7+ messages in thread
From: Olivier Matz @ 2020-06-09  7:17 UTC (permalink / raw)
  To: Xiaolong Ye; +Cc: Konstantin Ananyev, Thomas Monjalon, dev, haiyue.wang, stable

Hi Xialong,

On Tue, Jun 09, 2020 at 01:29:55PM +0800, Xiaolong Ye wrote:
> TAILQ_ENTRY next is not needed in struct mbuf_dynfield_elt and
> mbuf_dynflag_elt, since they are actually chained by rte_tailq_entry's
> next field when calling TAILQ_INSERT_TAIL(mbuf_dynfield/dynflag_list, te,
> next).
> 
> Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>

Good catch, I forgot to remove this field which was used in former
implementations. Thanks!

I suggest to update the title to highlight it's about dynamic mbuf:
  mbuf: remove unused next member in dyn flag/field

Apart from this:
Acked-by: Olivier Matz <olivier.matz@6wind.com>

> ---
> 
> I found this issue when reading the mbuf dynfiled/dynflag feature code,
> mbuf_autotest is passed with this change, though I may miss something or
> this filed has some special design purpose, please correct me if I am
> wrong.
> 
>  lib/librte_mbuf/rte_mbuf_dyn.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/lib/librte_mbuf/rte_mbuf_dyn.c b/lib/librte_mbuf/rte_mbuf_dyn.c
> index d6931f847..953e3ec31 100644
> --- a/lib/librte_mbuf/rte_mbuf_dyn.c
> +++ b/lib/librte_mbuf/rte_mbuf_dyn.c
> @@ -19,7 +19,6 @@
>  #define RTE_MBUF_DYN_MZNAME "rte_mbuf_dyn"
>  
>  struct mbuf_dynfield_elt {
> -	TAILQ_ENTRY(mbuf_dynfield_elt) next;
>  	struct rte_mbuf_dynfield params;
>  	size_t offset;
>  };
> @@ -31,7 +30,6 @@ static struct rte_tailq_elem mbuf_dynfield_tailq = {
>  EAL_REGISTER_TAILQ(mbuf_dynfield_tailq);
>  
>  struct mbuf_dynflag_elt {
> -	TAILQ_ENTRY(mbuf_dynflag_elt) next;
>  	struct rte_mbuf_dynflag params;
>  	unsigned int bitnum;
>  };
> -- 
> 2.17.1
> 

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

* Re: [dpdk-dev] [PATCH] mbuf: remove unused next member
  2020-06-09  7:15   ` Ye Xiaolong
@ 2020-06-09 15:29     ` Stephen Hemminger
  2020-06-10  0:54       ` Ye Xiaolong
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Hemminger @ 2020-06-09 15:29 UTC (permalink / raw)
  To: Ye Xiaolong
  Cc: Olivier Matz, Konstantin Ananyev, Thomas Monjalon, dev,
	haiyue.wang, stable

On Tue, 9 Jun 2020 15:15:33 +0800
Ye Xiaolong <xiaolong.ye@intel.com> wrote:

> On 06/09, Olivier Matz wrote:
> >Hi Xialong,
> >
> >On Tue, Jun 09, 2020 at 01:29:55PM +0800, Xiaolong Ye wrote:  
> >> TAILQ_ENTRY next is not needed in struct mbuf_dynfield_elt and
> >> mbuf_dynflag_elt, since they are actually chained by rte_tailq_entry's
> >> next field when calling TAILQ_INSERT_TAIL(mbuf_dynfield/dynflag_list, te,
> >> next).
> >> 
> >> Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")
> >> Cc: stable@dpdk.org
> >> 
> >> Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>  
> >
> >Good catch, I forgot to remove this field which was used in former
> >implementations. Thanks!
> >
> >I suggest to update the title to highlight it's about dynamic mbuf:
> >  mbuf: remove unused next member in dyn flag/field
> >
> >Apart from this:
> >Acked-by: Olivier Matz <olivier.matz@6wind.com>  
> 
> Thanks for the ack, I'll submit V2 with suggested subject.
> 
> Thanks,
> Xiaolong

Is the field visible in ABI?

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

* Re: [dpdk-dev] [PATCH] mbuf: remove unused next member
  2020-06-09 15:29     ` Stephen Hemminger
@ 2020-06-10  0:54       ` Ye Xiaolong
  0 siblings, 0 replies; 7+ messages in thread
From: Ye Xiaolong @ 2020-06-10  0:54 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Olivier Matz, Konstantin Ananyev, Thomas Monjalon, dev,
	haiyue.wang, stable

On 06/09, Stephen Hemminger wrote:
>On Tue, 9 Jun 2020 15:15:33 +0800
>Ye Xiaolong <xiaolong.ye@intel.com> wrote:
>
>> On 06/09, Olivier Matz wrote:
>> >Hi Xialong,
>> >
>> >On Tue, Jun 09, 2020 at 01:29:55PM +0800, Xiaolong Ye wrote:  
>> >> TAILQ_ENTRY next is not needed in struct mbuf_dynfield_elt and
>> >> mbuf_dynflag_elt, since they are actually chained by rte_tailq_entry's
>> >> next field when calling TAILQ_INSERT_TAIL(mbuf_dynfield/dynflag_list, te,
>> >> next).
>> >> 
>> >> Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")
>> >> Cc: stable@dpdk.org
>> >> 
>> >> Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>  
>> >
>> >Good catch, I forgot to remove this field which was used in former
>> >implementations. Thanks!
>> >
>> >I suggest to update the title to highlight it's about dynamic mbuf:
>> >  mbuf: remove unused next member in dyn flag/field
>> >
>> >Apart from this:
>> >Acked-by: Olivier Matz <olivier.matz@6wind.com>  
>> 
>> Thanks for the ack, I'll submit V2 with suggested subject.
>> 
>> Thanks,
>> Xiaolong
>
>Is the field visible in ABI?

I don't think so, the touched structs in this patch mbuf_dynfield_elt and
mbuf_dynflag_elt are internal structures used in rte_mbuf_dyn.c, and structures
exposed to user are struct rte_mbuf_dynfield and rte_mbuf_dynflag in
rte_mbuf_dyn.h, and they still keep the same as before, so there should be no
ABI break in this patch.

Thanks,
Xiaolong

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

* Re: [dpdk-dev] [PATCH v2] mbuf: remove unused next member in dyn flag/field
  2020-06-09  7:12 ` [dpdk-dev] [PATCH v2] mbuf: remove unused next member in dyn flag/field Xiaolong Ye
@ 2020-06-11  7:42   ` Thomas Monjalon
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Monjalon @ 2020-06-11  7:42 UTC (permalink / raw)
  To: Xiaolong Ye; +Cc: Olivier Matz, Konstantin Ananyev, dev, haiyue.wang, stable

09/06/2020 09:12, Xiaolong Ye:
> TAILQ_ENTRY next is not needed in struct mbuf_dynfield_elt and
> mbuf_dynflag_elt, since they are actually chained by rte_tailq_entry's
> next field when calling TAILQ_INSERT_TAIL(mbuf_dynfield/dynflag_list, te,
> next).
> 
> Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
> Acked-by: Olivier Matz <olivier.matz@6wind.com>

Applied, thanks



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

end of thread, other threads:[~2020-06-11  7:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-09  5:29 [dpdk-dev] [PATCH] mbuf: remove unused next member Xiaolong Ye
2020-06-09  7:12 ` [dpdk-dev] [PATCH v2] mbuf: remove unused next member in dyn flag/field Xiaolong Ye
2020-06-11  7:42   ` Thomas Monjalon
2020-06-09  7:17 ` [dpdk-dev] [PATCH] mbuf: remove unused next member Olivier Matz
2020-06-09  7:15   ` Ye Xiaolong
2020-06-09 15:29     ` Stephen Hemminger
2020-06-10  0:54       ` Ye Xiaolong

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