linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* bnx2: rx_fw_discards: BCM5716 sporadically drops packets when update to driver version 2.2.6
@ 2018-10-26  3:15 maowenan
  2018-10-29  2:15 ` maowenan
  2018-10-30  6:47 ` Mody, Rasesh
  0 siblings, 2 replies; 5+ messages in thread
From: maowenan @ 2018-10-26  3:15 UTC (permalink / raw)
  To: rasesh.mody, netdev, f.fainelli, andrew, linux-kernel

Hi,

After I update version of bnx2 driver from 2.2.1 to 2.2.6, I find BCM5716 sporadically drops packets, which
shows in rx_fw_discards.
C36-141-5:~ #  ethtool -S NIC0

NIC statistics:
     rx_ucast_packets: 11902

     rx_mcast_packets: 217

     rx_bcast_packets: 4954320

     rx_filtered_packets: 328793

     rx_fw_discards: 2742

C36-141-5:~ #

5s later:

C36-141-5:~ #  ethtool -S NIC0

NIC statistics:
     rx_ucast_packets: 11910

     rx_mcast_packets: 217

     rx_bcast_packets: 4958117

     rx_filtered_packets: 328897

     rx_fw_discards: 2750

C36-141-5:~ #

so rx_fw_discards: 2742-----> rx_fw_discards: 2750, lost 8 packets.

the information of bnx2
C36-141-5:~ # modinfo bnx2
kernel/drivers/net/ethernet/broadcom/bnx2.ko

firmware:       bnx2/bnx2-rv2p-09ax-6.0.17.fw

firmware:       bnx2/bnx2-rv2p-09-6.0.17.fw

firmware:       bnx2/bnx2-mips-09-6.2.1b.fw

firmware:       bnx2/bnx2-rv2p-06-6.0.15.fw

firmware:       bnx2/bnx2-mips-06-6.2.3.fw
version:        2.2.6


1) Firstly, I check the patches from 2.2.1 to 2.2.6, below patch is interesting.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0021850d0417a4dc38ed871d929b651b87e2ead9
Do not enable filter SORT MODE in chip init routine. This patch addresses an
issue where BCM5716 sporadically drops packets when changing multicast list.

diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c
index 8957eb5f4478..8c9a8b7787d2 100644
--- a/drivers/net/ethernet/broadcom/bnx2.c
+++ b/drivers/net/ethernet/broadcom/bnx2.c
@@ -4984,8 +4984,6 @@ bnx2_init_chip(struct bnx2 *bp)

 	bp->idle_chk_status_idx = 0xffff;

-	bp->rx_mode = BNX2_EMAC_RX_MODE_SORT_MODE;
-
 	/* Set up how to generate a link change interrupt. */
 	BNX2_WR(bp, BNX2_EMAC_ATTENTION_ENA, BNX2_EMAC_ATTENTION_ENA_LINK);


2) Secondly, I revert this patch, after verify it, I find rx_fw_discards does not increasing.
so I think this patch can fix current issue. But I'm not sure the issue of this patch to fix
will be reproduced?
I'm not convinced that what factor will trigger rx_fw_discards increasing?
And how to fix this?

Thanks a lot.













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

* Re: bnx2: rx_fw_discards: BCM5716 sporadically drops packets when update to driver version 2.2.6
  2018-10-26  3:15 bnx2: rx_fw_discards: BCM5716 sporadically drops packets when update to driver version 2.2.6 maowenan
@ 2018-10-29  2:15 ` maowenan
  2018-10-30  6:47 ` Mody, Rasesh
  1 sibling, 0 replies; 5+ messages in thread
From: maowenan @ 2018-10-29  2:15 UTC (permalink / raw)
  To: rasesh.mody, netdev, f.fainelli, andrew, linux-kernel

Could anyone give some clues to address count of rx_fw_discards increasing issue?


