hc
2024-05-11 297b60346df8beafee954a0fd7c2d64f33f3b9bc
kernel/include/uapi/linux/openvswitch.h
....@@ -86,6 +86,7 @@
8686 OVS_DP_ATTR_MEGAFLOW_STATS, /* struct ovs_dp_megaflow_stats */
8787 OVS_DP_ATTR_USER_FEATURES, /* OVS_DP_F_* */
8888 OVS_DP_ATTR_PAD,
89
+ OVS_DP_ATTR_MASKS_CACHE_SIZE,
8990 __OVS_DP_ATTR_MAX
9091 };
9192
....@@ -102,8 +103,8 @@
102103 __u64 n_mask_hit; /* Number of masks used for flow lookups. */
103104 __u32 n_masks; /* Number of masks for the datapath. */
104105 __u32 pad0; /* Pad for future expension. */
106
+ __u64 n_cache_hit; /* Number of cache matches for flow lookups. */
105107 __u64 pad1; /* Pad for future expension. */
106
- __u64 pad2; /* Pad for future expension. */
107108 };
108109
109110 struct ovs_vport_stats {
....@@ -122,6 +123,9 @@
122123
123124 /* Allow datapath to associate multiple Netlink PIDs to each vport */
124125 #define OVS_DP_F_VPORT_PIDS (1 << 1)
126
+
127
+/* Allow tc offload recirc sharing */
128
+#define OVS_DP_F_TC_RECIRC_SHARING (1 << 2)
125129
126130 /* Fixed logical ports. */
127131 #define OVSP_LOCAL ((__u32)0)
....@@ -170,6 +174,7 @@
170174 * @OVS_PACKET_ATTR_LEN: Packet size before truncation.
171175 * %OVS_PACKET_ATTR_USERSPACE action specify the Maximum received fragment
172176 * size.
177
+ * @OVS_PACKET_ATTR_HASH: Packet hash info (e.g. hash, sw_hash and l4_hash in skb).
173178 *
174179 * These attributes follow the &struct ovs_header within the Generic Netlink
175180 * payload for %OVS_PACKET_* commands.
....@@ -187,7 +192,8 @@
187192 OVS_PACKET_ATTR_PROBE, /* Packet operation is a feature probe,
188193 error logging should be suppressed. */
189194 OVS_PACKET_ATTR_MRU, /* Maximum received IP fragment size. */
190
- OVS_PACKET_ATTR_LEN, /* Packet size before truncation. */
195
+ OVS_PACKET_ATTR_LEN, /* Packet size before truncation. */
196
+ OVS_PACKET_ATTR_HASH, /* Packet hash. */
191197 __OVS_PACKET_ATTR_MAX
192198 };
193199
....@@ -364,6 +370,7 @@
364370 OVS_TUNNEL_KEY_ATTR_IPV6_DST, /* struct in6_addr dst IPv6 address. */
365371 OVS_TUNNEL_KEY_ATTR_PAD,
366372 OVS_TUNNEL_KEY_ATTR_ERSPAN_OPTS, /* struct erspan_metadata */
373
+ OVS_TUNNEL_KEY_ATTR_IPV4_INFO_BRIDGE, /* No argument. IPV4_INFO_BRIDGE mode.*/
367374 __OVS_TUNNEL_KEY_ATTR_MAX
368375 };
369376
....@@ -667,6 +674,32 @@
667674 };
668675
669676 /**
677
+ * struct ovs_action_add_mpls - %OVS_ACTION_ATTR_ADD_MPLS action
678
+ * argument.
679
+ * @mpls_lse: MPLS label stack entry to push.
680
+ * @mpls_ethertype: Ethertype to set in the encapsulating ethernet frame.
681
+ * @tun_flags: MPLS tunnel attributes.
682
+ *
683
+ * The only values @mpls_ethertype should ever be given are %ETH_P_MPLS_UC and
684
+ * %ETH_P_MPLS_MC, indicating MPLS unicast or multicast. Other are rejected.
685
+ */
686
+struct ovs_action_add_mpls {
687
+ __be32 mpls_lse;
688
+ __be16 mpls_ethertype; /* Either %ETH_P_MPLS_UC or %ETH_P_MPLS_MC */
689
+ __u16 tun_flags;
690
+};
691
+
692
+#define OVS_MPLS_L3_TUNNEL_FLAG_MASK (1 << 0) /* Flag to specify the place of
693
+ * insertion of MPLS header.
694
+ * When false, the MPLS header
695
+ * will be inserted at the start
696
+ * of the packet.
697
+ * When true, the MPLS header
698
+ * will be inserted at the start
699
+ * of the l3 header.
700
+ */
701
+
702
+/**
670703 * struct ovs_action_push_vlan - %OVS_ACTION_ATTR_PUSH_VLAN action argument.
671704 * @vlan_tpid: Tag protocol identifier (TPID) to push.
672705 * @vlan_tci: Tag control identifier (TCI) to push. The CFI bit must be set
....@@ -734,6 +767,7 @@
734767 * be received on NFNLGRP_CONNTRACK_NEW and NFNLGRP_CONNTRACK_DESTROY groups,
735768 * respectively. Remaining bits control the changes for which an event is
736769 * delivered on the NFNLGRP_CONNTRACK_UPDATE group.
770
+ * @OVS_CT_ATTR_TIMEOUT: Variable length string defining conntrack timeout.
737771 */
738772 enum ovs_ct_attr {
739773 OVS_CT_ATTR_UNSPEC,
....@@ -746,6 +780,8 @@
746780 OVS_CT_ATTR_NAT, /* Nested OVS_NAT_ATTR_* */
747781 OVS_CT_ATTR_FORCE_COMMIT, /* No argument */
748782 OVS_CT_ATTR_EVENTMASK, /* u32 mask of IPCT_* events. */
783
+ OVS_CT_ATTR_TIMEOUT, /* Associate timeout with this connection for
784
+ * fine-grain timeout tuning. */
749785 __OVS_CT_ATTR_MAX
750786 };
751787
....@@ -798,6 +834,44 @@
798834 struct ovs_key_ethernet addresses;
799835 };
800836
837
+/*
838
+ * enum ovs_check_pkt_len_attr - Attributes for %OVS_ACTION_ATTR_CHECK_PKT_LEN.
839
+ *
840
+ * @OVS_CHECK_PKT_LEN_ATTR_PKT_LEN: u16 Packet length to check for.
841
+ * @OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_GREATER: Nested OVS_ACTION_ATTR_*
842
+ * actions to apply if the packer length is greater than the specified
843
+ * length in the attr - OVS_CHECK_PKT_LEN_ATTR_PKT_LEN.
844
+ * @OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_LESS_EQUAL - Nested OVS_ACTION_ATTR_*
845
+ * actions to apply if the packer length is lesser or equal to the specified
846
+ * length in the attr - OVS_CHECK_PKT_LEN_ATTR_PKT_LEN.
847
+ */
848
+enum ovs_check_pkt_len_attr {
849
+ OVS_CHECK_PKT_LEN_ATTR_UNSPEC,
850
+ OVS_CHECK_PKT_LEN_ATTR_PKT_LEN,
851
+ OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_GREATER,
852
+ OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_LESS_EQUAL,
853
+ __OVS_CHECK_PKT_LEN_ATTR_MAX,
854
+
855
+#ifdef __KERNEL__
856
+ OVS_CHECK_PKT_LEN_ATTR_ARG /* struct check_pkt_len_arg */
857
+#endif
858
+};
859
+
860
+#define OVS_CHECK_PKT_LEN_ATTR_MAX (__OVS_CHECK_PKT_LEN_ATTR_MAX - 1)
861
+
862
+#ifdef __KERNEL__
863
+struct check_pkt_len_arg {
864
+ u16 pkt_len; /* Same value as OVS_CHECK_PKT_LEN_ATTR_PKT_LEN'. */
865
+ bool exec_for_greater; /* When true, actions in IF_GREATER will
866
+ * not change flow keys. False otherwise.
867
+ */
868
+ bool exec_for_lesser_equal; /* When true, actions in IF_LESS_EQUAL
869
+ * will not change flow keys. False
870
+ * otherwise.
871
+ */
872
+};
873
+#endif
874
+
801875 /**
802876 * enum ovs_action_attr - Action types.
803877 *
....@@ -842,6 +916,13 @@
842916 * packet, or modify the packet (e.g., change the DSCP field).
843917 * @OVS_ACTION_ATTR_CLONE: make a copy of the packet and execute a list of
844918 * actions without affecting the original packet and key.
919
+ * @OVS_ACTION_ATTR_CHECK_PKT_LEN: Check the packet length and execute a set
920
+ * of actions if greater than the specified packet length, else execute
921
+ * another set of actions.
922
+ * @OVS_ACTION_ATTR_ADD_MPLS: Push a new MPLS label stack entry at the
923
+ * start of the packet or at the start of the l3 header depending on the value
924
+ * of l3 tunnel flag in the tun_flags field of OVS_ACTION_ATTR_ADD_MPLS
925
+ * argument.
845926 *
846927 * Only a single header can be set with a single %OVS_ACTION_ATTR_SET. Not all
847928 * fields within a header are modifiable, e.g. the IPv4 protocol and fragment
....@@ -876,6 +957,9 @@
876957 OVS_ACTION_ATTR_POP_NSH, /* No argument. */
877958 OVS_ACTION_ATTR_METER, /* u32 meter ID. */
878959 OVS_ACTION_ATTR_CLONE, /* Nested OVS_CLONE_ATTR_*. */
960
+ OVS_ACTION_ATTR_CHECK_PKT_LEN, /* Nested OVS_CHECK_PKT_LEN_ATTR_*. */
961
+ OVS_ACTION_ATTR_ADD_MPLS, /* struct ovs_action_add_mpls. */
962
+ OVS_ACTION_ATTR_DEC_TTL, /* Nested OVS_DEC_TTL_ATTR_*. */
879963
880964 __OVS_ACTION_ATTR_MAX, /* Nothing past this will be accepted
881965 * from userspace. */
....@@ -968,4 +1052,12 @@
9681052 __u32 count;
9691053 };
9701054
1055
+enum ovs_dec_ttl_attr {
1056
+ OVS_DEC_TTL_ATTR_UNSPEC,
1057
+ OVS_DEC_TTL_ATTR_ACTION, /* Nested struct nlattr */
1058
+ __OVS_DEC_TTL_ATTR_MAX
1059
+};
1060
+
1061
+#define OVS_DEC_TTL_ATTR_MAX (__OVS_DEC_TTL_ATTR_MAX - 1)
1062
+
9711063 #endif /* _LINUX_OPENVSWITCH_H */