Page MenuHomeFreeBSD

qlnxe: Allow tapping the tx packets
ClosedPublic

Authored by zlei on Jan 26 2026, 6:53 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Feb 17, 11:38 AM
Unknown Object (File)
Tue, Feb 17, 11:38 AM
Unknown Object (File)
Mon, Feb 16, 6:33 PM
Unknown Object (File)
Sat, Feb 14, 7:23 AM
Unknown Object (File)
Sat, Feb 14, 7:09 AM
Unknown Object (File)
Sat, Feb 14, 7:09 AM
Unknown Object (File)
Mon, Feb 9, 4:16 AM
Unknown Object (File)
Thu, Feb 5, 8:10 PM
Subscribers

Details

Summary

Currently only the packets in the RX path can be captured by tcpdump
as the ETHER_BPF_MTAP call in the TX path is missing. Add it so that
packets in both directions can be captured.

PR: 290973
MFC after: 1 week

Test Plan
# ping -c1 172.16.2.1
PING 172.16.2.1 (172.16.2.1): 56 data bytes
64 bytes from 172.16.2.1: icmp_seq=0 ttl=64 time=0.085 ms

--- 172.16.2.1 ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.085/0.085/0.085/0.000 ms
# tcpdump -Kpenvi ql0
tcpdump: listening on ql0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
14:51:49.764993 3a:57:b3:00:c3:16 > a2:7f:a8:43:92:d7, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 64, id 9189, offset 0, flags [none], proto ICMP (1), length 84)
    172.16.2.5 > 172.16.2.1: ICMP echo request, id 51329, seq 0, length 64
14:51:49.765023 a2:7f:a8:43:92:d7 > 3a:57:b3:00:c3:16, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 64, id 24473, offset 0, flags [none], proto ICMP (1), length 84)
    172.16.2.1 > 172.16.2.5: ICMP echo reply, id 51329, seq 0, length 64

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable