mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-15 09:56:58 +07:00
b2d0f5d5dc
v16->17 - Fixed disputed check code: keep them in nsh_push and nsh_pop but also add them in __ovs_nla_copy_actions v15->v16 - Add csum recalculation for nsh_push, nsh_pop and set_nsh pointed out by Pravin - Move nsh key into the union with ipv4 and ipv6 and add check for nsh key in match_validate pointed out by Pravin - Add nsh check in validate_set and __ovs_nla_copy_actions v14->v15 - Check size in nsh_hdr_from_nlattr - Fixed four small issues pointed out By Jiri and Eric v13->v14 - Rename skb_push_nsh to nsh_push per Dave's comment - Rename skb_pop_nsh to nsh_pop per Dave's comment v12->v13 - Fix NSH header length check in set_nsh v11->v12 - Fix missing changes old comments pointed out - Fix new comments for v11 v10->v11 - Fix the left three disputable comments for v9 but not fixed in v10. v9->v10 - Change struct ovs_key_nsh to struct ovs_nsh_key_base base; __be32 context[NSH_MD1_CONTEXT_SIZE]; - Fix new comments for v9 v8->v9 - Fix build error reported by daily intel build because nsh module isn't selected by openvswitch v7->v8 - Rework nested value and mask for OVS_KEY_ATTR_NSH - Change pop_nsh to adapt to nsh kernel module - Fix many issues per comments from Jiri Benc v6->v7 - Remove NSH GSO patches in v6 because Jiri Benc reworked it as another patch series and they have been merged. - Change it to adapt to nsh kernel module added by NSH GSO patch series v5->v6 - Fix the rest comments for v4. - Add NSH GSO support for VxLAN-gpe + NSH and Eth + NSH. v4->v5 - Fix many comments by Jiri Benc and Eric Garver for v4. v3->v4 - Add new NSH match field ttl - Update NSH header to the latest format which will be final format and won't change per its author's confirmation. - Fix comments for v3. v2->v3 - Change OVS_KEY_ATTR_NSH to nested key to handle length-fixed attributes and length-variable attriubte more flexibly. - Remove struct ovs_action_push_nsh completely - Add code to handle nested attribute for SET_MASKED - Change PUSH_NSH to use the nested OVS_KEY_ATTR_NSH to transfer NSH header data. - Fix comments and coding style issues by Jiri and Eric v1->v2 - Change encap_nsh and decap_nsh to push_nsh and pop_nsh - Dynamically allocate struct ovs_action_push_nsh for length-variable metadata. OVS master and 2.8 branch has merged NSH userspace patch series, this patch is to enable NSH support in kernel data path in order that OVS can support NSH in compat mode by porting this. Signed-off-by: Yi Yang <yi.y.yang@intel.com> Acked-by: Jiri Benc <jbenc@redhat.com> Acked-by: Eric Garver <e@erig.me> Acked-by: Pravin Shelar <pshelar@ovn.org> Signed-off-by: David S. Miller <davem@davemloft.net>
88 lines
3.1 KiB
C
88 lines
3.1 KiB
C
/*
|
|
* Copyright (c) 2007-2013 Nicira, Inc.
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of version 2 of the GNU General Public
|
|
* License as published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful, but
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
* 02110-1301, USA
|
|
*/
|
|
|
|
|
|
#ifndef FLOW_NETLINK_H
|
|
#define FLOW_NETLINK_H 1
|
|
|
|
#include <linux/kernel.h>
|
|
#include <linux/netlink.h>
|
|
#include <linux/openvswitch.h>
|
|
#include <linux/spinlock.h>
|
|
#include <linux/types.h>
|
|
#include <linux/rcupdate.h>
|
|
#include <linux/if_ether.h>
|
|
#include <linux/in6.h>
|
|
#include <linux/jiffies.h>
|
|
#include <linux/time.h>
|
|
#include <linux/flex_array.h>
|
|
|
|
#include <net/inet_ecn.h>
|
|
#include <net/ip_tunnels.h>
|
|
|
|
#include "flow.h"
|
|
|
|
size_t ovs_tun_key_attr_size(void);
|
|
size_t ovs_key_attr_size(void);
|
|
|
|
void ovs_match_init(struct sw_flow_match *match,
|
|
struct sw_flow_key *key, bool reset_key,
|
|
struct sw_flow_mask *mask);
|
|
|
|
int ovs_nla_put_key(const struct sw_flow_key *, const struct sw_flow_key *,
|
|
int attr, bool is_mask, struct sk_buff *);
|
|
int parse_flow_nlattrs(const struct nlattr *attr, const struct nlattr *a[],
|
|
u64 *attrsp, bool log);
|
|
int ovs_nla_get_flow_metadata(struct net *net,
|
|
const struct nlattr *a[OVS_KEY_ATTR_MAX + 1],
|
|
u64 attrs, struct sw_flow_key *key, bool log);
|
|
|
|
int ovs_nla_put_identifier(const struct sw_flow *flow, struct sk_buff *skb);
|
|
int ovs_nla_put_masked_key(const struct sw_flow *flow, struct sk_buff *skb);
|
|
int ovs_nla_put_mask(const struct sw_flow *flow, struct sk_buff *skb);
|
|
|
|
int ovs_nla_get_match(struct net *, struct sw_flow_match *,
|
|
const struct nlattr *key, const struct nlattr *mask,
|
|
bool log);
|
|
|
|
int ovs_nla_put_tunnel_info(struct sk_buff *skb,
|
|
struct ip_tunnel_info *tun_info);
|
|
|
|
bool ovs_nla_get_ufid(struct sw_flow_id *, const struct nlattr *, bool log);
|
|
int ovs_nla_get_identifier(struct sw_flow_id *sfid, const struct nlattr *ufid,
|
|
const struct sw_flow_key *key, bool log);
|
|
u32 ovs_nla_get_ufid_flags(const struct nlattr *attr);
|
|
|
|
int ovs_nla_copy_actions(struct net *net, const struct nlattr *attr,
|
|
const struct sw_flow_key *key,
|
|
struct sw_flow_actions **sfa, bool log);
|
|
int ovs_nla_add_action(struct sw_flow_actions **sfa, int attrtype,
|
|
void *data, int len, bool log);
|
|
int ovs_nla_put_actions(const struct nlattr *attr,
|
|
int len, struct sk_buff *skb);
|
|
|
|
void ovs_nla_free_flow_actions(struct sw_flow_actions *);
|
|
void ovs_nla_free_flow_actions_rcu(struct sw_flow_actions *);
|
|
|
|
int nsh_key_from_nlattr(const struct nlattr *attr, struct ovs_key_nsh *nsh,
|
|
struct ovs_key_nsh *nsh_mask);
|
|
int nsh_hdr_from_nlattr(const struct nlattr *attr, struct nshhdr *nh,
|
|
size_t size);
|
|
|
|
#endif /* flow_netlink.h */
|