Re: [vpp-dev] ip4-not-enabled in IP-in-IP tunnel

2018-05-14 Thread Nitin Saxena

Thanks Ole. Makes sense. Let me try by assigning IP to ipip0

Thanks,
Nitin

On Monday 14 May 2018 06:24 PM, Ole Troan wrote:

Nitin,

A tunnel interface is just like any other interface and you need to have an IP 
address configured on it to make it IP enabled.
(Or point to another interface with IP unnumbered).

Note that the IPIP interface supports {IPvX over IPvY} where X and Y are 4 and 
6. So your patch would blindly enable IPv4, which isn't quite what you want.

Cheers,
Ole


On 14 May 2018, at 14:27, Nitin Saxena  wrote:

Hi,

Using VPP v1804 I created IP-in-IP tunnel and ran into IP4-not-enabled issue. 
Following is the trace

===
-- Start of thread 1 vpp_wk_0 ---
Packet 1

00:04:16:407330: dpdk-input
  VirtualFunctionEthernet1/0/1 rx queue 0
  buffer 0x291b: current data 14, length 48, free-list 0, clone-count 0, 
totlen-nifb 0, trace 0x0
 ext-hdr-valid
 l4-cksum-computed l4-cksum-correct l2-hdr-offset 0 
l3-hdr-offset 14
  PKT MBUF: port 0, nb_segs 1, pkt_len 62
buf_len 2176, data_len 62, ol_flags 0x0, data_off 128, phys_addr 0x80148e80
packet_type 0x0 l2_len 0 l3_len 0 outer_l2_len 0 outer_l3_len 0
  IP4: 90:e2:ba:91:22:04 -> 00:0f:b7:11:8d:da
  IP_IN_IP: 50.0.0.1 -> 60.0.0.1
tos 0x00, ttl 64, length 48, checksum 0x0cc8
fragment id 0x0001
00:04:16:407343: ip4-input
  IP_IN_IP: 50.0.0.1 -> 60.0.0.1
tos 0x00, ttl 64, length 48, checksum 0x0cc8
fragment id 0x0001
00:04:16:407350: ip4-lookup
  fib 0 dpo-idx 7 flow hash: 0x
  IP_IN_IP: 50.0.0.1 -> 60.0.0.1
tos 0x00, ttl 64, length 48, checksum 0x0cc8
fragment id 0x0001
00:04:16:407354: ip4-local
IP_IN_IP: 50.0.0.1 -> 60.0.0.1
  tos 0x00, ttl 64, length 48, checksum 0x0cc8
  fragment id 0x0001
00:04:16:407356: ipip4-input
  IPIP: tunnel 3 len 48 src 50.0.0.1 dst 60.0.0.1
00:04:16:407358: ip4-input
  UDP: 20.0.0.3 -> 30.0.0.2
tos 0x00, ttl 64, length 28, checksum 0x48cc
fragment id 0x0001
  UDP: 53 -> 53
length 8, checksum 0xcd6f
00:04:16:407359: ip4-not-enabled
UDP: 20.0.0.3 -> 30.0.0.2
  tos 0x00, ttl 64, length 28, checksum 0x48cc
  fragment id 0x0001
UDP: 53 -> 53
  length 8, checksum 0xcd6f
00:04:16:407365: error-drop
===

However we are able to fix above issue by following patch:

