Hi all,
I did some test in virl testbed. I sent following 3 frames to VPP interface
from scapy:
sendp(iface='ens6', x=Ether(src='02:00:00:00:00:02',
dst='fa:16:3e:d0:4a:66')/IP())
sendp(iface='ens6', x=Ether(src='02:00:00:00:00:02', dst='fa:16:3e:d0:4a:66',
type=0x8100)/Dot1Q(vlan=10)/IP())
sendp(iface='ens6', x=Ether(src='02:00:00:00:00:02', dst='fa:16:3e:d0:4a:66',
type=0x7777)/IP())
In vpp_api_test I ran:
exec trace add dpdk-input 10
sw_interface_set_flags sw_if_index 1 admin-up
exec show trace, it shows no Dot1Q frame
------------------- Start of thread 0 vpp_main -------------------
Packet 1
00:00:24:982426: dpdk-input
GigabitEthernet0/4/0 rx queue 0
buffer 0x4e03: current data 14, length 20, free-list 0, totlen-nifb 0, trace
0x0
PKT MBUF: port 0, nb_segs 1, pkt_len 34
buf_len 2176, data_len 34, ol_flags 0x0, data_off 128, phys_addr 0x4fd33fc0
packet_type 0x0
IP4: 02:00:00:00:00:02 -> fa:16:3e:d0:4a:66
IP6_HOP_BY_HOP_OPTIONS: 127.0.0.1 -> 127.0.0.1
tos 0x00, ttl 64, length 20, checksum 0x7ce7
fragment id 0x0001
00:00:24:982450: ip4-input
IP6_HOP_BY_HOP_OPTIONS: 127.0.0.1 -> 127.0.0.1
tos 0x00, ttl 64, length 20, checksum 0x7ce7
fragment id 0x0001
00:00:24:982460: ip4-lookup
fib 0 dpo-idx 0 flow hash: 0x00000000
IP6_HOP_BY_HOP_OPTIONS: 127.0.0.1 -> 127.0.0.1
tos 0x00, ttl 64, length 20, checksum 0x7ce7
fragment id 0x0001
00:00:24:982464: ip4-drop
IP6_HOP_BY_HOP_OPTIONS: 127.0.0.1 -> 127.0.0.1
tos 0x00, ttl 64, length 20, checksum 0x7ce7
fragment id 0x0001
00:00:24:982467: error-drop
ip4-input: ip4 adjacency drop
Packet 2
00:00:25:003176: dpdk-input
GigabitEthernet0/4/0 rx queue 0
buffer 0x4ddc: current data 0, length 34, free-list 0, totlen-nifb 0, trace
0x1
PKT MBUF: port 0, nb_segs 1, pkt_len 34
buf_len 2176, data_len 34, ol_flags 0x0, data_off 128, phys_addr 0x4fd33600
packet_type 0x0
0x7777: 02:00:00:00:00:02 -> fa:16:3e:d0:4a:66
00:00:25:003179: ethernet-input
0x7777: 02:00:00:00:00:02 -> fa:16:3e:d0:4a:66
00:00:25:003183: error-punt
dpdk-input: no error
When I added the interface to a bridge domain there are 3 captured packets
exec trace add dpdk-input 10
sw_interface_set_flags sw_if_index 1 admin-up
sw_interface_set_l2_bridge sw_if_index 1 bd_id 1 shg 0 enable
vat# exec show trace
------------------- Start of thread 0 vpp_main -------------------
Packet 1
00:00:28:944099: dpdk-input
GigabitEthernet0/4/0 rx queue 0
buffer 0x4e03: current data 0, length 34, free-list 0, totlen-nifb 0, trace
0x0
PKT MBUF: port 0, nb_segs 1, pkt_len 34
buf_len 2176, data_len 34, ol_flags 0x0, data_off 128, phys_addr 0x4fd33fc0
packet_type 0x0
IP4: 02:00:00:00:00:02 -> fa:16:3e:d0:4a:66
IP6_HOP_BY_HOP_OPTIONS: 127.0.0.1 -> 127.0.0.1
tos 0x00, ttl 64, length 20, checksum 0x7ce7
fragment id 0x0001
00:00:28:944119: ethernet-input
IP4: 02:00:00:00:00:02 -> fa:16:3e:d0:4a:66
00:00:28:944127: l2-input
l2-input: sw_if_index 1 dst fa:16:3e:d0:4a:66 src 02:00:00:00:00:02
00:00:28:944129: l2-learn
l2-learn: sw_if_index 1 dst fa:16:3e:d0:4a:66 src 02:00:00:00:00:02 bd_index 1
00:00:28:944134: l2-fwd
l2-fwd: sw_if_index 1 dst fa:16:3e:d0:4a:66 src 02:00:00:00:00:02 bd_index 1
00:00:28:944137: l2-flood
l2-flood: sw_if_index 1 dst fa:16:3e:d0:4a:66 src 02:00:00:00:00:02 bd_index 1
00:00:28:944138: error-drop
l2-flood: L2 replication complete
Packet 2
00:00:28:953150: dpdk-input
GigabitEthernet0/4/0 rx queue 0
buffer 0x4ddc: current data 0, length 38, free-list 0, totlen-nifb 0, trace
0x1
PKT MBUF: port 0, nb_segs 1, pkt_len 38
buf_len 2176, data_len 38, ol_flags 0x0, data_off 128, phys_addr 0x4fd33600
packet_type 0x0
IP4: 02:00:00:00:00:02 -> fa:16:3e:d0:4a:66 802.1q vlan 10
IP6_HOP_BY_HOP_OPTIONS: 127.0.0.1 -> 127.0.0.1
tos 0x00, ttl 64, length 20, checksum 0x7ce7
fragment id 0x0001
00:00:28:953153: ethernet-input
IP4: 02:00:00:00:00:02 -> fa:16:3e:d0:4a:66 802.1q vlan 10
00:00:28:953155: l2-input
l2-input: sw_if_index 1 dst fa:16:3e:d0:4a:66 src 02:00:00:00:00:02
00:00:28:953156: l2-learn
l2-learn: sw_if_index 1 dst fa:16:3e:d0:4a:66 src 02:00:00:00:00:02 bd_index 1
00:00:28:953156: l2-fwd
l2-fwd: sw_if_index 1 dst fa:16:3e:d0:4a:66 src 02:00:00:00:00:02 bd_index 1
00:00:28:953156: l2-flood
l2-flood: sw_if_index 1 dst fa:16:3e:d0:4a:66 src 02:00:00:00:00:02 bd_index 1
00:00:28:953157: error-drop
l2-flood: L2 replication complete
Packet 3
00:00:28:962639: dpdk-input
GigabitEthernet0/4/0 rx queue 0
buffer 0x4db5: current data 0, length 34, free-list 0, totlen-nifb 0, trace
0x2
PKT MBUF: port 0, nb_segs 1, pkt_len 34
buf_len 2176, data_len 34, ol_flags 0x0, data_off 128, phys_addr 0x4fd32c40
packet_type 0x0
0x7777: 02:00:00:00:00:02 -> fa:16:3e:d0:4a:66
00:00:28:962641: ethernet-input
0x7777: 02:00:00:00:00:02 -> fa:16:3e:d0:4a:66
00:00:28:962643: l2-input
l2-input: sw_if_index 1 dst fa:16:3e:d0:4a:66 src 02:00:00:00:00:02
00:00:28:962643: l2-learn
l2-learn: sw_if_index 1 dst fa:16:3e:d0:4a:66 src 02:00:00:00:00:02 bd_index 1
00:00:28:962644: l2-fwd
l2-fwd: sw_if_index 1 dst fa:16:3e:d0:4a:66 src 02:00:00:00:00:02 bd_index 1
00:00:28:962644: l2-flood
l2-flood: sw_if_index 1 dst fa:16:3e:d0:4a:66 src 02:00:00:00:00:02 bd_index 1
00:00:28:962644: error-drop
l2-flood: L2 replication complete
Does the sw_interface_set_l2_bridge command something with virtio driver which
enable/disable the vlan tagged frame filtering?
Thanks,
M.
From: [email protected] [mailto:[email protected]] On
Behalf Of Matej Klotton -X (mklotton - PANTHEON TECHNOLOGIES at Cisco)
Sent: 7. marca 2017 12:35
To: Neale Ranns (nranns) <[email protected]>; [email protected]
Cc: [email protected]
Subject: Re: [csit-dev] VPP receive no tagged packet on Virtio interface
Hi Neale,
I fixed the issue with the IP addresses, but the problem remains. In trace is
vat# ------------------- Start of thread 0 vpp_main -------------------
No packets in trace buffer
The VIRL topology links are connected via linux bridges, and it seems like it
doesn’t forward tagged frames.
It is probably not issue related to VPP.
Thanks,
M.
From: Neale Ranns (nranns)
Sent: 6. marca 2017 17:07
To: Matej Klotton -X (mklotton - PANTHEON TECHNOLOGIES at Cisco)
<[email protected]<mailto:[email protected]>>;
[email protected]<mailto:[email protected]>
Cc: [email protected]<mailto:[email protected]>
Subject: Re: [csit-dev] VPP receive no tagged packet on Virtio interface
Hi Matej,
Your IP addresses are configured on the same interface; sw_if_index 6.
Sw_if_index 5 thus will not accept IP packets.
/neale
From: <[email protected]<mailto:[email protected]>> on
behalf of "Matej Klotton -X (mklotton - PANTHEON TECHNOLOGIES at Cisco)"
<[email protected]<mailto:[email protected]>>
Date: Monday, 6 March 2017 at 14:58
To: "[email protected]<mailto:[email protected]>"
<[email protected]<mailto:[email protected]>>
Cc: "[email protected]<mailto:[email protected]>"
<[email protected]<mailto:[email protected]>>
Subject: [csit-dev] VPP receive no tagged packet on Virtio interface
Hi all,
In CSIT we are running VPP on a VM with virtio network device.
vppctl show hardware
Name Idx Link Hardware
GigabitEthernet0/4/0 1 up GigabitEthernet0/4/0
Ethernet address fa:16:3e:0a:3e:3d
Red Hat Virtio
carrier up full duplex speed 10000 mtu 9216
rx queues 1, rx desc 256, tx queues 1, tx desc 256
The interface is configured with 2 Dot1Q subinterfaces, with ip address on each
subinterface.
sw_interface_set_flags sw_if_index 1 admin-up
create_vlan_subif sw_if_index 1 vlan 10
sw_interface_set_flags sw_if_index 5 admin-up
create_vlan_subif sw_if_index 1 vlan 20
sw_interface_set_flags sw_if_index 6 admin-up
sw_interface_add_del_address sw_if_index 6 192.168.100.1/24
sw_interface_add_del_address sw_if_index 6 192.168.200.1/24
ip_neighbor_add_del sw_if_index 5 dst 192.168.100.2 mac fa:16:3e:b1:67:b7
ip_neighbor_add_del sw_if_index 6 dst 192.168.200.2 mac fa:16:3e:b1:67:b7
In a testcase I’m sending tagged frame with tag 20 and I’m expecting received
packed with tag 10
###[ Ethernet ]###
dst = fa:16:3e:0a:3e:3d
src = fa:16:3e:b1:67:b7
type = n_802_1Q
###[ 802.1Q ]###
prio = 0L
id = 0L
vlan = 10L
type = IPv4
###[ IP ]###
version = 4L
ihl = 5L
tos = 0x0
len = 28
id = 1
flags =
frag = 0L
ttl = 64
proto = icmp
chksum = 0xcd8a
src = 192.168.100.2
dst = 192.168.200.2
\options \
###[ ICMP ]###
type = echo-request
code = 0
chksum = 0xf7ff
id = 0x0
seq = 0x0
But there is no packet received in vpp show trace
vat# ------------------- Start of thread 0 vpp_main -------------------
No packets in trace buffer
The same testcase with e1000 driver instead virtio has in trace
Packet 1
00:00:18:038106: dpdk-input
GigabitEthernet0/4/0 rx queue 0
buffer 0x4e51: current data 0, length 60, free-list 0, totlen-nifb 0, trace
0x0
PKT MBUF: port 0, nb_segs 1, pkt_len 60
buf_len 2176, data_len 60, ol_flags 0x0, data_off 128, phys_addr 0x53935340
packet_type 0x0
IP4: fa:16:3e:b1:67:b7 -> fa:16:3e:bc:bb:cd 802.1q vlan 10
ICMP: 192.168.100.2 -> 192.168.200.2
tos 0x00, ttl 64, length 28, checksum 0xcd8a
fragment id 0x0001
ICMP echo_request checksum 0xf7ff
00:00:18:038164: ethernet-input
IP4: fa:16:3e:b1:67:b7 -> fa:16:3e:bc:bb:cd 802.1q vlan 10
00:00:18:038174: ip4-input
ICMP: 192.168.100.2 -> 192.168.200.2
tos 0x00, ttl 64, length 28, checksum 0xcd8a
fragment id 0x0001
ICMP echo_request checksum 0xf7ff
00:00:18:038179: ip4-lookup
fib 0 dpo-idx 5 flow hash: 0x00000000
ICMP: 192.168.100.2 -> 192.168.200.2
tos 0x00, ttl 64, length 28, checksum 0xcd8a
fragment id 0x0001
ICMP echo_request checksum 0xf7ff
00:00:18:038185: ip4-rewrite
tx_sw_if_index 6 dpo-idx 5 : ipv4 via 192.168.200.2 GigabitEthernet0/4/0.20:
IP4: fa:16:3e:bc:bb:cd -> fa:16:3e:b1:67:b7 802.1q vlan 20 flow hash: 0x00000000
IP4: fa:16:3e:bc:bb:cd -> fa:16:3e:b1:67:b7 802.1q vlan 20
ICMP: 192.168.100.2 -> 192.168.200.2
tos 0x00, ttl 63, length 28, checksum 0xce8a
fragment id 0x0001
ICMP echo_request checksum 0xf7ff
00:00:18:038188: GigabitEthernet0/4/0-output
GigabitEthernet0/4/0.20
IP4: fa:16:3e:bc:bb:cd -> fa:16:3e:b1:67:b7 802.1q vlan 20
ICMP: 192.168.100.2 -> 192.168.200.2
tos 0x00, ttl 63, length 28, checksum 0xce8a
fragment id 0x0001
ICMP echo_request checksum 0xf7ff
00:00:18:038194: GigabitEthernet0/4/0-tx
GigabitEthernet0/4/0 tx queue 0
buffer 0x4e51: current data 0, length 60, free-list 0, totlen-nifb 0, trace
0x0
IP4: fa:16:3e:bc:bb:cd -> fa:16:3e:b1:67:b7 802.1q vlan 20
ICMP: 192.168.100.2 -> 192.168.200.2
tos 0x00, ttl 63, length 28, checksum 0xce8a
fragment id 0x0001
ICMP echo_request checksum 0xf7ff
Does anybody know if there is a problem in virtio driver with vlans?
Thanks,
Matej
_______________________________________________
vpp-dev mailing list
[email protected]
https://lists.fd.io/mailman/listinfo/vpp-dev