Hi, We currently did a testing with a Intel dual-port 10G NICs. The driver version is "2.0.1". A: 82599, the chipset id is 0x10fb. B: 82598.
When I config a vlan 77 on both machines, and ping B from A, I captured the packets on A: tcpdump: WARNING: ix0: no IPv4 address assigned tcpdump: listening on ix0, link-type EN10MB (Ethernet), capture size 50000 bytes 15:12:18.508614 00:0c:bd:00:9d:82 > ff:ff:ff:ff:ff:ff, ethertype 802.1Q (0x8100), length 46: vlan 77, p 0, ethertype ARP, arp who-has 192.168.111.1 tell 192.168.111.2 0x0000: ffff ffff ffff 000c bd00 9d82 8100 004d ...............M 0x0010: 0806 0001 0800 0604 0001 000c bd00 9d82 ................ 0x0020: c0a8 6f02 0000 0000 0000 c0a8 6f01 ..o.........o. 15:12:18.508913 00:1b:21:3b:e6:39 > 00:0c:bd:00:9d:82, ethertype 802.1Q (0x8100), length 64: vlan 0, p 0, ethertype 802.1Q, vlan 77, p 0, ethertype ARP, arp reply 192.168.111.1 is-at 00:1b:21:3b:e6:39 0x0000: 000c bd00 9d82 001b 213b e639 8100 0000 ........!;.9.... 0x0010: 8100 004d 0806 0001 0800 0604 0002 001b ...M............ 0x0020: 213b e639 c0a8 6f01 000c bd00 9d82 c0a8 !;.9..o......... 0x0030: 6f02 0000 0000 0000 0000 0000 0000 0000 o............... At the same time, I captured the following packets on B: 15:13:03.958850 00:0c:bd:00:9d:82 > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 56: arp who-has 192.168.111.1 tell 192.168.111.2 0x0000: ffff ffff ffff 000c bd00 9d82 0806 0001 ................ 0x0010: 0800 0604 0001 000c bd00 9d82 c0a8 6f02 ..............o. 0x0020: 0000 0000 0000 c0a8 6f01 0000 0000 0000 ........o....... 0x0030: 0000 0000 0000 0000 ........ 15:13:03.958864 00:1b:21:3b:e6:39 > 00:0c:bd:00:9d:82, ethertype ARP (0x0806), length 42: arp reply 192.168.111.1 is-at 00:1b:21:3b:e6:39 0x0000: 000c bd00 9d82 001b 213b e639 0806 0001 ........!;.9.... 0x0010: 0800 0604 0002 001b 213b e639 c0a8 6f01 ........!;.9..o. 0x0020: 000c bd00 9d82 c0a8 6f02 ........o. As you can see, the second packet A received had two vlan tags, the outer is 0, the inner is 77. So I digged into the source and added debugging information on our running system, and found the vlan stripping for 82599 work very strange. The VP bit in receiving descriptor is set, but vlan tag is still zero, and the real tag is not stripped! The datasheet says: 7.4.3.2 Stripping 802.1q Tags on Receives Software might instruct the 82599 to strip 802.1q VLAN tags from received packets. The policy whether to strip the VLAN tag is configurable per queue. If the RXDCTL.VME bit for a given queue is set to 1b, and the incoming packet is an 802.1q VLAN packet (that is, its Ethernet Type field matched the VLNCTRL.VET), then the 82599 strips the 4-byte VLAN tag from the packet, and stores the TCI in the VLAN Tag field of the receive descriptor. The 82599 also sets the VP bit in the receive descriptor to indicate that the packet had a VLAN tag that was stripped. If the RXDCTL.VME bit is not set, the 802.1q packets can still be received if they pass the receive filter, but the VLAN tag is not stripped and the VP bit is not set. Any commet? Thanks 2010-11-26 beezarliu _______________________________________________ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"