diff --git a/src/vnet/ipip/ipip.c b/src/vnet/ipip/ipip.c
index 82c961c..d3bf9d9 100644
--- a/src/vnet/ipip/ipip.c
+++ b/src/vnet/ipip/ipip.c
@@ -468,6 +468,8 @@ ipip_add_tunnel (ipip_transport_t transport,
   t->fib_index = fib_index;
   t->sw_if_index = sw_if_index;

+  ip4_sw_interface_enable_disable (sw_if_index, 1);
+
   t->transport = transport;
   vec_validate_init_empty (gm->tunnel_index_by_sw_if_index, sw_if_index, ~0);
   gm->tunnel_index_by_sw_if_index[sw_if_index] = t_idx;
@@ -529,6 +531,7 @@ ipip_del_tunnel (u32 sw_if_index)
   if (t == NULL)
 return VNET_API_ERROR_NO_SUCH_ENTRY;

+  ip4_sw_interface_enable_disable (sw_if_index, 0);
   vnet_sw_interface_set_flags (vnm, sw_if_index, 0 /* down */ );
   gm->tunnel_index_by_sw_if_index[sw_if_index] = ~0;
   vnet_delete_hw_interface (vnm, t->hw_if_index);

Are we missing anything? Any comments will be appreciated.

Thanks,
Nitin










-=-=-=-=-=-=-=-=-=-=-=-
Links:

You receive all messages sent to this group.

View/Reply Online (#9273): https://lists.fd.io/g/vpp-dev/message/9273
View All Messages In Topic (3): https://lists.fd.io/g/vpp-dev/topic/19199319
Mute This Topic: https://lists.fd.io/mt/19199319/21656
New Topic: https://lists.fd.io/g/vpp-dev/post

Change Your Subscription: https://lists.fd.io/g/vpp-dev/editsub/21656
Group Home: https://lists.fd.io/g/vpp-dev
Contact Group Owner: vpp-dev+ow...@lists.fd.io
Terms of Service: https://lists.fd.io/static/tos
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub
-=-=-=-=-=-=-=-=-=-=-=-



[vpp-dev] ip4-not-enabled in IP-in-IP tunnel

2018-05-14 Thread Nitin Saxena

Hi,

Using VPP v1804 I created IP-in-IP tunnel and ran into IP4-not-enabled 
issue. Following is the trace


===
-- Start of thread 1 vpp_wk_0 ---
Packet 1

00:04:16:407330: dpdk-input
  VirtualFunctionEthernet1/0/1 rx queue 0
  buffer 0x291b: current data 14, length 48, free-list 0, clone-count 
0, totlen-nifb 0, trace 0x0

 ext-hdr-valid
 l4-cksum-computed l4-cksum-correct l2-hdr-offset 0 
l3-hdr-offset 14

  PKT MBUF: port 0, nb_segs 1, pkt_len 62
buf_len 2176, data_len 62, ol_flags 0x0, data_off 128, phys_addr 
0x80148e80

packet_type 0x0 l2_len 0 l3_len 0 outer_l2_len 0 outer_l3_len 0
  IP4: 90:e2:ba:91:22:04 -> 00:0f:b7:11:8d:da
  IP_IN_IP: 50.0.0.1 -> 60.0.0.1
tos 0x00, ttl 64, length 48, checksum 0x0cc8
fragment id 0x0001
00:04:16:407343: ip4-input
  IP_IN_IP: 50.0.0.1 -> 60.0.0.1
tos 0x00, ttl 64, length 48, checksum 0x0cc8
fragment id 0x0001
00:04:16:407350: ip4-lookup
  fib 0 dpo-idx 7 flow hash: 0x
  IP_IN_IP: 50.0.0.1 -> 60.0.0.1
tos 0x00, ttl 64, length 48, checksum 0x0cc8
fragment id 0x0001
00:04:16:407354: ip4-local
IP_IN_IP: 50.0.0.1 -> 60.0.0.1
  tos 0x00, ttl 64, length 48, checksum 0x0cc8
  fragment id 0x0001
00:04:16:407356: ipip4-input
  IPIP: tunnel 3 len 48 src 50.0.0.1 dst 60.0.0.1
00:04:16:407358: ip4-input
  UDP: 20.0.0.3 -> 30.0.0.2
tos 0x00, ttl 64, length 28, checksum 0x48cc
fragment id 0x0001
  UDP: 53 -> 53
length 8, checksum 0xcd6f
00:04:16:407359: ip4-not-enabled
UDP: 20.0.0.3 -> 30.0.0.2
  tos 0x00, ttl 64, length 28, checksum 0x48cc
  fragment id 0x0001
UDP: 53 -> 53
  length 8, checksum 0xcd6f
00:04:16:407365: error-drop
===

However we are able to fix above issue by following patch:

diff --git a/src/vnet/ipip/ipip.c b/src/vnet/ipip/ipip.c
index 82c961c..d3bf9d9 100644
--- a/src/vnet/ipip/ipip.c
+++ b/src/vnet/ipip/ipip.c
@@ -468,6 +468,8 @@ ipip_add_tunnel (ipip_transport_t transport,
   t->fib_index = fib_index;
   t->sw_if_index = sw_if_index;

+  ip4_sw_interface_enable_disable (sw_if_index, 1);
+
   t->transport = transport;
   vec_validate_init_empty (gm->tunnel_index_by_sw_if_index, 
sw_if_index, ~0);

   gm->tunnel_index_by_sw_if_index[sw_if_index] = t_idx;
@@ -529,6 +531,7 @@ ipip_del_tunnel (u32 sw_if_index)
   if (t == NULL)
 return VNET_API_ERROR_NO_SUCH_ENTRY;

+  ip4_sw_interface_enable_disable (sw_if_index, 0);
   vnet_sw_interface_set_flags (vnm, sw_if_index, 0 /* down */ );
   gm->tunnel_index_by_sw_if_index[sw_if_index] = ~0;
   vnet_delete_hw_interface (vnm, t->hw_if_index);

Are we missing anything? Any comments will be appreciated.

Thanks,
Nitin






-=-=-=-=-=-=-=-=-=-=-=-
Links:

You receive all messages sent to this group.

View/Reply Online (#9271): https://lists.fd.io/g/vpp-dev/message/9271
View All Messages In Topic (1): https://lists.fd.io/g/vpp-dev/topic/19199319
Mute This Topic: https://lists.fd.io/mt/19199319/21656
New Topic: https://lists.fd.io/g/vpp-dev/post

Change Your Subscription: https://lists.fd.io/g/vpp-dev/editsub/21656
Group Home: https://lists.fd.io/g/vpp-dev
Contact Group Owner: vpp-dev+ow...@lists.fd.io
Terms of Service: https://lists.fd.io/static/tos
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub
-=-=-=-=-=-=-=-=-=-=-=-