Glaze,

Thanks for your helpful information.

BTW, I noticed that "tcpdump -i vpp0" cause VPP process crush while using rtnl.

I have not researched root cause yet, and I will avoid to use tcpdump in 
production area as workaround.


Thanks,

Tatsumi.

________________________________
差出人: Glaza <gla...@wp.pl>
送信日時: 2018年6月1日 18:10:11
宛先: 立見 祐介
CC: vpp-dev
件名: Odp: RE: [vpp-dev] Failed to build vppsb router plugin (librtnl)


Yes I do see error without lacp.



Yusuke Tatsumi <ytats...@yahoo-corp.jp> wrote

Hi Glaza,



Thanks for your patch!

I also build successfully with your patch on CentOS 7.3 (kernel 3.10).





> But when I tried to use it with lacp I got:
> rtnl_ns_recv:398: Received notification while in sync. Restart 
> synchronization.
> rtnl_process_read:462: rtnetlink recv error (29) []: Bad file descriptor
Do you think this recv error caused by lacp interconnection between VPP and 
counter switch?



In other words, do you see error without lacp?



Thanks,

Yusuke.

________________________________
差出人: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> が Glaza <gla...@wp.pl> の代理で送信
送信日時: 2018年5月22日 20:13:02
宛先: vpp-dev
件名: Re: [vpp-dev] Failed to build vppsb router plugin (librtnl)

Hi Yusuke,

I did:
diff --git a/netlink/librtnl/netns.c b/netlink/librtnl/netns.c
index 1b40227..f899f28 100644
--- a/netlink/librtnl/netns.c
+++ b/netlink/librtnl/netns.c
@@ -66,7 +66,7 @@ u8 *format_ns_link (u8 *s, va_list *args)
 #define ns_foreach_rta                          \
   _(RTA_DST, dst, 1)                            \
   _(RTA_SRC, src, 1)                            \
-  _(RTA_VIA, via, 1)                            \
+  _(__RH_RESERVED_RTA_VIA, via, 1)              \
   _(RTA_GATEWAY, gateway, 1)                    \
   _(RTA_IIF, iif, 1)                            \
   _(RTA_OIF, oif, 1)                            \
diff --git a/netlink/librtnl/rtnl.c b/netlink/librtnl/rtnl.c
index 14ea0e8..2d22bd5 100644
--- a/netlink/librtnl/rtnl.c
+++ b/netlink/librtnl/rtnl.c
@@ -263,7 +263,7 @@ static int rtnl_socket_open(rtnl_ns_t *ns)
     .nl_groups = grpmask(RTNLGRP_LINK)| grpmask(RTNLGRP_IPV6_IFADDR) |
     grpmask(RTNLGRP_IPV4_IFADDR) | grpmask(RTNLGRP_IPV4_ROUTE) |
     grpmask(RTNLGRP_IPV6_ROUTE) | grpmask(RTNLGRP_NEIGH) |
-    grpmask(RTNLGRP_NOTIFY) | grpmask(RTNLGRP_MPLS_ROUTE),
+    grpmask(RTNLGRP_NOTIFY) | grpmask(__RH_RESERVED_RTNLGRP_MPLS_ROUTE),
   };

   if (bind(ns->rtnl_socket, (struct sockaddr*) &addr, sizeof(addr))) {
diff --git a/router/Makefile.am b/router/Makefile.am
index b9de6a1..d16f103 100644
--- a/router/Makefile.am
+++ b/router/Makefile.am
@@ -1,6 +1,6 @@
 AUTOMAKE_OPTIONS = foreign subdir-objects

-AM_CFLAGS = -Wall -I@TOOLKIT_INCLUDE@
+AM_CFLAGS = -std=gnu99 -Wall -I@TOOLKIT_INCLUDE@

 lib_LTLIBRARIES = router.la
 router_la_SOURCES = router/tap_inject.c \
diff --git a/router/router/tap_inject_netlink.c 
b/router/router/tap_inject_netlink.c
index 3dca013..8f30216 100644
--- a/router/router/tap_inject_netlink.c
+++ b/router/router/tap_inject_netlink.c
@@ -33,6 +33,14 @@
 #include <linux/mpls.h>
 #include <vnet/mpls/packet.h>

+#define AF_MPLS                28      /* MPLS */
+
+/* RTA_VIA */
+struct rtvia {
+       __kernel_sa_family_t    rtvia_family;
+       __u8                    rtvia_addr[0];
+};
+
 static void
 add_del_addr (ns_addr_t * a, int is_del)
 {

But when I tried to use it with lacp I got:
rtnl_ns_recv:398: Received notification while in sync. Restart synchronization.
rtnl_process_read:462: rtnetlink recv error (29) []: Bad file descriptor








Reply via email to