From mboxrd@z Thu Jan 1 00:00:00 1970 From: William Tu Subject: [PATCHv2 net-next 0/2] net: erspan: add support for openvswitch Date: Tue, 9 Jan 2018 17:51:20 -0800 Message-ID: <1515549082-4141-1-git-send-email-u9012063@gmail.com> To: netdev@vger.kernel.org Return-path: Received: from mail-wm0-f68.google.com ([74.125.82.68]:36927 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932975AbeAJBvh (ORCPT ); Tue, 9 Jan 2018 20:51:37 -0500 Received: by mail-wm0-f68.google.com with SMTP id f140so24017788wmd.2 for ; Tue, 09 Jan 2018 17:51:36 -0800 (PST) Received: from sc9-mailhost1.vmware.com ([24.5.191.4]) by smtp.gmail.com with ESMTPSA id p37sm8277712eda.96.2018.01.09.17.51.34 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 Jan 2018 17:51:35 -0800 (PST) Sender: netdev-owner@vger.kernel.org List-ID: The first patch refactors the originally erspan header definitions. Originally, the erspan fields are defined as a group into a __be16 field, and use mask and offset to access each field. This is more costly due to calling ntohs/htons and error-prone. The first patch changes it to use bitfields. The second patch introduces the new OVS tunnel key attribute to program both v1 and v2 erspan tunnel for openvswitch. William Tu (2): net: erspan: use bitfield instead of mask and offset openvswitch: add erspan version II support include/net/erspan.h | 127 ++++++++++++++++++++++++++++---------- include/uapi/linux/openvswitch.h | 13 +++- net/ipv4/ip_gre.c | 38 +++++------- net/ipv6/ip6_gre.c | 36 ++++------- net/openvswitch/flow_netlink.c | 129 ++++++++++++++++++++++++++++++++++++--- 5 files changed, 253 insertions(+), 90 deletions(-) -- v1->v2 Fix compatibility issue suggested by Pravin.