[PATCH] Part 1 of low level 802.1p priority support

Bruce M Simpson bms at incunabulum.net
Sat Feb 10 17:00:10 UTC 2007


Hi,

Here is the first patch to bring in 802.1p Packet Priority to FreeBSD; 
this is to support Differentiated Services and Quality-of-Service. This 
builds on the M_VLANTAG support introduced by Andre last September.

This first stage enables FreeBSD to pass packets for 802.1q with VLAN 0 
to the main input path in the stack, which is the IEEE 
standards-compliant behaviour. With the attached patch and test packet, 
you can test this for yourself.

Currently this is limited to interfaces which support VLAN_HWTAGGING. To 
make the change universal, an architectural change is needed; some of 
the inline 802.1q processing needs to be moved from if_vlan.c to 
if_ethersubr.c.

To use this:
 1. Apply attached patch on a separate machine to be used as a test peer.
 2. Process attached hex dump with xxd from Vim distribution 
(editors/vim) to convert back to a binary pcap file.
 3. Configure test address on test peer, preferably using a separate 
physical LAN.
 4. Use ports/net-mgmt/tcpreplay to inject the traffic, with the 
appropriate IP and MAC addresses.
 5. Observe that you get an ICMP echo reply back WITHOUT 802.1q 
encapsulation.

Currently, the code deals only with receiving VLAN tags at a low level 
and does nothing about sending them.
This is just the low level stuff -- QoS is not magically happening right 
now.

Comments... testing... suggestions...

Regards,
BMS

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 8021p-part1.diff
Type: text/x-patch
Size: 2377 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-net/attachments/20070210/a363c279/8021p-part1.bin
-------------- next part --------------
0000000: d4c3 b2a1 0200 0400 0000 0000 0000 0000  ................
0000010: ffff 0000 0100 0000 51ed cd45 e444 0d00  ........Q..E.D..
0000020: 6600 0000 6600 0000 ffff ffff ffff 0010  f...f...........
0000030: c6bb 16f4 8100 0000 0800 4500 0054 258f  ..........E..T%.
0000040: 0000 4001 4110 0a00 0005 0a00 0006 0800  .. at .A...........
0000050: ca41 4154 0000 45cd ed51 000c ce3b 0809  .AAT..E..Q...;..
0000060: 0a0b 0c0d 0e0f 1011 1213 1415 1617 1819  ................
0000070: 1a1b 1c1d 1e1f 2021 2223 2425 2627 2829  ...... !"#$%&'()
0000080: 2a2b 2c2d 2e2f 3031 3233 3435 3637       *+,-./01234567


More information about the freebsd-net mailing list