On 2018/10/26 11:15, maowenan wrote:
> Hi,
> 
> After I update version of bnx2 driver from 2.2.1 to 2.2.6, I find BCM5716 sporadically drops packets, which
> shows in rx_fw_discards.
> C36-141-5:~ #  ethtool -S NIC0
> 
> NIC statistics:
>      rx_ucast_packets: 11902
> 
>      rx_mcast_packets: 217
> 
>      rx_bcast_packets: 4954320
> 
>      rx_filtered_packets: 328793
> 
>      rx_fw_discards: 2742
> 
> C36-141-5:~ #
> 
> 5s later:
> 
> C36-141-5:~ #  ethtool -S NIC0
> 
> NIC statistics:
>      rx_ucast_packets: 11910
> 
>      rx_mcast_packets: 217
> 
>      rx_bcast_packets: 4958117
> 
>      rx_filtered_packets: 328897
> 
>      rx_fw_discards: 2750
> 
> C36-141-5:~ #
> 
> so rx_fw_discards: 2742-----> rx_fw_discards: 2750, lost 8 packets.
> 
> the information of bnx2
> C36-141-5:~ # modinfo bnx2
> kernel/drivers/net/ethernet/broadcom/bnx2.ko
> 
> firmware:       bnx2/bnx2-rv2p-09ax-6.0.17.fw
> 
> firmware:       bnx2/bnx2-rv2p-09-6.0.17.fw
> 
> firmware:       bnx2/bnx2-mips-09-6.2.1b.fw
> 
> firmware:       bnx2/bnx2-rv2p-06-6.0.15.fw
> 
> firmware:       bnx2/bnx2-mips-06-6.2.3.fw
> version:        2.2.6
> 
> 
> 1) Firstly, I check the patches from 2.2.1 to 2.2.6, below patch is interesting.
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0021850d0417a4dc38ed871d929b651b87e2ead9
> Do not enable filter SORT MODE in chip init routine. This patch addresses an
> issue where BCM5716 sporadically drops packets when changing multicast list.
> 
> diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c
> index 8957eb5f4478..8c9a8b7787d2 100644
> --- a/drivers/net/ethernet/broadcom/bnx2.c
> +++ b/drivers/net/ethernet/broadcom/bnx2.c
> @@ -4984,8 +4984,6 @@ bnx2_init_chip(struct bnx2 *bp)
> 
>  	bp->idle_chk_status_idx = 0xffff;
> 
> -	bp->rx_mode = BNX2_EMAC_RX_MODE_SORT_MODE;
> -
>  	/* Set up how to generate a link change interrupt. */
>  	BNX2_WR(bp, BNX2_EMAC_ATTENTION_ENA, BNX2_EMAC_ATTENTION_ENA_LINK);
> 
> 
> 2) Secondly, I revert this patch, after verify it, I find rx_fw_discards does not increasing.
> so I think this patch can fix current issue. But I'm not sure the issue of this patch to fix
> will be reproduced?
> I'm not convinced that what factor will trigger rx_fw_discards increasing?
> And how to fix this?
> 
> Thanks a lot.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> .
> 


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

