linux/net/openvswitch/flow.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2007-2017 Nicira, Inc.
 */

#ifndef FLOW_H
#define FLOW_H

#include <linux/cache.h>
#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/cpumask.h>
#include <net/inet_ecn.h>
#include <net/ip_tunnels.h>
#include <net/dst_metadata.h>
#include <net/nsh.h>

struct sk_buff;

enum sw_flow_mac_proto {};
#define SW_FLOW_KEY_INVALID
#define MPLS_LABEL_DEPTH

/* Bit definitions for IPv6 Extension Header pseudo-field. */
enum ofp12_ipv6exthdr_flags {};

/* Store options at the end of the array if they are less than the
 * maximum size. This allows us to get the benefits of variable length
 * matching for small options.
 */
#define TUN_METADATA_OFFSET(opt_len)
#define TUN_METADATA_OPTS(flow_key, opt_len)

struct ovs_tunnel_info {};

struct vlan_head {};

#define OVS_SW_FLOW_KEY_METADATA_SIZE

struct ovs_key_nsh {};

struct sw_flow_key {} __aligned(); /* Ensure that we can do comparisons as longs. */

static inline bool sw_flow_key_is_nd(const struct sw_flow_key *key)
{}

struct sw_flow_key_range {};

struct sw_flow_mask {};

struct sw_flow_match {};

#define MAX_UFID_LENGTH

struct sw_flow_id {};

struct sw_flow_actions {};

struct sw_flow_stats {};

struct sw_flow {};

struct arp_eth_header {} __packed;

static inline u8 ovs_key_mac_proto(const struct sw_flow_key *key)
{}

static inline u16 __ovs_mac_header_len(u8 mac_proto)
{}

static inline u16 ovs_mac_header_len(const struct sw_flow_key *key)
{}

static inline bool ovs_identifier_is_ufid(const struct sw_flow_id *sfid)
{}

static inline bool ovs_identifier_is_key(const struct sw_flow_id *sfid)
{}

void ovs_flow_stats_update(struct sw_flow *, __be16 tcp_flags,
			   const struct sk_buff *);
void ovs_flow_stats_get(const struct sw_flow *, struct ovs_flow_stats *,
			unsigned long *used, __be16 *tcp_flags);
void ovs_flow_stats_clear(struct sw_flow *);
u64 ovs_flow_used_time(unsigned long flow_jiffies);

int ovs_flow_key_update(struct sk_buff *skb, struct sw_flow_key *key);
int ovs_flow_key_update_l3l4(struct sk_buff *skb, struct sw_flow_key *key);
int ovs_flow_key_extract(const struct ip_tunnel_info *tun_info,
			 struct sk_buff *skb,
			 struct sw_flow_key *key);
/* Extract key from packet coming from userspace. */
int ovs_flow_key_extract_userspace(struct net *net, const struct nlattr *attr,
				   struct sk_buff *skb,
				   struct sw_flow_key *key, bool log);

#endif /* flow.h */