On Fri, Feb 14, 2020 at 01:14:10PM -0800, William Tu wrote: > On Tue, Feb 11, 2020 at 06:21:37PM +0800, [email protected] wrote: > > From: Yi Yang <[email protected]> > > > > We can avoid high system call overhead by using TPACKET_V3 > > and using DPDK-like poll to receive and send packets (Note: send > > still needs to call sendto to trigger final packet transmission). > > > > From Linux kernel 3.10 on, TPACKET_V3 has been supported, > > so all the Linux kernels current OVS supports can run > > TPACKET_V3 without any problem. > > > > I can see about 30% performance improvement for veth compared to > > last recvmmsg optimization if I use TPACKET_V3, it is about 1.98 > > Gbps, but it was 1.47 Gbps before. > > > > Note: Linux kernel TPACKET_V3 can't support TSO, so the performance > > is very poor, please turn off tso for veth interfces in case > > userspace-tso-enable is set to true. > > > > Signed-off-by: Yi Yang <[email protected]> > > Co-authored-by: William Tu <[email protected]> > > Signed-off-by: William Tu <[email protected]> > > --- > > acinclude.m4 | 12 ++ > > configure.ac | 1 + > > include/linux/automake.mk | 1 + > > include/linux/if_packet.h | 126 +++++++++++++ > > include/sparse/linux/if_packet.h | 108 +++++++++++ > > lib/netdev-linux-private.h | 22 +++ > > lib/netdev-linux.c | 375 > > ++++++++++++++++++++++++++++++++++++++- > > 7 files changed, 640 insertions(+), 5 deletions(-) > > create mode 100644 include/linux/if_packet.h > > > > Changelog: > > - v2->v3 > > * Fix build issues in case HAVE_TPACKET_V3 is not defined > > * Add tso-related support code > > * make sure it can work normally in case userspace-tso-enable is true > > > > - v1->v2 > > * Remove TPACKET_V1 and TPACKET_V2 which is obsolete > > * Add include/linux/if_packet.h > > * Change include/sparse/linux/if_packet.h > > > > diff --git a/acinclude.m4 b/acinclude.m4 > > index 1212a46..b39bbb9 100644 > > I applied this patch and tested on travis. Most of them fail. > https://travis-ci.org/williamtu/ovs-travis/builds/650613663 > > Are you able to run travis build? > > Thanks > William > More details about compile fail at https://api.travis-ci.org/v3/job/650613667/log.txt
libtool: compile: env REAL_CC=gcc "CHECK=sparse -Wsparse-error -I ./include/sparse -m64 -I /usr/local/include -I /usr/include/x86_64-linux-gnu " cgcc -target=x86_64 -target=host_os_specs -D__MMX__=1 -D__SSE2_MATH__=1 -D__SSE_MATH__=1 -D__SSE2__=1 -D__SSE__=1 -DHAVE_CONFIG_H -I. -I ./include -I ./include -I ./lib -I ./lib -Wstrict-prototypes -Wall -Wextra -Wno-sign-compare -Wpointer-arith -Wformat -Wformat-security -Wswitch-enum -Wunused-parameter -Wbad-function-cast -Wcast-align -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-field-initializers -fno-strict-aliasing -Wswitch-bool -Wlogical-not-parentheses -Wsizeof-array-argument -Wbool-compare -Wshadow -Werror -Werror -g -O2 -MT lib/if-notifier.lo -MD -MP -MF lib/.deps/if-notifier.Tpo -c lib/if-notifier.c -o lib/if-notifier.o ./include/sparse/linux/if_packet.h:16:18: error: expected ; at end of declaration ./include/sparse/linux/if_packet.h:16:18: error: Expected } at end of struct-union-enum-specifier ./include/sparse/linux/if_packet.h:16:18: error: got spkt_protocol ./include/sparse/linux/if_packet.h:17:1: error: missing identifier in declaration ./include/sparse/linux/if_packet.h:17:1: error: Expected ; at the end of type declaration ./include/sparse/linux/if_packet.h:17:1: error: got } ./include/sparse/linux/if_packet.h:22:25: error: expected ; at end of declaration ./include/sparse/linux/if_packet.h:22:25: error: Expected } at end of struct-union-enum-specifier ./include/sparse/linux/if_packet.h:22:25: error: got sll_protocol ./include/sparse/linux/if_packet.h:28:1: error: missing identifier in declaration ./include/sparse/linux/if_packet.h:28:1: error: Expected ; at the end of type declaration ./include/sparse/linux/if_packet.h:28:1: error: got } ./include/sparse/linux/if_packet.h:23:25: error: symbol 'sll_ifindex' was not declared. Should it be static? ./include/sparse/linux/if_packet.h:24:25: error: symbol 'sll_hatype' was not declared. Should it be static? ./include/sparse/linux/if_packet.h:25:25: error: symbol 'sll_pkttype' was not declared. Should it be static? ./include/sparse/linux/if_packet.h:26:25: error: symbol 'sll_halen' was not declared. Should it be static? ./include/sparse/linux/if_packet.h:27:25: error: symbol 'sll_addr' was not declared. Should it be static? lib/netdev-linux.c:1197:51: error: incorrect type in argument 3 (different base types) lib/netdev-linux.c:1197:51: expected int lib/netdev-linux.c:1197:51: got restricted ovs_be16 lib/netdev-linux.c:1280:12: error: no member 'sll_hatype' in struct rpl_sockaddr_ll lib/netdev-linux.c:1281:12: error: no member 'sll_pkttype' in struct rpl_sockaddr_ll lib/netdev-linux.c:1282:12: error: no member 'sll_halen' in struct rpl_sockaddr_ll lib/netdev-linux.c:1284:12: error: no member 'sll_ifindex' in struct rpl_sockaddr_ll lib/netdev-linux.c:1285:12: error: no member 'sll_protocol' in struct rpl_sockaddr_ll lib/netdev-linux.c:1142:30: error: Using plain integer as NULL pointer Makefile:4261: recipe for target 'lib/netdev-linux.lo' failed make[2]: *** [lib/netdev-linux.lo] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: Leaving directory '/home/travis/build/williamtu/ovs-travis' Makefile:4990: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/home/travis/build/williamtu/ovs-travis' Makefile:2750: recipe for target 'all' failed make: *** [all] Error 2 +cat config.log _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
