Page MenuHomeFreeBSD

Make use of IP_VLAN_PCP setsockopt in ping and ping6.
ClosedPublic

Authored by rscheff on Oct 1 2020, 1:43 PM.

Details

Summary

In order to validate the proper marking and use of a different
ethernet priority class, add the new session-specific PCP
feature to the ping/ping6 utilities.

This demonstrates the use of that new protocol option.

Depends upon D26409

Test Plan

Capture a ping icmp packet sent with the '-C pcp' option
via a real ethernet network interface. A 802.1Q tag header
with vlan id=0, and pcp=x should show up when decoding the
packet.

Furthermore, the verbose dump of the ICMP Echo Response
may include the 802.1p tag, if the receiving NIC delivered this up the
stack.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

rscheff created this revision.
rscheff edited the test plan for this revision. (Show Details)
rscheff added reviewers: rrs, rgrimes, gallatin, tuexen.
rscheff added a reviewer: bcr.
tcpdump -i vmx0 -vvv -nn -e -XX icmp or \(vlan and icmp \) &
 
ping -C 5 -c 1 192.168.233.1


00:0c:29:f7:80:12 > e4:f4:c6:18:04:ed, ethertype 802.1Q (0x8100), length 102: vlan 0, p 5, ethertype IPv4, (tos 0x0, ttl 64, id 5252, offset 0, flags [none], proto ICMP (1), length 84)
  192.168.233.110 > 192.168.233.1: ICMP echo request, id 28676, seq 0, length 64
      0x0000:  e4f4 c618 04ed 000c 29f7 8012 8100 a000  ........).......  <== 8100 vlan tag, a0 00 ... PCP5, Vlan ID 0
      0x0010:  0800 4500 0054 1484 0000 4001 1264 c0a8  ..E..T....@..d..
      0x0020:  e96e c0a8 e901 0800 c769 7004 0000 0000  .n.......ip.....
      0x0030:  0510 26e4 a99a 0809 0a0b 0c0d 0e0f 1011  ..&.............
      0x0040:  1213 1415 1617 1819 1a1b 1c1d 1e1f 2021  ...............!
      0x0050:  2223 2425 2627 2829 2a2b 2c2d 2e2f 3031  "#$%&'()*+,-./01
      0x0060:  3233 3435 3637                           234567

Two minor corrections...

sbin/ping/ping.8
118 ↗(On Diff #77725)

s/Add a/Add an/

(same for the other man page)

119 ↗(On Diff #77725)

How about

s/use/uses/

for both cases in this sentence?

(same for the other man page)

  • improve man page grammar

OK for the man page part of the patch.

This revision is now accepted and ready to land.Oct 2 2020, 8:11 AM