* RE: bnx2: rx_fw_discards: BCM5716 sporadically drops packets when update to driver version 2.2.6
  2018-10-26  3:15 bnx2: rx_fw_discards: BCM5716 sporadically drops packets when update to driver version 2.2.6 maowenan
  2018-10-29  2:15 ` maowenan
@ 2018-10-30  6:47 ` Mody, Rasesh
  2018-10-30  9:03   ` maowenan
  1 sibling, 1 reply; 5+ messages in thread
From: Mody, Rasesh @ 2018-10-30  6:47 UTC (permalink / raw)
  To: maowenan, netdev, f.fainelli, andrew, linux-kernel; +Cc: Rahman, Ameen

>From: maowenan <maowenan@huawei.com>
>Sent: Thursday, October 25, 2018 8:16 PM
>
>Hi,
>
>After I update version of bnx2 driver from 2.2.1 to 2.2.6, I find BCM5716
>sporadically drops packets, which shows in rx_fw_discards.
>C36-141-5:~ #  ethtool -S NIC0
>
>NIC statistics:
>     rx_ucast_packets: 11902
>
>     rx_mcast_packets: 217
>
>     rx_bcast_packets: 4954320
>
>     rx_filtered_packets: 328793
>
>     rx_fw_discards: 2742
>
>C36-141-5:~ #
>
>5s later:
>
>C36-141-5:~ #  ethtool -S NIC0
>
>NIC statistics:
>     rx_ucast_packets: 11910
>
>     rx_mcast_packets: 217
>
>     rx_bcast_packets: 4958117
>
>     rx_filtered_packets: 328897
>
>     rx_fw_discards: 2750
>
>C36-141-5:~ #
>
>so rx_fw_discards: 2742-----> rx_fw_discards: 2750, lost 8 packets.
>
>the information of bnx2
>C36-141-5:~ # modinfo bnx2
>kernel/drivers/net/ethernet/broadcom/bnx2.ko
>
>firmware:       bnx2/bnx2-rv2p-09ax-6.0.17.fw
>
>firmware:       bnx2/bnx2-rv2p-09-6.0.17.fw
>
>firmware:       bnx2/bnx2-mips-09-6.2.1b.fw
>
>firmware:       bnx2/bnx2-rv2p-06-6.0.15.fw
>
>firmware:       bnx2/bnx2-mips-06-6.2.3.fw
>version:        2.2.6
>
>
>1) Firstly, I check the patches from 2.2.1 to 2.2.6, below patch is interesting.
>https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id
>=0021850d0417a4dc38ed871d929b651b87e2ead9
>Do not enable filter SORT MODE in chip init routine. This patch addresses an
>issue where BCM5716 sporadically drops packets when changing multicast list.
>
>diff --git a/drivers/net/ethernet/broadcom/bnx2.c
>b/drivers/net/ethernet/broadcom/bnx2.c
>index 8957eb5f4478..8c9a8b7787d2 100644
>--- a/drivers/net/ethernet/broadcom/bnx2.c
>+++ b/drivers/net/ethernet/broadcom/bnx2.c
>@@ -4984,8 +4984,6 @@ bnx2_init_chip(struct bnx2 *bp)
>
>        bp->idle_chk_status_idx = 0xffff;
>
>-       bp->rx_mode = BNX2_EMAC_RX_MODE_SORT_MODE;
>-
>        /* Set up how to generate a link change interrupt. */
>        BNX2_WR(bp, BNX2_EMAC_ATTENTION_ENA,
>BNX2_EMAC_ATTENTION_ENA_LINK);
>
>
>2) Secondly, I revert this patch, after verify it, I find rx_fw_discards does not
>increasing.
>so I think this patch can fix current issue. But I'm not sure the issue of this
>patch to fix will be reproduced?
>I'm not convinced that what factor will trigger rx_fw_discards increasing?
>And how to fix this?

Can you please reword your point above? i.e. what is working and what is not. I am not sure if I understand it completely.

Is the rx_fw_disacard count incrementing with 2.2.6 upstream driver on BCM5716? What is the kernel version?
Which test is being run?

>
>Thanks a lot.
>
>
>
>
>
>
>
>
>
>
>


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

* Re: bnx2: rx_fw_discards: BCM5716 sporadically drops packets when update to driver version 2.2.6
  2018-10-30  6:47 ` Mody, Rasesh
@ 2018-10-30  9:03   ` maowenan
  2018-11-02  6:14     ` maowenan
  0 siblings, 1 reply; 5+ messages in thread
From: maowenan @ 2018-10-30  9:03 UTC (permalink / raw)
  To: Mody, Rasesh, netdev, f.fainelli, andrew, linux-kernel; +Cc: Rahman, Ameen



