patches for DPDK stable branches
 help / color / mirror / Atom feed
* Re: [dpdk-stable] [dpdk-dev] [PATCH 4/4] net/bnx2x: solve overruns
       [not found] ` <152600349254.53624.4703994482576123777.stgit@localhost.localdomain>
@ 2018-05-11 16:21   ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 5+ messages in thread
From: De Lara Guarch, Pablo @ 2018-05-11 16:21 UTC (permalink / raw)
  To: Andy Green, dev; +Cc: stable



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Andy Green
> Sent: Friday, May 11, 2018 2:52 AM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH 4/4] net/bnx2x: solve overruns
> 
As Ferruh said, Signed-off-by is missing, plus fixes line and Cc stable

Fixes: 540a211084a7 ("bnx2x: driver core")
Cc: stable@dpdk.org

Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

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

* Re: [dpdk-stable] [dpdk-dev] [PATCH 2/4] net/bnx2x: remove unmeetable comparison
       [not found] ` <152600348247.53624.13691884496521997911.stgit@localhost.localdomain>
@ 2018-05-11 16:32   ` De Lara Guarch, Pablo
  2018-05-11 18:10     ` Stephen Hemminger
  0 siblings, 1 reply; 5+ messages in thread
From: De Lara Guarch, Pablo @ 2018-05-11 16:32 UTC (permalink / raw)
  To: Andy Green, dev; +Cc: Patil, Harish, Mody, Rasesh, Stephen Hemminger, stable



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Andy Green
> Sent: Friday, May 11, 2018 2:51 AM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH 2/4] net/bnx2x: remove unmeetable comparison
> 
> /home/agreen/projects/dpdk/drivers/net/bnx2x/elink.c:
> In function ‘elink_check_kr2_wa’:
> /home/agreen/projects/dpdk/drivers/net/bnx2x/elink.c:12922:28:
> error: bitwise comparison always evaluates to false [-Werror=tautological-
> compare]
>         ((next_page & 0xe0) == 0x2))));
> ---
>  drivers/net/bnx2x/elink.c |    4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/net/bnx2x/elink.c b/drivers/net/bnx2x/elink.c index
> 99684a5f9..2aef2b6da 100644
> --- a/drivers/net/bnx2x/elink.c
> +++ b/drivers/net/bnx2x/elink.c
> @@ -12919,9 +12919,7 @@ static void elink_check_kr2_wa(struct elink_params
> *params,
>  	 * but only KX is advertised, declare this link partner as non-KR2
>  	 * device.
>  	 */
> -	not_kr2_device = (((base_page & 0x8000) == 0) ||
> -			  (((base_page & 0x8000) &&
> -			    ((next_page & 0xe0) == 0x2))));
> +	not_kr2_device = !(base_page & 0x8000);
> 
>  	/* In case KR2 is already disabled, check if we need to re-enable it */
>  	if (!(vars->link_attr_sync & LINK_ATTR_SYNC_KR2_ENABLE)) {

Looks like a good fix, but I wonder what's the actual intention of that conditional.
CC'ing the maintainers and Stephen Hemminger (the author of this code) to figure it out.

Apart from that, missing signed-off-by, fixes line and Cc stable:

Fixes: b5bf7719221d ("bnx2x: driver support routines")
Cc: stable@dpdk.org


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

* Re: [dpdk-stable] [dpdk-dev] [PATCH 1/4] net/bnx2x: do not cast function pointers as a policy
       [not found] ` <152600347742.53624.12860056818159426243.stgit@localhost.localdomain>
@ 2018-05-11 16:33   ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 5+ messages in thread
From: De Lara Guarch, Pablo @ 2018-05-11 16:33 UTC (permalink / raw)
  To: Andy Green, dev; +Cc: stable



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Andy Green
> Sent: Friday, May 11, 2018 2:51 AM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH 1/4] net/bnx2x: do not cast function pointers as a
> policy
> 
> This is stopping the compiler telling you when you have done something stupid...
> that is something none of us can afford...
> 
> Now gcc 8.x can tell you did something stupid despite trying to hide the
> evidence.
> 
> Remove all the "black magic" casts.
> 
> Fix the actual problems.
> ---
>  drivers/net/bnx2x/elink.c |  294 +++++++++++++++++++++++----------------------

Missing signed-off-by line, fixes line and Cc stable:

Fixes: b5bf7719221d ("bnx2x: driver support routines")
Cc: stable@dpdk.org


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

* Re: [dpdk-stable] [dpdk-dev] [PATCH 2/4] net/bnx2x: remove unmeetable comparison
  2018-05-11 16:32   ` [dpdk-stable] [dpdk-dev] [PATCH 2/4] net/bnx2x: remove unmeetable comparison De Lara Guarch, Pablo
@ 2018-05-11 18:10     ` Stephen Hemminger
  2018-05-12  1:04       ` Andy Green
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Hemminger @ 2018-05-11 18:10 UTC (permalink / raw)
  To: De Lara Guarch, Pablo
  Cc: Andy Green, dev, Patil, Harish, Mody, Rasesh, stable

On Fri, 11 May 2018 16:32:24 +0000
"De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com> wrote:

> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Andy Green
> > Sent: Friday, May 11, 2018 2:51 AM
> > To: dev@dpdk.org
> > Subject: [dpdk-dev] [PATCH 2/4] net/bnx2x: remove unmeetable comparison
> > 
> > /home/agreen/projects/dpdk/drivers/net/bnx2x/elink.c:
> > In function ‘elink_check_kr2_wa’:
> > /home/agreen/projects/dpdk/drivers/net/bnx2x/elink.c:12922:28:
> > error: bitwise comparison always evaluates to false [-Werror=tautological-
> > compare]
> >         ((next_page & 0xe0) == 0x2))));
> > ---
> >  drivers/net/bnx2x/elink.c |    4 +---
> >  1 file changed, 1 insertion(+), 3 deletions(-)
> > 
> > diff --git a/drivers/net/bnx2x/elink.c b/drivers/net/bnx2x/elink.c index
> > 99684a5f9..2aef2b6da 100644
> > --- a/drivers/net/bnx2x/elink.c
> > +++ b/drivers/net/bnx2x/elink.c
> > @@ -12919,9 +12919,7 @@ static void elink_check_kr2_wa(struct elink_params
> > *params,
> >  	 * but only KX is advertised, declare this link partner as non-KR2
> >  	 * device.
> >  	 */
> > -	not_kr2_device = (((base_page & 0x8000) == 0) ||
> > -			  (((base_page & 0x8000) &&
> > -			    ((next_page & 0xe0) == 0x2))));
> > +	not_kr2_device = !(base_page & 0x8000);
> > 
> >  	/* In case KR2 is already disabled, check if we need to re-enable it */
> >  	if (!(vars->link_attr_sync & LINK_ATTR_SYNC_KR2_ENABLE)) {  
> 
> Looks like a good fix, but I wonder what's the actual intention of that conditional.
> CC'ing the maintainers and Stephen Hemminger (the author of this code) to figure it out.
> 
> Apart from that, missing signed-off-by, fixes line and Cc stable:
> 
> Fixes: b5bf7719221d ("bnx2x: driver support routines")
> Cc: stable@dpdk.org
> 

Actually, I didn't write this. It came from contractors.  Based of FreeBSD
driver so look there.

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

* Re: [dpdk-stable] [dpdk-dev] [PATCH 2/4] net/bnx2x: remove unmeetable comparison
  2018-05-11 18:10     ` Stephen Hemminger
@ 2018-05-12  1:04       ` Andy Green
  0 siblings, 0 replies; 5+ messages in thread
From: Andy Green @ 2018-05-12  1:04 UTC (permalink / raw)
  To: Stephen Hemminger, De Lara Guarch, Pablo
  Cc: dev, Patil, Harish, Mody, Rasesh, stable



On 05/12/2018 02:10 AM, Stephen Hemminger wrote:
> On Fri, 11 May 2018 16:32:24 +0000
> "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com> wrote:
> 
>>> -----Original Message-----
>>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Andy Green
>>> Sent: Friday, May 11, 2018 2:51 AM
>>> To: dev@dpdk.org
>>> Subject: [dpdk-dev] [PATCH 2/4] net/bnx2x: remove unmeetable comparison
>>>
>>> /home/agreen/projects/dpdk/drivers/net/bnx2x/elink.c:
>>> In function ‘elink_check_kr2_wa’:
>>> /home/agreen/projects/dpdk/drivers/net/bnx2x/elink.c:12922:28:
>>> error: bitwise comparison always evaluates to false [-Werror=tautological-
>>> compare]
>>>          ((next_page & 0xe0) == 0x2))));
>>> ---
>>>   drivers/net/bnx2x/elink.c |    4 +---
>>>   1 file changed, 1 insertion(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/net/bnx2x/elink.c b/drivers/net/bnx2x/elink.c index
>>> 99684a5f9..2aef2b6da 100644
>>> --- a/drivers/net/bnx2x/elink.c
>>> +++ b/drivers/net/bnx2x/elink.c
>>> @@ -12919,9 +12919,7 @@ static void elink_check_kr2_wa(struct elink_params
>>> *params,
>>>   	 * but only KX is advertised, declare this link partner as non-KR2
>>>   	 * device.
>>>   	 */
>>> -	not_kr2_device = (((base_page & 0x8000) == 0) ||
>>> -			  (((base_page & 0x8000) &&
>>> -			    ((next_page & 0xe0) == 0x2))));
>>> +	not_kr2_device = !(base_page & 0x8000);
>>>
>>>   	/* In case KR2 is already disabled, check if we need to re-enable it */
>>>   	if (!(vars->link_attr_sync & LINK_ATTR_SYNC_KR2_ENABLE)) {
>>
>> Looks like a good fix, but I wonder what's the actual intention of that conditional.
>> CC'ing the maintainers and Stephen Hemminger (the author of this code) to figure it out.
>>
>> Apart from that, missing signed-off-by, fixes line and Cc stable:
>>
>> Fixes: b5bf7719221d ("bnx2x: driver support routines")
>> Cc: stable@dpdk.org
>>
> 
> Actually, I didn't write this. It came from contractors.  Based of FreeBSD
> driver so look there.

Googling around, the correct comparison is == 0x20, I updated the patch 
accordingly.

-Andy

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

end of thread, other threads:[~2018-05-12  1:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <152600339444.53624.14086407337377549776.stgit@localhost.localdomain>
     [not found] ` <152600349254.53624.4703994482576123777.stgit@localhost.localdomain>
2018-05-11 16:21   ` [dpdk-stable] [dpdk-dev] [PATCH 4/4] net/bnx2x: solve overruns De Lara Guarch, Pablo
     [not found] ` <152600348247.53624.13691884496521997911.stgit@localhost.localdomain>
2018-05-11 16:32   ` [dpdk-stable] [dpdk-dev] [PATCH 2/4] net/bnx2x: remove unmeetable comparison De Lara Guarch, Pablo
2018-05-11 18:10     ` Stephen Hemminger
2018-05-12  1:04       ` Andy Green
     [not found] ` <152600347742.53624.12860056818159426243.stgit@localhost.localdomain>
2018-05-11 16:33   ` [dpdk-stable] [dpdk-dev] [PATCH 1/4] net/bnx2x: do not cast function pointers as a policy De Lara Guarch, Pablo

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