From mboxrd@z Thu Jan 1 00:00:00 1970 From: William Tu Subject: [PATCHv4 net-next 0/2] net: erspan: add support for openvswitch Date: Thu, 18 Jan 2018 14:04:54 -0800 Message-ID: <1516313096-3971-1-git-send-email-u9012063@gmail.com> Cc: pshelar@ovn.org, jbenc@redhat.com To: netdev@vger.kernel.org Return-path: Received: from mail-oi0-f68.google.com ([209.85.218.68]:46847 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752689AbeARWFF (ORCPT ); Thu, 18 Jan 2018 17:05:05 -0500 Received: by mail-oi0-f68.google.com with SMTP id d124so16793985oib.13 for ; Thu, 18 Jan 2018 14:05:05 -0800 (PST) Sender: netdev-owner@vger.kernel.org List-ID: The first patch refactors the 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 I and II support include/net/erspan.h | 127 +++++++++++++++++++++++--------- include/uapi/linux/openvswitch.h | 11 +++ net/ipv4/ip_gre.c | 38 ++++------ net/ipv6/ip6_gre.c | 36 ++++----- net/openvswitch/flow_netlink.c | 154 ++++++++++++++++++++++++++++++++++++++- 5 files changed, 285 insertions(+), 81 deletions(-) --- v3->v4 change from be32 to u32 for OVS_ERSPAN_OPT_IDX, suggested by Jiri Benc. v2->v3 revert the "openvswitch: Add erspan tunnel support." commit ceaa001a170e. redesign the OVS_TUNNEL_KEY_ATTR_ERSPAN_OPTS as nested attribute v1->v2 Fix compatibility issue suggested by Pravin. -- 2.7.4