Page MenuHomeFreeBSD

Fix Chelsio T6 drop statistics
AbandonedPublic

Authored by jch on Nov 5 2018, 12:21 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 2:31 AM
Unknown Object (File)
Dec 13 2023, 9:25 PM
Unknown Object (File)
Nov 16 2023, 7:56 PM
Unknown Object (File)
Feb 4 2023, 7:51 PM
Unknown Object (File)
Dec 11 2022, 9:19 PM

Details

Reviewers
np
Summary

Report correctly dev.cc.X.stats.rx.ovflowY stats: For some reasons on T6 card,
rx_ovflow drop stats for port 1 are reported on rx_ovflow2 counter, i.e.

dev.cc.1.stats.rx_ovflow3: 0
dev.cc.1.stats.rx_ovflow2: 6148622780
dev.cc.1.stats.rx_ovflow1: 0
dev.cc.1.stats.rx_ovflow0: 0

But currently adap2pinfo() expects these statistics to be reported on
rx_ovflow1 and rx_ovflow0 only. The side effect being that netstat's Idrops
are always 0 even if packets are dropped.

Current change is a working workaround, and it is expected that @np gives
inputs on a cleaner / more generic fix.

Test Plan
  1. Make a FreeBSD T6 card to drop packet on port 1
  2. Check that netstat's Idrops stays at 0

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 20636
Build 20052: arc lint + arc unit

Event Timeline

np requested changes to this revision.Nov 5 2018, 5:12 PM

What version of FreeBSD is this? I think this is already fixed in 12.0.

This revision now requires changes to proceed.Nov 5 2018, 5:12 PM
In D17843#381446, @np wrote:

What version of FreeBSD is this? I think this is already fixed in 12.0.

This is for FreeBSD 11.2 where this change is still needed. If the fix is also already in stable/11 then all green.

Hi, I have a report, that cxgbe driver doesn't take into account packets, that are received from mirrored port. So, when you run netstat -hw 1 -I cxl0 you will see no packets, but tcpdump will show them. It seems a bit confusing. I didn't checked this, so I might be wrong.

In D17843#381477, @ae wrote:

Hi, I have a report, that cxgbe driver doesn't take into account packets, that are received from mirrored port. So, when you run netstat -hw 1 -I cxl0 you will see no packets, but tcpdump will show them. It seems a bit confusing. I didn't checked this, so I might be wrong.

This phab is going in a random direction now :-)

Does the tcpdump put the card in promiscuous mode or are you using -p? Anything seen by tcpdump should show up in a netstat that's running at the same time.

In D17843#381487, @np wrote:

Does the tcpdump put the card in promiscuous mode or are you using -p? Anything seen by tcpdump should show up in a netstat that's running at the same time.

Yes, the card is in promiscuous mode. The colleague said that mellanox card in the similar configuration shows counters correctly, also from the ether_input_internal() I can say, that IFCOUNTER_IBYTES counter usually should be increased if card doesn't provide hardware counters. Thus I think if it is possible, the card should count received packets at least in promiscuous mode.

This change is not needed anymore as it has been fixed with r324945