[Bug 253069] cxgbe fl_pktshift not handled in netmap mode

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Jan 28 22:56:33 UTC 2021


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253069

            Bug ID: 253069
           Summary: cxgbe fl_pktshift not handled in netmap mode
           Product: Base System
           Version: 12.2-RELEASE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs at FreeBSD.org
          Reporter: brian90013 at gmail.com

Hello,

Today I tried using the hw.cxgbe.fl_pktshift sysctl to see if it would improve
the overall packet rate. I was using hw.cxgbe.fl_pktshift=2 to produce 4 byte
alignment with my Ethernet/IP data. After looking at the data, I realized the
Ethernet frames were not being recognized. I am using the cc0 interface in
netmap mode.

I captured packets from the interface and viewed them using tcpdump. It looks
like the pktshift is not being accounted for by the driver as the first two
byte are the EtherType from the Ethernet header.

17:42:12.555105 1a:84:9a:83:ca:44 > 00:00:8b:cb:f9:5d, ethertype Unknown
(0x268f), length 811: 
        0x0000:  0800 4500 031d 0001 0000 4011 07bd 8fdb

I reviewed the driver code and found this segment in eth_rx():

    m0->m_pkthdr.len -= sc->params.sge.fl_pktshift;
    m0->m_len -= sc->params.sge.fl_pktshift;
    m0->m_data += sc->params.sge.fl_pktshift;

So the driver is transparently removing the shift from the length and the data
pointer. However, in service_nm_rxq() I see only:

    case CPL_RX_PKT:
                ring->slot[fl_cidx].len = G_RSPD_LEN(lq) -
                    sc->params.sge.fl_pktshift;

The length is being adjusted. However does the data pointer need adjusting as
well? Is this sysctl not supported while in netmap mode?

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list