On 2018/10/30 14:47, Mody, Rasesh wrote:
>> From: maowenan <maowenan@huawei.com>
>> Sent: Thursday, October 25, 2018 8:16 PM
>>
>> Hi,
>>
>> After I update version of bnx2 driver from 2.2.1 to 2.2.6, I find BCM5716
>> sporadically drops packets, which shows in rx_fw_discards.
>> C36-141-5:~ #  ethtool -S NIC0
>>
>> NIC statistics:
>>     rx_ucast_packets: 11902
>>
>>     rx_mcast_packets: 217
>>
>>     rx_bcast_packets: 4954320
>>
>>     rx_filtered_packets: 328793
>>
>>     rx_fw_discards: 2742
>>
>> C36-141-5:~ #
>>
>> 5s later:
>>
>> C36-141-5:~ #  ethtool -S NIC0
>>
>> NIC statistics:
>>     rx_ucast_packets: 11910
>>
>>     rx_mcast_packets: 217
>>
>>     rx_bcast_packets: 4958117
>>
>>     rx_filtered_packets: 328897
>>
>>     rx_fw_discards: 2750
>>
>> C36-141-5:~ #
>>
>> so rx_fw_discards: 2742-----> rx_fw_discards: 2750, lost 8 packets.
>>
>> the information of bnx2
>> C36-141-5:~ # modinfo bnx2
>> kernel/drivers/net/ethernet/broadcom/bnx2.ko
>>
>> firmware:       bnx2/bnx2-rv2p-09ax-6.0.17.fw
>>
>> firmware:       bnx2/bnx2-rv2p-09-6.0.17.fw
>>
>> firmware:       bnx2/bnx2-mips-09-6.2.1b.fw
>>
>> firmware:       bnx2/bnx2-rv2p-06-6.0.15.fw
>>
>> firmware:       bnx2/bnx2-mips-06-6.2.3.fw
>> version:        2.2.6
>>
>>
>> 1) Firstly, I check the patches from 2.2.1 to 2.2.6, below patch is interesting.
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id
>> =0021850d0417a4dc38ed871d929b651b87e2ead9
>> Do not enable filter SORT MODE in chip init routine. This patch addresses an
>> issue where BCM5716 sporadically drops packets when changing multicast list.
>>
>> diff --git a/drivers/net/ethernet/broadcom/bnx2.c
>> b/drivers/net/ethernet/broadcom/bnx2.c
>> index 8957eb5f4478..8c9a8b7787d2 100644
>> --- a/drivers/net/ethernet/broadcom/bnx2.c
>> +++ b/drivers/net/ethernet/broadcom/bnx2.c
>> @@ -4984,8 +4984,6 @@ bnx2_init_chip(struct bnx2 *bp)
>>
>>        bp->idle_chk_status_idx = 0xffff;
>>
>> -       bp->rx_mode = BNX2_EMAC_RX_MODE_SORT_MODE;
>> -
>>        /* Set up how to generate a link change interrupt. */
>>        BNX2_WR(bp, BNX2_EMAC_ATTENTION_ENA,
>> BNX2_EMAC_ATTENTION_ENA_LINK);
>>
>>
>> 2) Secondly, I revert this patch, after verify it, I find rx_fw_discards does not
>> increasing.
>> so I think this patch can fix current issue. But I'm not sure the issue of this
>> patch to fix will be reproduced?
>> I'm not convinced that what factor will trigger rx_fw_discards increasing?
>> And how to fix this?
> 
> Can you please reword your point above? i.e. what is working and what is not. I am not sure if I understand it completely.
> 
> Is the rx_fw_disacard count incrementing with 2.2.6 upstream driver on BCM5716? What is the kernel version?
> Which test is being run?


The case is based on BCM5716's driver version of 2.2.6, and both 3.10 and mainline kernel version exist this issue .
The testing seems like using one port of BCM5716 to receive packets, it can be found rx_fw_disacard increasing occasionally.
There is one patch in 2.2.6, 0021850d0417a4dc38ed871d929b651b87e2ead9, if I remove this patch, I can't reproduce this issue,
rx_fw_disacard doesn't increase.
So I don't know why this patch(0021850d0417a4dc38ed871d929b651b87e2ead9) can fix my problem(rx_fw_disacard increasing)?
If I remove this patch, how to fix the issue that the patch had resolved?

> 
>>
>> Thanks a lot.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
> 


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

* Re: bnx2: rx_fw_discards: BCM5716 sporadically drops packets when update to driver version 2.2.6
  2018-10-30  9:03   ` maowenan
@ 2018-11-02  6:14     ` maowenan
  0 siblings, 0 replies; 5+ messages in thread
From: maowenan @ 2018-11-02  6:14 UTC (permalink / raw)
  To: Mody, Rasesh, netdev, f.fainelli, andrew, linux-kernel
  Cc: Rahman, Ameen, maowenan

@Mody, Rasesh

Could you help take a look at this?

