Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include/linux
File: openvswitch.h
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
[0] Fix | Delete
[1] Fix | Delete
/*
[2] Fix | Delete
* Copyright (c) 2007-2017 Nicira, Inc.
[3] Fix | Delete
*
[4] Fix | Delete
* This program is free software; you can redistribute it and/or
[5] Fix | Delete
* modify it under the terms of version 2 of the GNU General Public
[6] Fix | Delete
* License as published by the Free Software Foundation.
[7] Fix | Delete
*
[8] Fix | Delete
* This program is distributed in the hope that it will be useful, but
[9] Fix | Delete
* WITHOUT ANY WARRANTY; without even the implied warranty of
[10] Fix | Delete
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
[11] Fix | Delete
* General Public License for more details.
[12] Fix | Delete
*
[13] Fix | Delete
* You should have received a copy of the GNU General Public License
[14] Fix | Delete
* along with this program; if not, write to the Free Software
[15] Fix | Delete
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
[16] Fix | Delete
* 02110-1301, USA
[17] Fix | Delete
*/
[18] Fix | Delete
[19] Fix | Delete
#ifndef __LINUX_OPENVSWITCH_H
[20] Fix | Delete
#define __LINUX_OPENVSWITCH_H 1
[21] Fix | Delete
[22] Fix | Delete
#include <linux/types.h>
[23] Fix | Delete
#include <linux/if_ether.h>
[24] Fix | Delete
[25] Fix | Delete
/**
[26] Fix | Delete
* struct ovs_header - header for OVS Generic Netlink messages.
[27] Fix | Delete
* @dp_ifindex: ifindex of local port for datapath (0 to make a request not
[28] Fix | Delete
* specific to a datapath).
[29] Fix | Delete
*
[30] Fix | Delete
* Attributes following the header are specific to a particular OVS Generic
[31] Fix | Delete
* Netlink family, but all of the OVS families use this header.
[32] Fix | Delete
*/
[33] Fix | Delete
[34] Fix | Delete
struct ovs_header {
[35] Fix | Delete
int dp_ifindex;
[36] Fix | Delete
};
[37] Fix | Delete
[38] Fix | Delete
/* Datapaths. */
[39] Fix | Delete
[40] Fix | Delete
#define OVS_DATAPATH_FAMILY "ovs_datapath"
[41] Fix | Delete
#define OVS_DATAPATH_MCGROUP "ovs_datapath"
[42] Fix | Delete
[43] Fix | Delete
/* V2:
[44] Fix | Delete
* - API users are expected to provide OVS_DP_ATTR_USER_FEATURES
[45] Fix | Delete
* when creating the datapath.
[46] Fix | Delete
*/
[47] Fix | Delete
#define OVS_DATAPATH_VERSION 2
[48] Fix | Delete
[49] Fix | Delete
/* First OVS datapath version to support features */
[50] Fix | Delete
#define OVS_DP_VER_FEATURES 2
[51] Fix | Delete
[52] Fix | Delete
enum ovs_datapath_cmd {
[53] Fix | Delete
OVS_DP_CMD_UNSPEC,
[54] Fix | Delete
OVS_DP_CMD_NEW,
[55] Fix | Delete
OVS_DP_CMD_DEL,
[56] Fix | Delete
OVS_DP_CMD_GET,
[57] Fix | Delete
OVS_DP_CMD_SET
[58] Fix | Delete
};
[59] Fix | Delete
[60] Fix | Delete
/**
[61] Fix | Delete
* enum ovs_datapath_attr - attributes for %OVS_DP_* commands.
[62] Fix | Delete
* @OVS_DP_ATTR_NAME: Name of the network device that serves as the "local
[63] Fix | Delete
* port". This is the name of the network device whose dp_ifindex is given in
[64] Fix | Delete
* the &struct ovs_header. Always present in notifications. Required in
[65] Fix | Delete
* %OVS_DP_NEW requests. May be used as an alternative to specifying
[66] Fix | Delete
* dp_ifindex in other requests (with a dp_ifindex of 0).
[67] Fix | Delete
* @OVS_DP_ATTR_UPCALL_PID: The Netlink socket in userspace that is initially
[68] Fix | Delete
* set on the datapath port (for OVS_ACTION_ATTR_MISS). Only valid on
[69] Fix | Delete
* %OVS_DP_CMD_NEW requests. A value of zero indicates that upcalls should
[70] Fix | Delete
* not be sent.
[71] Fix | Delete
* @OVS_DP_ATTR_PER_CPU_PIDS: Per-cpu array of PIDs for upcalls when
[72] Fix | Delete
* OVS_DP_F_DISPATCH_UPCALL_PER_CPU feature is set.
[73] Fix | Delete
* @OVS_DP_ATTR_STATS: Statistics about packets that have passed through the
[74] Fix | Delete
* datapath. Always present in notifications.
[75] Fix | Delete
* @OVS_DP_ATTR_MEGAFLOW_STATS: Statistics about mega flow masks usage for the
[76] Fix | Delete
* datapath. Always present in notifications.
[77] Fix | Delete
* @OVS_DP_ATTR_IFINDEX: Interface index for a new datapath netdev. Only
[78] Fix | Delete
* valid for %OVS_DP_CMD_NEW requests.
[79] Fix | Delete
*
[80] Fix | Delete
* These attributes follow the &struct ovs_header within the Generic Netlink
[81] Fix | Delete
* payload for %OVS_DP_* commands.
[82] Fix | Delete
*/
[83] Fix | Delete
enum ovs_datapath_attr {
[84] Fix | Delete
OVS_DP_ATTR_UNSPEC,
[85] Fix | Delete
OVS_DP_ATTR_NAME, /* name of dp_ifindex netdev */
[86] Fix | Delete
OVS_DP_ATTR_UPCALL_PID, /* Netlink PID to receive upcalls */
[87] Fix | Delete
OVS_DP_ATTR_STATS, /* struct ovs_dp_stats */
[88] Fix | Delete
OVS_DP_ATTR_MEGAFLOW_STATS, /* struct ovs_dp_megaflow_stats */
[89] Fix | Delete
OVS_DP_ATTR_USER_FEATURES, /* OVS_DP_F_* */
[90] Fix | Delete
OVS_DP_ATTR_PAD,
[91] Fix | Delete
OVS_DP_ATTR_MASKS_CACHE_SIZE,
[92] Fix | Delete
OVS_DP_ATTR_PER_CPU_PIDS, /* Netlink PIDS to receive upcalls in
[93] Fix | Delete
* per-cpu dispatch mode
[94] Fix | Delete
*/
[95] Fix | Delete
OVS_DP_ATTR_IFINDEX,
[96] Fix | Delete
__OVS_DP_ATTR_MAX
[97] Fix | Delete
};
[98] Fix | Delete
[99] Fix | Delete
#define OVS_DP_ATTR_MAX (__OVS_DP_ATTR_MAX - 1)
[100] Fix | Delete
[101] Fix | Delete
struct ovs_dp_stats {
[102] Fix | Delete
__u64 n_hit; /* Number of flow table matches. */
[103] Fix | Delete
__u64 n_missed; /* Number of flow table misses. */
[104] Fix | Delete
__u64 n_lost; /* Number of misses not sent to userspace. */
[105] Fix | Delete
__u64 n_flows; /* Number of flows present */
[106] Fix | Delete
};
[107] Fix | Delete
[108] Fix | Delete
struct ovs_dp_megaflow_stats {
[109] Fix | Delete
__u64 n_mask_hit; /* Number of masks used for flow lookups. */
[110] Fix | Delete
__u32 n_masks; /* Number of masks for the datapath. */
[111] Fix | Delete
__u32 pad0; /* Pad for future expension. */
[112] Fix | Delete
__u64 n_cache_hit; /* Number of cache matches for flow lookups. */
[113] Fix | Delete
__u64 pad1; /* Pad for future expension. */
[114] Fix | Delete
};
[115] Fix | Delete
[116] Fix | Delete
struct ovs_vport_stats {
[117] Fix | Delete
__u64 rx_packets; /* total packets received */
[118] Fix | Delete
__u64 tx_packets; /* total packets transmitted */
[119] Fix | Delete
__u64 rx_bytes; /* total bytes received */
[120] Fix | Delete
__u64 tx_bytes; /* total bytes transmitted */
[121] Fix | Delete
__u64 rx_errors; /* bad packets received */
[122] Fix | Delete
__u64 tx_errors; /* packet transmit problems */
[123] Fix | Delete
__u64 rx_dropped; /* no space in linux buffers */
[124] Fix | Delete
__u64 tx_dropped; /* no space available in linux */
[125] Fix | Delete
};
[126] Fix | Delete
[127] Fix | Delete
/* Allow last Netlink attribute to be unaligned */
[128] Fix | Delete
#define OVS_DP_F_UNALIGNED (1 << 0)
[129] Fix | Delete
[130] Fix | Delete
/* Allow datapath to associate multiple Netlink PIDs to each vport */
[131] Fix | Delete
#define OVS_DP_F_VPORT_PIDS (1 << 1)
[132] Fix | Delete
[133] Fix | Delete
/* Allow tc offload recirc sharing */
[134] Fix | Delete
#define OVS_DP_F_TC_RECIRC_SHARING (1 << 2)
[135] Fix | Delete
[136] Fix | Delete
/* Allow per-cpu dispatch of upcalls */
[137] Fix | Delete
#define OVS_DP_F_DISPATCH_UPCALL_PER_CPU (1 << 3)
[138] Fix | Delete
[139] Fix | Delete
/* Fixed logical ports. */
[140] Fix | Delete
#define OVSP_LOCAL ((__u32)0)
[141] Fix | Delete
[142] Fix | Delete
/* Packet transfer. */
[143] Fix | Delete
[144] Fix | Delete
#define OVS_PACKET_FAMILY "ovs_packet"
[145] Fix | Delete
#define OVS_PACKET_VERSION 0x1
[146] Fix | Delete
[147] Fix | Delete
enum ovs_packet_cmd {
[148] Fix | Delete
OVS_PACKET_CMD_UNSPEC,
[149] Fix | Delete
[150] Fix | Delete
/* Kernel-to-user notifications. */
[151] Fix | Delete
OVS_PACKET_CMD_MISS, /* Flow table miss. */
[152] Fix | Delete
OVS_PACKET_CMD_ACTION, /* OVS_ACTION_ATTR_USERSPACE action. */
[153] Fix | Delete
[154] Fix | Delete
/* Userspace commands. */
[155] Fix | Delete
OVS_PACKET_CMD_EXECUTE /* Apply actions to a packet. */
[156] Fix | Delete
};
[157] Fix | Delete
[158] Fix | Delete
/**
[159] Fix | Delete
* enum ovs_packet_attr - attributes for %OVS_PACKET_* commands.
[160] Fix | Delete
* @OVS_PACKET_ATTR_PACKET: Present for all notifications. Contains the entire
[161] Fix | Delete
* packet as received, from the start of the Ethernet header onward. For
[162] Fix | Delete
* %OVS_PACKET_CMD_ACTION, %OVS_PACKET_ATTR_PACKET reflects changes made by
[163] Fix | Delete
* actions preceding %OVS_ACTION_ATTR_USERSPACE, but %OVS_PACKET_ATTR_KEY is
[164] Fix | Delete
* the flow key extracted from the packet as originally received.
[165] Fix | Delete
* @OVS_PACKET_ATTR_KEY: Present for all notifications. Contains the flow key
[166] Fix | Delete
* extracted from the packet as nested %OVS_KEY_ATTR_* attributes. This allows
[167] Fix | Delete
* userspace to adapt its flow setup strategy by comparing its notion of the
[168] Fix | Delete
* flow key against the kernel's.
[169] Fix | Delete
* @OVS_PACKET_ATTR_ACTIONS: Contains actions for the packet. Used
[170] Fix | Delete
* for %OVS_PACKET_CMD_EXECUTE. It has nested %OVS_ACTION_ATTR_* attributes.
[171] Fix | Delete
* Also used in upcall when %OVS_ACTION_ATTR_USERSPACE has optional
[172] Fix | Delete
* %OVS_USERSPACE_ATTR_ACTIONS attribute.
[173] Fix | Delete
* @OVS_PACKET_ATTR_USERDATA: Present for an %OVS_PACKET_CMD_ACTION
[174] Fix | Delete
* notification if the %OVS_ACTION_ATTR_USERSPACE action specified an
[175] Fix | Delete
* %OVS_USERSPACE_ATTR_USERDATA attribute, with the same length and content
[176] Fix | Delete
* specified there.
[177] Fix | Delete
* @OVS_PACKET_ATTR_EGRESS_TUN_KEY: Present for an %OVS_PACKET_CMD_ACTION
[178] Fix | Delete
* notification if the %OVS_ACTION_ATTR_USERSPACE action specified an
[179] Fix | Delete
* %OVS_USERSPACE_ATTR_EGRESS_TUN_PORT attribute, which is sent only if the
[180] Fix | Delete
* output port is actually a tunnel port. Contains the output tunnel key
[181] Fix | Delete
* extracted from the packet as nested %OVS_TUNNEL_KEY_ATTR_* attributes.
[182] Fix | Delete
* @OVS_PACKET_ATTR_MRU: Present for an %OVS_PACKET_CMD_ACTION and
[183] Fix | Delete
* @OVS_PACKET_ATTR_LEN: Packet size before truncation.
[184] Fix | Delete
* %OVS_PACKET_ATTR_USERSPACE action specify the Maximum received fragment
[185] Fix | Delete
* size.
[186] Fix | Delete
* @OVS_PACKET_ATTR_HASH: Packet hash info (e.g. hash, sw_hash and l4_hash in skb).
[187] Fix | Delete
*
[188] Fix | Delete
* These attributes follow the &struct ovs_header within the Generic Netlink
[189] Fix | Delete
* payload for %OVS_PACKET_* commands.
[190] Fix | Delete
*/
[191] Fix | Delete
enum ovs_packet_attr {
[192] Fix | Delete
OVS_PACKET_ATTR_UNSPEC,
[193] Fix | Delete
OVS_PACKET_ATTR_PACKET, /* Packet data. */
[194] Fix | Delete
OVS_PACKET_ATTR_KEY, /* Nested OVS_KEY_ATTR_* attributes. */
[195] Fix | Delete
OVS_PACKET_ATTR_ACTIONS, /* Nested OVS_ACTION_ATTR_* attributes. */
[196] Fix | Delete
OVS_PACKET_ATTR_USERDATA, /* OVS_ACTION_ATTR_USERSPACE arg. */
[197] Fix | Delete
OVS_PACKET_ATTR_EGRESS_TUN_KEY, /* Nested OVS_TUNNEL_KEY_ATTR_*
[198] Fix | Delete
attributes. */
[199] Fix | Delete
OVS_PACKET_ATTR_UNUSED1,
[200] Fix | Delete
OVS_PACKET_ATTR_UNUSED2,
[201] Fix | Delete
OVS_PACKET_ATTR_PROBE, /* Packet operation is a feature probe,
[202] Fix | Delete
error logging should be suppressed. */
[203] Fix | Delete
OVS_PACKET_ATTR_MRU, /* Maximum received IP fragment size. */
[204] Fix | Delete
OVS_PACKET_ATTR_LEN, /* Packet size before truncation. */
[205] Fix | Delete
OVS_PACKET_ATTR_HASH, /* Packet hash. */
[206] Fix | Delete
__OVS_PACKET_ATTR_MAX
[207] Fix | Delete
};
[208] Fix | Delete
[209] Fix | Delete
#define OVS_PACKET_ATTR_MAX (__OVS_PACKET_ATTR_MAX - 1)
[210] Fix | Delete
[211] Fix | Delete
/* Virtual ports. */
[212] Fix | Delete
[213] Fix | Delete
#define OVS_VPORT_FAMILY "ovs_vport"
[214] Fix | Delete
#define OVS_VPORT_MCGROUP "ovs_vport"
[215] Fix | Delete
#define OVS_VPORT_VERSION 0x1
[216] Fix | Delete
[217] Fix | Delete
enum ovs_vport_cmd {
[218] Fix | Delete
OVS_VPORT_CMD_UNSPEC,
[219] Fix | Delete
OVS_VPORT_CMD_NEW,
[220] Fix | Delete
OVS_VPORT_CMD_DEL,
[221] Fix | Delete
OVS_VPORT_CMD_GET,
[222] Fix | Delete
OVS_VPORT_CMD_SET
[223] Fix | Delete
};
[224] Fix | Delete
[225] Fix | Delete
enum ovs_vport_type {
[226] Fix | Delete
OVS_VPORT_TYPE_UNSPEC,
[227] Fix | Delete
OVS_VPORT_TYPE_NETDEV, /* network device */
[228] Fix | Delete
OVS_VPORT_TYPE_INTERNAL, /* network device implemented by datapath */
[229] Fix | Delete
OVS_VPORT_TYPE_GRE, /* GRE tunnel. */
[230] Fix | Delete
OVS_VPORT_TYPE_VXLAN, /* VXLAN tunnel. */
[231] Fix | Delete
OVS_VPORT_TYPE_GENEVE, /* Geneve tunnel. */
[232] Fix | Delete
__OVS_VPORT_TYPE_MAX
[233] Fix | Delete
};
[234] Fix | Delete
[235] Fix | Delete
#define OVS_VPORT_TYPE_MAX (__OVS_VPORT_TYPE_MAX - 1)
[236] Fix | Delete
[237] Fix | Delete
/**
[238] Fix | Delete
* enum ovs_vport_attr - attributes for %OVS_VPORT_* commands.
[239] Fix | Delete
* @OVS_VPORT_ATTR_PORT_NO: 32-bit port number within datapath.
[240] Fix | Delete
* @OVS_VPORT_ATTR_TYPE: 32-bit %OVS_VPORT_TYPE_* constant describing the type
[241] Fix | Delete
* of vport.
[242] Fix | Delete
* @OVS_VPORT_ATTR_NAME: Name of vport. For a vport based on a network device
[243] Fix | Delete
* this is the name of the network device. Maximum length %IFNAMSIZ-1 bytes
[244] Fix | Delete
* plus a null terminator.
[245] Fix | Delete
* @OVS_VPORT_ATTR_OPTIONS: Vport-specific configuration information.
[246] Fix | Delete
* @OVS_VPORT_ATTR_UPCALL_PID: The array of Netlink socket pids in userspace
[247] Fix | Delete
* among which OVS_PACKET_CMD_MISS upcalls will be distributed for packets
[248] Fix | Delete
* received on this port. If this is a single-element array of value 0,
[249] Fix | Delete
* upcalls should not be sent.
[250] Fix | Delete
* @OVS_VPORT_ATTR_STATS: A &struct ovs_vport_stats giving statistics for
[251] Fix | Delete
* packets sent or received through the vport.
[252] Fix | Delete
*
[253] Fix | Delete
* These attributes follow the &struct ovs_header within the Generic Netlink
[254] Fix | Delete
* payload for %OVS_VPORT_* commands.
[255] Fix | Delete
*
[256] Fix | Delete
* For %OVS_VPORT_CMD_NEW requests, the %OVS_VPORT_ATTR_TYPE and
[257] Fix | Delete
* %OVS_VPORT_ATTR_NAME attributes are required. %OVS_VPORT_ATTR_PORT_NO is
[258] Fix | Delete
* optional; if not specified a free port number is automatically selected.
[259] Fix | Delete
* Whether %OVS_VPORT_ATTR_OPTIONS is required or optional depends on the type
[260] Fix | Delete
* of vport.
[261] Fix | Delete
*
[262] Fix | Delete
* For other requests, if %OVS_VPORT_ATTR_NAME is specified then it is used to
[263] Fix | Delete
* look up the vport to operate on; otherwise dp_idx from the &struct
[264] Fix | Delete
* ovs_header plus %OVS_VPORT_ATTR_PORT_NO determine the vport.
[265] Fix | Delete
*/
[266] Fix | Delete
enum ovs_vport_attr {
[267] Fix | Delete
OVS_VPORT_ATTR_UNSPEC,
[268] Fix | Delete
OVS_VPORT_ATTR_PORT_NO, /* u32 port number within datapath */
[269] Fix | Delete
OVS_VPORT_ATTR_TYPE, /* u32 OVS_VPORT_TYPE_* constant. */
[270] Fix | Delete
OVS_VPORT_ATTR_NAME, /* string name, up to IFNAMSIZ bytes long */
[271] Fix | Delete
OVS_VPORT_ATTR_OPTIONS, /* nested attributes, varies by vport type */
[272] Fix | Delete
OVS_VPORT_ATTR_UPCALL_PID, /* array of u32 Netlink socket PIDs for */
[273] Fix | Delete
/* receiving upcalls */
[274] Fix | Delete
OVS_VPORT_ATTR_STATS, /* struct ovs_vport_stats */
[275] Fix | Delete
OVS_VPORT_ATTR_PAD,
[276] Fix | Delete
OVS_VPORT_ATTR_IFINDEX,
[277] Fix | Delete
OVS_VPORT_ATTR_NETNSID,
[278] Fix | Delete
OVS_VPORT_ATTR_UPCALL_STATS,
[279] Fix | Delete
__OVS_VPORT_ATTR_MAX
[280] Fix | Delete
};
[281] Fix | Delete
[282] Fix | Delete
#define OVS_VPORT_ATTR_MAX (__OVS_VPORT_ATTR_MAX - 1)
[283] Fix | Delete
[284] Fix | Delete
/**
[285] Fix | Delete
* enum ovs_vport_upcall_attr - attributes for %OVS_VPORT_UPCALL* commands
[286] Fix | Delete
* @OVS_VPORT_UPCALL_SUCCESS: 64-bit upcall success packets.
[287] Fix | Delete
* @OVS_VPORT_UPCALL_FAIL: 64-bit upcall fail packets.
[288] Fix | Delete
*/
[289] Fix | Delete
enum ovs_vport_upcall_attr {
[290] Fix | Delete
OVS_VPORT_UPCALL_ATTR_SUCCESS,
[291] Fix | Delete
OVS_VPORT_UPCALL_ATTR_FAIL,
[292] Fix | Delete
__OVS_VPORT_UPCALL_ATTR_MAX
[293] Fix | Delete
};
[294] Fix | Delete
[295] Fix | Delete
#define OVS_VPORT_UPCALL_ATTR_MAX (__OVS_VPORT_UPCALL_ATTR_MAX - 1)
[296] Fix | Delete
[297] Fix | Delete
enum {
[298] Fix | Delete
OVS_VXLAN_EXT_UNSPEC,
[299] Fix | Delete
OVS_VXLAN_EXT_GBP, /* Flag or __u32 */
[300] Fix | Delete
__OVS_VXLAN_EXT_MAX,
[301] Fix | Delete
};
[302] Fix | Delete
[303] Fix | Delete
#define OVS_VXLAN_EXT_MAX (__OVS_VXLAN_EXT_MAX - 1)
[304] Fix | Delete
[305] Fix | Delete
[306] Fix | Delete
/* OVS_VPORT_ATTR_OPTIONS attributes for tunnels.
[307] Fix | Delete
*/
[308] Fix | Delete
enum {
[309] Fix | Delete
OVS_TUNNEL_ATTR_UNSPEC,
[310] Fix | Delete
OVS_TUNNEL_ATTR_DST_PORT, /* 16-bit UDP port, used by L4 tunnels. */
[311] Fix | Delete
OVS_TUNNEL_ATTR_EXTENSION,
[312] Fix | Delete
__OVS_TUNNEL_ATTR_MAX
[313] Fix | Delete
};
[314] Fix | Delete
[315] Fix | Delete
#define OVS_TUNNEL_ATTR_MAX (__OVS_TUNNEL_ATTR_MAX - 1)
[316] Fix | Delete
[317] Fix | Delete
/* Flows. */
[318] Fix | Delete
[319] Fix | Delete
#define OVS_FLOW_FAMILY "ovs_flow"
[320] Fix | Delete
#define OVS_FLOW_MCGROUP "ovs_flow"
[321] Fix | Delete
#define OVS_FLOW_VERSION 0x1
[322] Fix | Delete
[323] Fix | Delete
enum ovs_flow_cmd {
[324] Fix | Delete
OVS_FLOW_CMD_UNSPEC,
[325] Fix | Delete
OVS_FLOW_CMD_NEW,
[326] Fix | Delete
OVS_FLOW_CMD_DEL,
[327] Fix | Delete
OVS_FLOW_CMD_GET,
[328] Fix | Delete
OVS_FLOW_CMD_SET
[329] Fix | Delete
};
[330] Fix | Delete
[331] Fix | Delete
struct ovs_flow_stats {
[332] Fix | Delete
__u64 n_packets; /* Number of matched packets. */
[333] Fix | Delete
__u64 n_bytes; /* Number of matched bytes. */
[334] Fix | Delete
};
[335] Fix | Delete
[336] Fix | Delete
enum ovs_key_attr {
[337] Fix | Delete
OVS_KEY_ATTR_UNSPEC,
[338] Fix | Delete
OVS_KEY_ATTR_ENCAP, /* Nested set of encapsulated attributes. */
[339] Fix | Delete
OVS_KEY_ATTR_PRIORITY, /* u32 skb->priority */
[340] Fix | Delete
OVS_KEY_ATTR_IN_PORT, /* u32 OVS dp port number */
[341] Fix | Delete
OVS_KEY_ATTR_ETHERNET, /* struct ovs_key_ethernet */
[342] Fix | Delete
OVS_KEY_ATTR_VLAN, /* be16 VLAN TCI */
[343] Fix | Delete
OVS_KEY_ATTR_ETHERTYPE, /* be16 Ethernet type */
[344] Fix | Delete
OVS_KEY_ATTR_IPV4, /* struct ovs_key_ipv4 */
[345] Fix | Delete
OVS_KEY_ATTR_IPV6, /* struct ovs_key_ipv6 */
[346] Fix | Delete
OVS_KEY_ATTR_TCP, /* struct ovs_key_tcp */
[347] Fix | Delete
OVS_KEY_ATTR_UDP, /* struct ovs_key_udp */
[348] Fix | Delete
OVS_KEY_ATTR_ICMP, /* struct ovs_key_icmp */
[349] Fix | Delete
OVS_KEY_ATTR_ICMPV6, /* struct ovs_key_icmpv6 */
[350] Fix | Delete
OVS_KEY_ATTR_ARP, /* struct ovs_key_arp */
[351] Fix | Delete
OVS_KEY_ATTR_ND, /* struct ovs_key_nd */
[352] Fix | Delete
OVS_KEY_ATTR_SKB_MARK, /* u32 skb mark */
[353] Fix | Delete
OVS_KEY_ATTR_TUNNEL, /* Nested set of ovs_tunnel attributes */
[354] Fix | Delete
OVS_KEY_ATTR_SCTP, /* struct ovs_key_sctp */
[355] Fix | Delete
OVS_KEY_ATTR_TCP_FLAGS, /* be16 TCP flags. */
[356] Fix | Delete
OVS_KEY_ATTR_DP_HASH, /* u32 hash value. Value 0 indicates the hash
[357] Fix | Delete
is not computed by the datapath. */
[358] Fix | Delete
OVS_KEY_ATTR_RECIRC_ID, /* u32 recirc id */
[359] Fix | Delete
OVS_KEY_ATTR_MPLS, /* array of struct ovs_key_mpls.
[360] Fix | Delete
* The implementation may restrict
[361] Fix | Delete
* the accepted length of the array. */
[362] Fix | Delete
OVS_KEY_ATTR_CT_STATE, /* u32 bitmask of OVS_CS_F_* */
[363] Fix | Delete
OVS_KEY_ATTR_CT_ZONE, /* u16 connection tracking zone. */
[364] Fix | Delete
OVS_KEY_ATTR_CT_MARK, /* u32 connection tracking mark */
[365] Fix | Delete
OVS_KEY_ATTR_CT_LABELS, /* 16-octet connection tracking label */
[366] Fix | Delete
OVS_KEY_ATTR_CT_ORIG_TUPLE_IPV4, /* struct ovs_key_ct_tuple_ipv4 */
[367] Fix | Delete
OVS_KEY_ATTR_CT_ORIG_TUPLE_IPV6, /* struct ovs_key_ct_tuple_ipv6 */
[368] Fix | Delete
OVS_KEY_ATTR_NSH, /* Nested set of ovs_nsh_key_* */
[369] Fix | Delete
[370] Fix | Delete
__OVS_KEY_ATTR_MAX
[371] Fix | Delete
};
[372] Fix | Delete
[373] Fix | Delete
#define OVS_KEY_ATTR_MAX (__OVS_KEY_ATTR_MAX - 1)
[374] Fix | Delete
[375] Fix | Delete
enum ovs_tunnel_key_attr {
[376] Fix | Delete
/* OVS_TUNNEL_KEY_ATTR_NONE, standard nl API requires this attribute! */
[377] Fix | Delete
OVS_TUNNEL_KEY_ATTR_ID, /* be64 Tunnel ID */
[378] Fix | Delete
OVS_TUNNEL_KEY_ATTR_IPV4_SRC, /* be32 src IP address. */
[379] Fix | Delete
OVS_TUNNEL_KEY_ATTR_IPV4_DST, /* be32 dst IP address. */
[380] Fix | Delete
OVS_TUNNEL_KEY_ATTR_TOS, /* u8 Tunnel IP ToS. */
[381] Fix | Delete
OVS_TUNNEL_KEY_ATTR_TTL, /* u8 Tunnel IP TTL. */
[382] Fix | Delete
OVS_TUNNEL_KEY_ATTR_DONT_FRAGMENT, /* No argument, set DF. */
[383] Fix | Delete
OVS_TUNNEL_KEY_ATTR_CSUM, /* No argument. CSUM packet. */
[384] Fix | Delete
OVS_TUNNEL_KEY_ATTR_OAM, /* No argument. OAM frame. */
[385] Fix | Delete
OVS_TUNNEL_KEY_ATTR_GENEVE_OPTS, /* Array of Geneve options. */
[386] Fix | Delete
OVS_TUNNEL_KEY_ATTR_TP_SRC, /* be16 src Transport Port. */
[387] Fix | Delete
OVS_TUNNEL_KEY_ATTR_TP_DST, /* be16 dst Transport Port. */
[388] Fix | Delete
OVS_TUNNEL_KEY_ATTR_VXLAN_OPTS, /* Nested OVS_VXLAN_EXT_* */
[389] Fix | Delete
OVS_TUNNEL_KEY_ATTR_IPV6_SRC, /* struct in6_addr src IPv6 address. */
[390] Fix | Delete
OVS_TUNNEL_KEY_ATTR_IPV6_DST, /* struct in6_addr dst IPv6 address. */
[391] Fix | Delete
OVS_TUNNEL_KEY_ATTR_PAD,
[392] Fix | Delete
OVS_TUNNEL_KEY_ATTR_ERSPAN_OPTS, /* struct erspan_metadata */
[393] Fix | Delete
OVS_TUNNEL_KEY_ATTR_IPV4_INFO_BRIDGE, /* No argument. IPV4_INFO_BRIDGE mode.*/
[394] Fix | Delete
__OVS_TUNNEL_KEY_ATTR_MAX
[395] Fix | Delete
};
[396] Fix | Delete
[397] Fix | Delete
#define OVS_TUNNEL_KEY_ATTR_MAX (__OVS_TUNNEL_KEY_ATTR_MAX - 1)
[398] Fix | Delete
[399] Fix | Delete
/**
[400] Fix | Delete
* enum ovs_frag_type - IPv4 and IPv6 fragment type
[401] Fix | Delete
* @OVS_FRAG_TYPE_NONE: Packet is not a fragment.
[402] Fix | Delete
* @OVS_FRAG_TYPE_FIRST: Packet is a fragment with offset 0.
[403] Fix | Delete
* @OVS_FRAG_TYPE_LATER: Packet is a fragment with nonzero offset.
[404] Fix | Delete
*
[405] Fix | Delete
* Used as the @ipv4_frag in &struct ovs_key_ipv4 and as @ipv6_frag &struct
[406] Fix | Delete
* ovs_key_ipv6.
[407] Fix | Delete
*/
[408] Fix | Delete
enum ovs_frag_type {
[409] Fix | Delete
OVS_FRAG_TYPE_NONE,
[410] Fix | Delete
OVS_FRAG_TYPE_FIRST,
[411] Fix | Delete
OVS_FRAG_TYPE_LATER,
[412] Fix | Delete
__OVS_FRAG_TYPE_MAX
[413] Fix | Delete
};
[414] Fix | Delete
[415] Fix | Delete
#define OVS_FRAG_TYPE_MAX (__OVS_FRAG_TYPE_MAX - 1)
[416] Fix | Delete
[417] Fix | Delete
struct ovs_key_ethernet {
[418] Fix | Delete
__u8 eth_src[ETH_ALEN];
[419] Fix | Delete
__u8 eth_dst[ETH_ALEN];
[420] Fix | Delete
};
[421] Fix | Delete
[422] Fix | Delete
struct ovs_key_mpls {
[423] Fix | Delete
__be32 mpls_lse;
[424] Fix | Delete
};
[425] Fix | Delete
[426] Fix | Delete
struct ovs_key_ipv4 {
[427] Fix | Delete
__be32 ipv4_src;
[428] Fix | Delete
__be32 ipv4_dst;
[429] Fix | Delete
__u8 ipv4_proto;
[430] Fix | Delete
__u8 ipv4_tos;
[431] Fix | Delete
__u8 ipv4_ttl;
[432] Fix | Delete
__u8 ipv4_frag; /* One of OVS_FRAG_TYPE_*. */
[433] Fix | Delete
};
[434] Fix | Delete
[435] Fix | Delete
struct ovs_key_ipv6 {
[436] Fix | Delete
__be32 ipv6_src[4];
[437] Fix | Delete
__be32 ipv6_dst[4];
[438] Fix | Delete
__be32 ipv6_label; /* 20-bits in least-significant bits. */
[439] Fix | Delete
__u8 ipv6_proto;
[440] Fix | Delete
__u8 ipv6_tclass;
[441] Fix | Delete
__u8 ipv6_hlimit;
[442] Fix | Delete
__u8 ipv6_frag; /* One of OVS_FRAG_TYPE_*. */
[443] Fix | Delete
};
[444] Fix | Delete
[445] Fix | Delete
struct ovs_key_tcp {
[446] Fix | Delete
__be16 tcp_src;
[447] Fix | Delete
__be16 tcp_dst;
[448] Fix | Delete
};
[449] Fix | Delete
[450] Fix | Delete
struct ovs_key_udp {
[451] Fix | Delete
__be16 udp_src;
[452] Fix | Delete
__be16 udp_dst;
[453] Fix | Delete
};
[454] Fix | Delete
[455] Fix | Delete
struct ovs_key_sctp {
[456] Fix | Delete
__be16 sctp_src;
[457] Fix | Delete
__be16 sctp_dst;
[458] Fix | Delete
};
[459] Fix | Delete
[460] Fix | Delete
struct ovs_key_icmp {
[461] Fix | Delete
__u8 icmp_type;
[462] Fix | Delete
__u8 icmp_code;
[463] Fix | Delete
};
[464] Fix | Delete
[465] Fix | Delete
struct ovs_key_icmpv6 {
[466] Fix | Delete
__u8 icmpv6_type;
[467] Fix | Delete
__u8 icmpv6_code;
[468] Fix | Delete
};
[469] Fix | Delete
[470] Fix | Delete
struct ovs_key_arp {
[471] Fix | Delete
__be32 arp_sip;
[472] Fix | Delete
__be32 arp_tip;
[473] Fix | Delete
__be16 arp_op;
[474] Fix | Delete
__u8 arp_sha[ETH_ALEN];
[475] Fix | Delete
__u8 arp_tha[ETH_ALEN];
[476] Fix | Delete
};
[477] Fix | Delete
[478] Fix | Delete
struct ovs_key_nd {
[479] Fix | Delete
__be32 nd_target[4];
[480] Fix | Delete
__u8 nd_sll[ETH_ALEN];
[481] Fix | Delete
__u8 nd_tll[ETH_ALEN];
[482] Fix | Delete
};
[483] Fix | Delete
[484] Fix | Delete
#define OVS_CT_LABELS_LEN_32 4
[485] Fix | Delete
#define OVS_CT_LABELS_LEN (OVS_CT_LABELS_LEN_32 * sizeof(__u32))
[486] Fix | Delete
struct ovs_key_ct_labels {
[487] Fix | Delete
union {
[488] Fix | Delete
__u8 ct_labels[OVS_CT_LABELS_LEN];
[489] Fix | Delete
__u32 ct_labels_32[OVS_CT_LABELS_LEN_32];
[490] Fix | Delete
};
[491] Fix | Delete
};
[492] Fix | Delete
[493] Fix | Delete
/* OVS_KEY_ATTR_CT_STATE flags */
[494] Fix | Delete
#define OVS_CS_F_NEW 0x01 /* Beginning of a new connection. */
[495] Fix | Delete
#define OVS_CS_F_ESTABLISHED 0x02 /* Part of an existing connection. */
[496] Fix | Delete
#define OVS_CS_F_RELATED 0x04 /* Related to an established
[497] Fix | Delete
* connection. */
[498] Fix | Delete
#define OVS_CS_F_REPLY_DIR 0x08 /* Flow is in the reply direction. */
[499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function