Please use VPP native af_packet implementation. It works
in interrupt mode and interfaces can be created during runtime.

```
create host-interface name <linux-if-name>
```

is all you need.


On 24 Nov 2016, at 09:09, Chillance Zen 
<chillance...@gmail.com<mailto:chillance...@gmail.com>> wrote:

Hi,Damjan:

here is the trace output,it iterates that vpp can not find the ip address which 
is to be resolved,but I've already configured it on the vlan-sub interface 
already.

                                                      
130.140.25.1/24<http://130.140.25.1/24>
DBGvpp# trace add dpdk-input 5
DBGvpp# show trace
------------------- Start of thread 0 vpp_main -------------------
Packet 1

00:01:53:640161: dpdk-input
  af_packet0 rx queue 0
  buffer 0x400392f: current data 0, length 42, free-list 0, totlen-nifb 0, 
trace 0x0
  PKT MBUF: port 0, nb_segs 1, pkt_len 42
    buf_len 2176, data_len 42, ol_flags 0x0, data_off 128, phys_addr 0x3d6e0ac0
    packet_type 0x0
  ARP: f6:09:36:23:17:70 -> ff:ff:ff:ff:ff:ff
  request, type ethernet/IP4, address size 6/4
  f6:09:36:23:17:70/130.140.25.2<http://130.140.25.2/> -> 
00:00:00:00:00:00/130.140.25.1<http://130.140.25.1/>
00:01:53:640183: ethernet-input
  ARP: f6:09:36:23:17:70 -> ff:ff:ff:ff:ff:ff
00:01:53:640210: arp-input
  request, type ethernet/IP4, address size 6/4
  f6:09:36:23:17:70/130.140.25.2<http://130.140.25.2/> -> 
00:00:00:00:00:00/130.140.25.1<http://130.140.25.1/>
00:01:53:640214: error-drop
  arp-input: IP4 destination address not local to subnet

Packet 2

00:01:54:644159: dpdk-input
  af_packet0 rx queue 0
  buffer 0x400392f: current data 0, length 42, free-list 0, totlen-nifb 0, 
trace 0x1
  PKT MBUF: port 0, nb_segs 1, pkt_len 42
    buf_len 2176, data_len 42, ol_flags 0x0, data_off 128, phys_addr 0x3d6e0ac0
    packet_type 0x0
  ARP: f6:09:36:23:17:70 -> ff:ff:ff:ff:ff:ff
  request, type ethernet/IP4, address size 6/4
  f6:09:36:23:17:70/130.140.25.2<http://130.140.25.2/> -> 
00:00:00:00:00:00/130.140.25.1<http://130.140.25.1/>
00:01:54:644176: ethernet-input
  ARP: f6:09:36:23:17:70 -> ff:ff:ff:ff:ff:ff
00:01:54:644199: arp-input
  request, type ethernet/IP4, address size 6/4
  f6:09:36:23:17:70/130.140.25.2<http://130.140.25.2/> -> 
00:00:00:00:00:00/130.140.25.1<http://130.140.25.1/>
00:01:54:644202: error-drop
  arp-input: IP4 destination address not local to subnet

Packet 3

00:01:56:630149: dpdk-input
  af_packet0 rx queue 0
  buffer 0x400392f: current data 0, length 42, free-list 0, totlen-nifb 0, 
trace 0x2
  PKT MBUF: port 0, nb_segs 1, pkt_len 42
    buf_len 2176, data_len 42, ol_flags 0x0, data_off 128, phys_addr 0x3d6e0ac0
    packet_type 0x0
  ARP: f6:09:36:23:17:70 -> ff:ff:ff:ff:ff:ff
  request, type ethernet/IP4, address size 6/4
  f6:09:36:23:17:70/130.140.25.2<http://130.140.25.2/> -> 
00:00:00:00:00:00/130.140.25.1<http://130.140.25.1/>
00:01:56:642171: ethernet-input
  ARP: f6:09:36:23:17:70 -> ff:ff:ff:ff:ff:ff
00:01:56:642192: arp-input
  request, type ethernet/IP4, address size 6/4
  f6:09:36:23:17:70/130.140.25.2<http://130.140.25.2/> -> 
00:00:00:00:00:00/130.140.25.1<http://130.140.25.1/>
00:01:56:642197: error-drop
  arp-input: IP4 destination address not local to subnet

DBGvpp# show trace
------------------- Start of thread 0 vpp_main -------------------
Packet 1

00:01:53:640161: dpdk-input
  af_packet0 rx queue 0
  buffer 0x400392f: current data 0, length 42, free-list 0, totlen-nifb 0, 
trace 0x0
  PKT MBUF: port 0, nb_segs 1, pkt_len 42
    buf_len 2176, data_len 42, ol_flags 0x0, data_off 128, phys_addr 0x3d6e0ac0
    packet_type 0x0
  ARP: f6:09:36:23:17:70 -> ff:ff:ff:ff:ff:ff
  request, type ethernet/IP4, address size 6/4
  f6:09:36:23:17:70/130.140.25.2<http://130.140.25.2/> -> 
00:00:00:00:00:00/130.140.25.1<http://130.140.25.1/>
00:01:53:640183: ethernet-input
  ARP: f6:09:36:23:17:70 -> ff:ff:ff:ff:ff:ff
00:01:53:640210: arp-input
  request, type ethernet/IP4, address size 6/4
  f6:09:36:23:17:70/130.140.25.2<http://130.140.25.2/> -> 
00:00:00:00:00:00/130.140.25.1<http://130.140.25.1/>
00:01:53:640214: error-drop
  arp-input: IP4 destination address not local to subnet

Packet 2