On 2018/10/30 17:03, maowenan wrote:
> 
> 
> On 2018/10/30 14:47, Mody, Rasesh wrote:
>>> From: maowenan <maowenan@huawei.com>
>>> Sent: Thursday, October 25, 2018 8:16 PM
>>>
>>> Hi,
>>>
>>> After I update version of bnx2 driver from 2.2.1 to 2.2.6, I find BCM5716
>>> sporadically drops packets, which shows in rx_fw_discards.
>>> C36-141-5:~ #  ethtool -S NIC0
>>>
>>> NIC statistics:
>>>     rx_ucast_packets: 11902
>>>
>>>     rx_mcast_packets: 217
>>>
>>>     rx_bcast_packets: 4954320
>>>
>>>     rx_filtered_packets: 328793
>>>
>>>     rx_fw_discards: 2742
>>>
>>> C36-141-5:~ #
>>>
>>> 5s later:
>>>
>>> C36-141-5:~ #  ethtool -S NIC0
>>>
>>> NIC statistics:
>>>     rx_ucast_packets: 11910
>>>
>>>     rx_mcast_packets: 217
>>>
>>>     rx_bcast_packets: 4958117
>>>
>>>     rx_filtered_packets: 328897
>>>
>>>     rx_fw_discards: 2750
>>>
>>> C36-141-5:~ #
>>>
>>> so rx_fw_discards: 2742-----> rx_fw_discards: 2750, lost 8 packets.
>>>
>>> the information of bnx2
>>> C36-141-5:~ # modinfo bnx2
>>> kernel/drivers/net/ethernet/broadcom/bnx2.ko
>>>
>>> firmware:       bnx2/bnx2-rv2p-09ax-6.0.17.fw
>>>
>>> firmware:       bnx2/bnx2-rv2p-09-6.0.17.fw
>>>
>>> firmware:       bnx2/bnx2-mips-09-6.2.1b.fw
>>>
>>> firmware:       bnx2/bnx2-rv2p-06-6.0.15.fw
>>>
>>> firmware:       bnx2/bnx2-mips-06-6.2.3.fw
>>> version:        2.2.6
>>>
>>>
>>> 1) Firstly, I check the patches from 2.2.1 to 2.2.6, below patch is interesting.
>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id
>>> =0021850d0417a4dc38ed871d929b651b87e2ead9
>>> Do not enable filter SORT MODE in chip init routine. This patch addresses an
>>> issue where BCM5716 sporadically drops packets when changing multicast list.
>>>
>>> diff --git a/drivers/net/ethernet/broadcom/bnx2.c
>>> b/drivers/net/ethernet/broadcom/bnx2.c
>>> index 8957eb5f4478..8c9a8b7787d2 100644
>>> --- a/drivers/net/ethernet/broadcom/bnx2.c
>>> +++ b/drivers/net/ethernet/broadcom/bnx2.c
>>> @@ -4984,8 +4984,6 @@ bnx2_init_chip(struct bnx2 *bp)
>>>
>>>        bp->idle_chk_status_idx = 0xffff;
>>>
>>> -       bp->rx_mode = BNX2_EMAC_RX_MODE_SORT_MODE;
>>> -
>>>        /* Set up how to generate a link change interrupt. */
>>>        BNX2_WR(bp, BNX2_EMAC_ATTENTION_ENA,
>>> BNX2_EMAC_ATTENTION_ENA_LINK);
>>>
>>>
>>> 2) Secondly, I revert this patch, after verify it, I find rx_fw_discards does not
>>> increasing.
>>> so I think this patch can fix current issue. But I'm not sure the issue of this
>>> patch to fix will be reproduced?
>>> I'm not convinced that what factor will trigger rx_fw_discards increasing?
>>> And how to fix this?
>>
>> Can you please reword your point above? i.e. what is working and what is not. I am not sure if I understand it completely.
>>
>> Is the rx_fw_disacard count incrementing with 2.2.6 upstream driver on BCM5716? What is the kernel version?
>> Which test is being run?
> 
> 
> The case is based on BCM5716's driver version of 2.2.6, and both 3.10 and mainline kernel version exist this issue .
> The testing seems like using one port of BCM5716 to receive packets, it can be found rx_fw_disacard increasing occasionally.
> There is one patch in 2.2.6, 0021850d0417a4dc38ed871d929b651b87e2ead9, if I remove this patch, I can't reproduce this issue,
> rx_fw_disacard doesn't increase.
> So I don't know why this patch(0021850d0417a4dc38ed871d929b651b87e2ead9) can fix my problem(rx_fw_disacard increasing)?
> If I remove this patch, how to fix the issue that the patch had resolved?
> 
>>
>>>
>>> Thanks a lot.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
> 
> 
> .
> 


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

end of thread, other threads:[~2018-11-02  6:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-26  3:15 bnx2: rx_fw_discards: BCM5716 sporadically drops packets when update to driver version 2.2.6 maowenan
2018-10-29  2:15 ` maowenan
2018-10-30  6:47 ` Mody, Rasesh
2018-10-30  9:03   ` maowenan
2018-11-02  6:14     ` maowenan

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