00:01:54:644159: dpdk-input
  af_packet0 rx queue 0
  buffer 0x400392f: current data 0, length 42, free-list 0, totlen-nifb 0, 
trace 0x1
  PKT MBUF: port 0, nb_segs 1, pkt_len 42
    buf_len 2176, data_len 42, ol_flags 0x0, data_off 128, phys_addr 0x3d6e0ac0
    packet_type 0x0
  ARP: f6:09:36:23:17:70 -> ff:ff:ff:ff:ff:ff
  request, type ethernet/IP4, address size 6/4
  f6:09:36:23:17:70/130.140.25.2<http://130.140.25.2/> -> 
00:00:00:00:00:00/130.140.25.1<http://130.140.25.1/>
00:01:54:644176: ethernet-input
  ARP: f6:09:36:23:17:70 -> ff:ff:ff:ff:ff:ff
00:01:54:644199: arp-input
  request, type ethernet/IP4, address size 6/4
  f6:09:36:23:17:70/130.140.25.2<http://130.140.25.2/> -> 
00:00:00:00:00:00/130.140.25.1<http://130.140.25.1/>
00:01:54:644202: error-drop
  arp-input: IP4 destination address not local to subnet

Packet 3

00:01:56:630149: dpdk-input
  af_packet0 rx queue 0
  buffer 0x400392f: current data 0, length 42, free-list 0, totlen-nifb 0, 
trace 0x2
  PKT MBUF: port 0, nb_segs 1, pkt_len 42
    buf_len 2176, data_len 42, ol_flags 0x0, data_off 128, phys_addr 0x3d6e0ac0
    packet_type 0x0
  ARP: f6:09:36:23:17:70 -> ff:ff:ff:ff:ff:ff
  request, type ethernet/IP4, address size 6/4
  f6:09:36:23:17:70/130.140.25.2<http://130.140.25.2/> -> 
00:00:00:00:00:00/130.140.25.1<http://130.140.25.1/>
00:01:56:642171: ethernet-input
  ARP: f6:09:36:23:17:70 -> ff:ff:ff:ff:ff:ff
00:01:56:642192: arp-input
  request, type ethernet/IP4, address size 6/4
  f6:09:36:23:17:70/130.140.25.2<http://130.140.25.2/> -> 
00:00:00:00:00:00/130.140.25.1<http://130.140.25.1/>
00:01:56:642197: error-drop
  arp-input: IP4 destination address not local to subnet

Packet 4

00:01:57:631154: dpdk-input
  af_packet0 rx queue 0
  buffer 0x400392f: current data 0, length 42, free-list 0, totlen-nifb 0, 
trace 0x3
  PKT MBUF: port 0, nb_segs 1, pkt_len 42
    buf_len 2176, data_len 42, ol_flags 0x0, data_off 128, phys_addr 0x3d6e0ac0
    packet_type 0x0
  ARP: f6:09:36:23:17:70 -> ff:ff:ff:ff:ff:ff
  request, type ethernet/IP4, address size 6/4
  f6:09:36:23:17:70/130.140.25.2<http://130.140.25.2/> -> 
00:00:00:00:00:00/130.140.25.1<http://130.140.25.1/>
00:01:57:631170: ethernet-input
  ARP: f6:09:36:23:17:70 -> ff:ff:ff:ff:ff:ff
00:01:57:631181: arp-input
  request, type ethernet/IP4, address size 6/4
  f6:09:36:23:17:70/130.140.25.2<http://130.140.25.2/> -> 
00:00:00:00:00:00/130.140.25.1<http://130.140.25.1/>
00:01:57:631185: error-drop
  arp-input: IP4 destination address not local to subnet

DBGvpp# show interface addr
TenGigabitEthernet1/0/0 (dn):
TenGigabitEthernet1/0/1 (dn):
af_packet0 (up):
af_packet0.100 (up):
  130.140.25.1/24<http://130.140.25.1/24>
af_packet1 (dn):
local0 (dn):



Thanks & Regards

Linc

On 24 November 2016 at 04:08, Damjan Marion (damarion) 
<damar...@cisco.com<mailto:damar...@cisco.com>> wrote:

Can you capture trace (trace add af-packet-input 5 / show trace) and share it 
here ?

Thanks,

Damjan

On 22 Nov 2016, at 09:16, Chillance Zen 
<chillance...@gmail.com<mailto:chillance...@gmail.com>> wrote:

 hi,all

 when I was trying to use vlan sub-interface as a individual L3 interface (i.e. 
configure an IP address in a VRF) by:
 namespace side(where veth_vpp1 in namespace and af_packet0 in vpp is 
pairwised):
 ip link add link veth_vpp1 name veth_vpp1.100 type vlan id 100
 ip addr add 130.140.25.2/24<http://130.140.25.2/24> dev veth_vpp1.100
 ip link set veth_vpp1.100 up
 vpp side:
 set interface state af_packet0 up
 create sub-interface af_packet0 100
 set interface state af_packet0.100 up
 set interface ip addr af_packet0.100 130.140.25.1/24<http://130.140.25.1/24>

 ,and then it seems that traffic gets blocking, the only way to make it work is 
to mannually configure mac-ip fib by:
 namespace :
arp -s 130.140.25.1 02:fe:0d:15:17:e8
 vpp:
set ip arp  af_packet0.100 130.140.25.2 f6:cf:5b:fc:2a:89 static
I want to know how to make this  work if I don't configure static mac-ip 
fib(i.e arp) Beacuse sometimes fetching static mac is not that easy?

Thanks


--
Linc @bjtu
_______________________________________________
vpp-dev mailing list
vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>
https://lists.fd.io/mailman/listinfo/vpp-dev




--
Linc @bjtu

_______________________________________________
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Reply via email to