FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
avf_advanced_flow.h
Go to the documentation of this file.
1 /*
2  *------------------------------------------------------------------
3  * Copyright (c) 2020 Intel and/or its affiliates.
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at:
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *------------------------------------------------------------------
16  */
17 
18 #ifndef _AVF_ADVANCED_FLOW_H_
19 #define _AVF_ADVANCED_FLOW_H_
20 
21 #define AVF_SUCCESS (0)
22 #define AVF_FAILURE (-1)
23 
24 #define BIT(a) (1UL << (a))
25 #define BIT_ULL(a) (1ULL << (a))
26 
27 /* These macros are used to generate compilation errors if a structure/union
28  * is not exactly the correct length. It gives a divide by zero error if the
29  * structure/union is not of the correct size, otherwise it creates an enum
30  * that is never used.
31  */
32 #define VIRTCHNL_CHECK_STRUCT_LEN(n, X) \
33  enum virtchnl_static_assert_enum_##X \
34  { \
35  virtchnl_static_assert_##X = (n) / ((sizeof (struct X) == (n)) ? 1 : 0) \
36  }
37 #define VIRTCHNL_CHECK_UNION_LEN(n, X) \
38  enum virtchnl_static_asset_enum_##X \
39  { \
40  virtchnl_static_assert_##X = (n) / ((sizeof (union X) == (n)) ? 1 : 0) \
41  }
42 
43 /* AVF ethernet frame types */
44 #define AVF_ETHER_TYPE_IPV4 0x0800 /**< IPv4 Protocol. */
45 #define AVF_ETHER_TYPE_IPV6 0x86DD /**< IPv6 Protocol. */
46 
47 #define VIRTCHNL_MAX_NUM_PROTO_HDRS 32
48 #define PROTO_HDR_SHIFT 5
49 #define PROTO_HDR_FIELD_START(proto_hdr_type) \
50  (proto_hdr_type << PROTO_HDR_SHIFT)
51 #define PROTO_HDR_FIELD_MASK ((1UL << PROTO_HDR_SHIFT) - 1)
52 
53 /* VF use these macros to configure each protocol header.
54  * Specify which protocol headers and protocol header fields base on
55  * virtchnl_proto_hdr_type and virtchnl_proto_hdr_field.
56  * @param hdr: a struct of virtchnl_proto_hdr
57  * @param hdr_type: ETH/IPV4/TCP, etc
58  * @param field: SRC/DST/TEID/SPI, etc
59  */
60 #define VIRTCHNL_ADD_PROTO_HDR_FIELD(hdr, field) \
61  ((hdr)->field_selector |= BIT ((field) &PROTO_HDR_FIELD_MASK))
62 #define VIRTCHNL_DEL_PROTO_HDR_FIELD(hdr, field) \
63  ((hdr)->field_selector &= ~BIT ((field) &PROTO_HDR_FIELD_MASK))
64 #define VIRTCHNL_TEST_PROTO_HDR_FIELD(hdr, val) \
65  ((hdr)->field_selector & BIT ((val) &PROTO_HDR_FIELD_MASK))
66 #define VIRTCHNL_GET_PROTO_HDR_FIELD(hdr) ((hdr)->field_selector)
67 
68 #define VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr, hdr_type, field) \
69  (VIRTCHNL_ADD_PROTO_HDR_FIELD (hdr, VIRTCHNL_PROTO_HDR_##hdr_type##_##field))
70 #define VIRTCHNL_DEL_PROTO_HDR_FIELD_BIT(hdr, hdr_type, field) \
71  (VIRTCHNL_DEL_PROTO_HDR_FIELD (hdr, VIRTCHNL_PROTO_HDR_##hdr_type##_##field))
72 
73 #define VIRTCHNL_SET_PROTO_HDR_TYPE(hdr, hdr_type) \
74  ((hdr)->type = VIRTCHNL_PROTO_HDR_##hdr_type)
75 #define VIRTCHNL_GET_PROTO_HDR_TYPE(hdr) (((hdr)->type) >> PROTO_HDR_SHIFT)
76 #define VIRTCHNL_TEST_PROTO_HDR_TYPE(hdr, val) \
77  ((hdr)->type == ((val) >> PROTO_HDR_SHIFT))
78 #define VIRTCHNL_TEST_PROTO_HDR(hdr, val) \
79  (VIRTCHNL_TEST_PROTO_HDR_TYPE (hdr, val) && \
80  VIRTCHNL_TEST_PROTO_HDR_FIELD (hdr, val))
81 
82 /* protocol */
83 
84 #define AVF_PROT_MAC_INNER (1ULL << 1)
85 #define AVF_PROT_MAC_OUTER (1ULL << 2)
86 #define AVF_PROT_VLAN_INNER (1ULL << 3)
87 #define AVF_PROT_VLAN_OUTER (1ULL << 4)
88 #define AVF_PROT_IPV4_INNER (1ULL << 5)
89 #define AVF_PROT_IPV4_OUTER (1ULL << 6)
90 #define AVF_PROT_IPV6_INNER (1ULL << 7)
91 #define AVF_PROT_IPV6_OUTER (1ULL << 8)
92 #define AVF_PROT_TCP_INNER (1ULL << 9)
93 #define AVF_PROT_TCP_OUTER (1ULL << 10)
94 #define AVF_PROT_UDP_INNER (1ULL << 11)
95 #define AVF_PROT_UDP_OUTER (1ULL << 12)
96 #define AVF_PROT_SCTP_INNER (1ULL << 13)
97 #define AVF_PROT_SCTP_OUTER (1ULL << 14)
98 #define AVF_PROT_ICMP4_INNER (1ULL << 15)
99 #define AVF_PROT_ICMP4_OUTER (1ULL << 16)
100 #define AVF_PROT_ICMP6_INNER (1ULL << 17)
101 #define AVF_PROT_ICMP6_OUTER (1ULL << 18)
102 #define AVF_PROT_VXLAN (1ULL << 19)
103 #define AVF_PROT_NVGRE (1ULL << 20)
104 #define AVF_PROT_GTPU (1ULL << 21)
105 #define AVF_PROT_ESP (1ULL << 22)
106 #define AVF_PROT_AH (1ULL << 23)
107 #define AVF_PROT_L2TPV3OIP (1ULL << 24)
108 #define AVF_PROT_PFCP (1ULL << 25)
109 
110 /* field */
111 
112 #define AVF_SMAC (1ULL << 63)
113 #define AVF_DMAC (1ULL << 62)
114 #define AVF_ETHERTYPE (1ULL << 61)
115 #define AVF_IP_SRC (1ULL << 60)
116 #define AVF_IP_DST (1ULL << 59)
117 #define AVF_IP_PROTO (1ULL << 58)
118 #define AVF_IP_TTL (1ULL << 57)
119 #define AVF_IP_TOS (1ULL << 56)
120 #define AVF_SPORT (1ULL << 55)
121 #define AVF_DPORT (1ULL << 54)
122 #define AVF_ICMP_TYPE (1ULL << 53)
123 #define AVF_ICMP_CODE (1ULL << 52)
124 #define AVF_VXLAN_VNI (1ULL << 51)
125 #define AVF_NVGRE_TNI (1ULL << 50)
126 #define AVF_GTPU_TEID (1ULL << 49)
127 #define AVF_GTPU_QFI (1ULL << 48)
128 #define AVF_ESP_SPI (1ULL << 47)
129 #define AVF_AH_SPI (1ULL << 46)
130 #define AVF_L2TPV3OIP_SESSION_ID (1ULL << 45)
131 #define AVF_PFCP_S_FIELD (1ULL << 44)
132 #define AVF_PFCP_SEID (1ULL << 43)
133 
134 /* input set */
135 
136 #define AVF_INSET_NONE 0ULL
137 
138 /* non-tunnel */
139 
140 #define AVF_INSET_SMAC (AVF_PROT_MAC_OUTER | AVF_SMAC)
141 #define AVF_INSET_DMAC (AVF_PROT_MAC_OUTER | AVF_DMAC)
142 #define AVF_INSET_VLAN_INNER (AVF_PROT_VLAN_INNER)
143 #define AVF_INSET_VLAN_OUTER (AVF_PROT_VLAN_OUTER)
144 #define AVF_INSET_ETHERTYPE (AVF_ETHERTYPE)
145 
146 #define AVF_INSET_IPV4_SRC (AVF_PROT_IPV4_OUTER | AVF_IP_SRC)
147 #define AVF_INSET_IPV4_DST (AVF_PROT_IPV4_OUTER | AVF_IP_DST)
148 #define AVF_INSET_IPV4_TOS (AVF_PROT_IPV4_OUTER | AVF_IP_TOS)
149 #define AVF_INSET_IPV4_PROTO (AVF_PROT_IPV4_OUTER | AVF_IP_PROTO)
150 #define AVF_INSET_IPV4_TTL (AVF_PROT_IPV4_OUTER | AVF_IP_TTL)
151 #define AVF_INSET_IPV6_SRC (AVF_PROT_IPV6_OUTER | AVF_IP_SRC)
152 #define AVF_INSET_IPV6_DST (AVF_PROT_IPV6_OUTER | AVF_IP_DST)
153 #define AVF_INSET_IPV6_NEXT_HDR (AVF_PROT_IPV6_OUTER | AVF_IP_PROTO)
154 #define AVF_INSET_IPV6_HOP_LIMIT (AVF_PROT_IPV6_OUTER | AVF_IP_TTL)
155 #define AVF_INSET_IPV6_TC (AVF_PROT_IPV6_OUTER | AVF_IP_TOS)
156 
157 #define AVF_INSET_TCP_SRC_PORT (AVF_PROT_TCP_OUTER | AVF_SPORT)
158 #define AVF_INSET_TCP_DST_PORT (AVF_PROT_TCP_OUTER | AVF_DPORT)
159 #define AVF_INSET_UDP_SRC_PORT (AVF_PROT_UDP_OUTER | AVF_SPORT)
160 #define AVF_INSET_UDP_DST_PORT (AVF_PROT_UDP_OUTER | AVF_DPORT)
161 #define AVF_INSET_SCTP_SRC_PORT (AVF_PROT_SCTP_OUTER | AVF_SPORT)
162 #define AVF_INSET_SCTP_DST_PORT (AVF_PROT_SCTP_OUTER | AVF_DPORT)
163 #define AVF_INSET_ICMP4_SRC_PORT (AVF_PROT_ICMP4_OUTER | AVF_SPORT)
164 #define AVF_INSET_ICMP4_DST_PORT (AVF_PROT_ICMP4_OUTER | AVF_DPORT)
165 #define AVF_INSET_ICMP6_SRC_PORT (AVF_PROT_ICMP6_OUTER | AVF_SPORT)
166 #define AVF_INSET_ICMP6_DST_PORT (AVF_PROT_ICMP6_OUTER | AVF_DPORT)
167 #define AVF_INSET_ICMP4_TYPE (AVF_PROT_ICMP4_OUTER | AVF_ICMP_TYPE)
168 #define AVF_INSET_ICMP4_CODE (AVF_PROT_ICMP4_OUTER | AVF_ICMP_CODE)
169 #define AVF_INSET_ICMP6_TYPE (AVF_PROT_ICMP6_OUTER | AVF_ICMP_TYPE)
170 #define AVF_INSET_ICMP6_CODE (AVF_PROT_ICMP6_OUTER | AVF_ICMP_CODE)
171 #define AVF_INSET_GTPU_TEID (AVF_PROT_GTPU | AVF_GTPU_TEID)
172 #define AVF_INSET_GTPU_QFI (AVF_PROT_GTPU | AVF_GTPU_QFI)
173 #define AVF_INSET_ESP_SPI (AVF_PROT_ESP | AVF_ESP_SPI)
174 #define AVF_INSET_AH_SPI (AVF_PROT_AH | AVF_AH_SPI)
175 #define AVF_INSET_L2TPV3OIP_SESSION_ID \
176  (AVF_PROT_L2TPV3OIP | AVF_L2TPV3OIP_SESSION_ID)
177 #define AVF_INSET_PFCP_S_FIELD (AVF_PROT_PFCP | AVF_PFCP_S_FIELD)
178 #define AVF_INSET_PFCP_SEID (AVF_PROT_PFCP | AVF_PFCP_S_FIELD | AVF_PFCP_SEID)
179 
180 /* Protocol header type within a packet segment. A segment consists of one or
181  * more protocol headers that make up a logical group of protocol headers. Each
182  * logical group of protocol headers encapsulates or is encapsulated using/by
183  * tunneling or encapsulation protocols for network virtualization.
184  */
186 {
205 };
206 
207 /* Protocol header field within a protocol header. */
209 {
210  /* ETHER */
214  /* S-VLAN */
217  /* C-VLAN */
220  /* IPV4 */
227  /* IPV6 */
234  /* TCP */
238  /* UDP */
242  /* SCTP */
246  /* GTPU_IP */
249  /* GTPU_EH */
253  /* PPPOE */
256  /* L2TPV3 */
259  /* ESP */
261  /* AH */
263  /* PFCP */
267 };
268 
270 {
272  u32 field_selector; /* a bit mask to select field for header type */
273  u8 buffer[64];
274  /**
275  * binary buffer in network order for specific header type.
276  * For example, if type = VIRTCHNL_PROTO_HDR_IPV4, a IPv4
277  * header is expected to be copied into the buffer.
278  */
279 };
280 
282 
284 {
286  /**
287  * specify where protocol header start from.
288  * 0 - from the outer layer
289  * 1 - from the first inner layer
290  * 2 - from the second inner layer
291  * ....
292  **/
293  int count; /* the proto layers must < VIRTCHNL_MAX_NUM_PROTO_HDRS */
295 };
296 
298 
299 /* VIRTCHNL_OP_CONFIG_RSS_KEY
300  * VIRTCHNL_OP_CONFIG_RSS_LUT
301  * VF sends these messages to configure RSS. Only supported if both PF
302  * and VF drivers set the VIRTCHNL_VF_OFFLOAD_RSS_PF bit during
303  * configuration negotiation. If this is the case, then the RSS fields in
304  * the VF resource struct are valid.
305  * Both the key and LUT are initialized to 0 by the PF, meaning that
306  * RSS is effectively disabled until set up by the VF.
307  */
309 {
312  u8 key[1]; /* RSS hash key, packed bytes */
313 };
314 
316 
318 {
321  u8 lut[1]; /* RSS lookup table */
322 };
323 
325 
326 /* VIRTCHNL_OP_GET_RSS_HENA_CAPS
327  * VIRTCHNL_OP_SET_RSS_HENA
328  * VF sends these messages to get and set the hash filter enable bits for RSS.
329  * By default, the PF sets these to all possible traffic types that the
330  * hardware supports. The VF can query this value if it wants to change the
331  * traffic types that are hashed by the hardware.
332  */
334 {
336 };
337 
339 
340 /* Type of RSS algorithm */
342 {
347 };
348 
350 {
351  struct virtchnl_proto_hdrs proto_hdrs; /* protocol headers */
352  enum virtchnl_rss_algorithm rss_algorithm; /* rss algorithm type */
353  u8 reserved[128]; /* reserve for future */
354 };
355 
357 
359 {
360  /* action types */
369 };
370 
371 /* action configuration for FDIR */
373 {
375  union
376  {
377  /* used for queue and qgroup action */
378  struct
379  {
382  } queue;
383  /* used for count action */
384  struct
385  {
386  /* share counter ID with other flow rules */
388  u32 id; /* counter ID */
389  } count;
390  /* used for mark action */
392  u8 reserve[32];
393  } act_conf;
394 };
395 
397 
398 #define VIRTCHNL_MAX_NUM_ACTIONS 8
399 
401 {
402  /* action number must be less then VIRTCHNL_MAX_NUM_ACTIONS */
403  int count;
405 };
406 
408 
409 /* pattern and action for FDIR rule */
411 {
414 };
415 
417 
418 /* query information to retrieve fdir rule counters.
419  * PF will fill out this structure to reset counter.
420  */
422 {
425  u32 reserved : 30; /* Reserved, must be zero. */
427  u64 matched_packets; /* Number of packets for this rule. */
428  u64 matched_bytes; /* Number of bytes through this rule. */
429 };
430 
432 
433 /* Status returned to VF after VF requests FDIR commands
434  * VIRTCHNL_FDIR_SUCCESS
435  * VF FDIR related request is successfully done by PF
436  * The request can be OP_ADD/DEL/QUERY_FDIR_FILTER.
437  *
438  * VIRTCHNL_FDIR_FAILURE_RULE_NORESOURCE
439  * OP_ADD_FDIR_FILTER request is failed due to no Hardware resource.
440  *
441  * VIRTCHNL_FDIR_FAILURE_RULE_EXIST
442  * OP_ADD_FDIR_FILTER request is failed due to the rule is already existed.
443  *
444  * VIRTCHNL_FDIR_FAILURE_RULE_CONFLICT
445  * OP_ADD_FDIR_FILTER request is failed due to conflict with existing rule.
446  *
447  * VIRTCHNL_FDIR_FAILURE_RULE_NONEXIST
448  * OP_DEL_FDIR_FILTER request is failed due to this rule doesn't exist.
449  *
450  * VIRTCHNL_FDIR_FAILURE_RULE_INVALID
451  * OP_ADD_FDIR_FILTER request is failed due to parameters validation
452  * or HW doesn't support.
453  *
454  * VIRTCHNL_FDIR_FAILURE_RULE_TIMEOUT
455  * OP_ADD/DEL_FDIR_FILTER request is failed due to timing out
456  * for programming.
457  *
458  * VIRTCHNL_FDIR_FAILURE_QUERY_INVALID
459  * OP_QUERY_FDIR_FILTER request is failed due to parameters validation,
460  * for example, VF query counter of a rule who has no counter action.
461  */
463 {
473 };
474 
475 /* VIRTCHNL_OP_ADD_FDIR_FILTER
476  * VF sends this request to PF by filling out vsi_id,
477  * validate_only and rule_cfg. PF will return flow_id
478  * if the request is successfully done and return add_status to VF.
479  */
481 {
482  u16 vsi_id; /* INPUT */
483  /*
484  * 1 for validating a fdir rule, 0 for creating a fdir rule.
485  * Validate and create share one ops: VIRTCHNL_OP_ADD_FDIR_FILTER.
486  */
487  u16 validate_only; /* INPUT */
488  u32 flow_id; /* OUTPUT */
489  struct virtchnl_fdir_rule rule_cfg; /* INPUT */
491 };
492 
494 
495 /* VIRTCHNL_OP_DEL_FDIR_FILTER
496  * VF sends this request to PF by filling out vsi_id
497  * and flow_id. PF will return del_status to VF.
498  */
500 {
501  u16 vsi_id; /* INPUT */
503  u32 flow_id; /* INPUT */
505 };
506 
508 
509 /* VIRTCHNL_OP_QUERY_FDIR_FILTER
510  * VF sends this request to PF by filling out vsi_id,
511  * flow_id and reset_counter. PF will return query_info
512  * and query_status to VF.
513  */
515 {
516  u16 vsi_id; /* INPUT */
517  u16 pad1[3];
518  u32 flow_id; /* INPUT */
519  u32 reset_counter : 1; /* INPUT */
523 };
524 
526 
527 /**
528  * Those headers used temporary, maybe OS packet
529  * definition can replace. Add flow error, pattern
530  * and action definition.
531  */
532 
533 /**
534  * Verbose error types.
535  *
536  * Most of them provide the type of the object referenced by struct
537  * rte_flow_error.cause.
538  */
540 {
541  AVF_FLOW_ERROR_TYPE_NONE, /**< No error. */
542  AVF_FLOW_ERROR_TYPE_UNSPECIFIED, /**< Cause unspecified. */
543  AVF_FLOW_ERROR_TYPE_HANDLE, /**< Flow rule (handle). */
544  AVF_FLOW_ERROR_TYPE_ATTR_GROUP, /**< Group field. */
545  AVF_FLOW_ERROR_TYPE_ATTR_PRIORITY, /**< Priority field. */
546  AVF_FLOW_ERROR_TYPE_ATTR_INGRESS, /**< Ingress field. */
547  AVF_FLOW_ERROR_TYPE_ATTR_EGRESS, /**< Egress field. */
548  AVF_FLOW_ERROR_TYPE_ATTR_TRANSFER, /**< Transfer field. */
549  AVF_FLOW_ERROR_TYPE_ATTR, /**< Attributes structure. */
550  AVF_FLOW_ERROR_TYPE_ITEM_NUM, /**< Pattern length. */
551  AVF_FLOW_ERROR_TYPE_ITEM_SPEC, /**< Item specification. */
552  AVF_FLOW_ERROR_TYPE_ITEM_LAST, /**< Item specification range. */
553  AVF_FLOW_ERROR_TYPE_ITEM_MASK, /**< Item specification mask. */
554  AVF_FLOW_ERROR_TYPE_ITEM, /**< Specific pattern item. */
555  AVF_FLOW_ERROR_TYPE_ACTION_NUM, /**< Number of actions. */
556  AVF_FLOW_ERROR_TYPE_ACTION_CONF, /**< Action configuration. */
557  AVF_FLOW_ERROR_TYPE_ACTION, /**< Specific action. */
558 };
559 
560 /**
561  * Verbose error structure definition.
562  * Both cause and message may be NULL regardless of the error type.
563  */
565 {
566  enum avf_flow_error_type type; /**< Cause field and error types. */
567  const void *cause; /**< Object responsible for the error. */
568  const char *message; /**< Human-readable error message. */
569 };
570 
571 #define AVF_ETHER_ADDR_LEN 6
573 {
574  u8 addr_bytes[AVF_ETHER_ADDR_LEN]; /**< Addr bytes in tx order */
575 } __attribute__ ((__aligned__ (2)));
576 
578 {
579  struct avf_ether_addr dst; /**< Destination MAC. */
580  struct avf_ether_addr src; /**< Source MAC. */
581  u16 type; /**< EtherType or TPID. */
582 };
583 
584 /**
585  * IPv4 Header
586  */
588 {
589  u8 version_ihl; /**< version and header length */
590  u8 type_of_service; /**< type of service */
591  u16 total_length; /**< length of packet */
592  u16 packet_id; /**< packet ID */
593  u16 fragment_offset; /**< fragmentation offset */
594  u8 time_to_live; /**< time to live */
595  u8 next_proto_id; /**< protocol ID */
596  u16 hdr_checksum; /**< header checksum */
597  u32 src_addr; /**< source address */
598  u32 dst_addr; /**< destination address */
599 } __attribute__ ((__packed__));
600 
601 /**
602  * IPv6 Header
603  */
605 {
606  u32 vtc_flow; /**< IP version, traffic class & flow label. */
607  u16 payload_len; /**< IP packet length - includes header size */
608  u8 proto; /**< Protocol, next header. */
609  u8 hop_limits; /**< Hop limits. */
610  u8 src_addr[16]; /**< IP address of source host. */
611  u8 dst_addr[16]; /**< IP address of destination host(s). */
612 } __attribute__ ((__packed__));
613 
614 /**
615  * TCP Header
616  */
618 {
619  u16 src_port; /**< TCP source port. */
620  u16 dst_port; /**< TCP destination port. */
621  u32 sent_seq; /**< TX data sequence number. */
622  u32 recv_ack; /**< RX data acknowledgment sequence number. */
623  u8 data_off; /**< Data offset. */
624  u8 tcp_flags; /**< TCP flags */
625  u16 rx_win; /**< RX flow control window. */
626  u16 cksum; /**< TCP checksum. */
627  u16 tcp_urp; /**< TCP urgent pointer, if any. */
628 } __attribute__ ((__packed__));
629 
630 /**
631  * UDP Header
632  */
634 {
635  u16 src_port; /**< UDP source port. */
636  u16 dst_port; /**< UDP destination port. */
637  u16 dgram_len; /**< UDP datagram length */
638  u16 dgram_cksum; /**< UDP datagram checksum */
639 } __attribute__ ((__packed__));
640 
641 /**
642  * Match IP Authentication Header (AH), RFC 4302
643  */
645 {
648  u32 reserved : 16;
651 };
652 
653 /**
654  * ESP Header
655  */
657 {
658  u32 spi; /**< Security Parameters Index */
659  u32 seq; /**< packet sequence number */
660 } __attribute__ ((__packed__));
661 
662 /**
663  * Match PFCP Header
664  */
666 {
671 };
672 
673 /**
674  * Matches a L2TPv3 over IP header.
675  */
677 {
678  u32 session_id; /**< Session ID. */
679 };
680 
681 /**
682  * Matches a GTP PDU extension header with type 0x85.
683  */
685 {
686  u8 pdu_type; /**< PDU type. */
687  u8 qfi; /**< QoS flow identifier. */
688 };
689 
690 /**
691  * Matches a GTPv1 header.
692  */
694 {
695  /**
696  * Version (3b), protocol type (1b), reserved (1b),
697  * Extension header flag (1b),
698  * Sequence number flag (1b),
699  * N-PDU number flag (1b).
700  */
702  u8 msg_type; /**< Message type. */
703  u16 msg_len; /**< Message length. */
704  u32 teid; /**< Tunnel endpoint identifier. */
705 };
706 
707 /**
708  * SCTP Header
709  */
711 {
712  u16 src_port; /**< Source port. */
713  u16 dst_port; /**< Destin port. */
714  u32 tag; /**< Validation tag. */
715  u32 cksum; /**< Checksum. */
716 } __attribute__ ((__packed__));
717 
718 /**
719  * Hash function types.
720  */
722 {
726  /**
727  * Symmetric Toeplitz: src, dst will be replaced by
728  * xor(src, dst). For the case with src/dst only,
729  * src or dst address will xor with zero pair.
730  */
733 };
734 
736 {
737  enum avf_eth_hash_function func; /**< RSS hash function to apply. */
738 
740  u64 types; /**< Specific RSS hash types (see ETH_RSS_*). */
741  u32 key_len; /**< Hash key length in bytes. */
742  u32 queue_num; /**< Number of entries in @p queue. */
743  const u8 *key; /**< Hash key. */
744  const u16 *queue; /**< Queue indices to use. */
745 };
746 
748 {
749  u16 index; /**< Queue index to use. */
750 };
751 
753 {
754  u32 id; /**< Integer value to return with packets. */
755 };
756 
758 {
759  enum virtchnl_action type; /**< Action type. */
760  const void *conf; /**< Pointer to action configuration object. */
761 };
762 
764 {
765  enum virtchnl_proto_hdr_type type; /**< Item type. */
766  const void *spec; /**< Pointer to item specification structure. */
767  const void *mask; /**< Bit-mask applied to spec and last. */
768 };
769 
771 {
779 };
780 
782 {
787 };
788 
789 /* virtual channel op handler */
790 typedef int (*avf_fdir_vc_op_t) (void *vc_hdl, enum virthnl_adv_ops vc_op,
791  void *in, u32 in_len, void *out, u32 out_len);
792 
793 /* virtual channel context object */
795 {
796  void *vc_hdl; /* virtual channel handler */
798 };
799 
800 /**
801  * Create a rule cfg object.
802  *
803  * @param rcfg
804  * created rule cfg object.
805  * @param tunnel
806  * tunnel level where protocol header start from
807  * 0 from moster outer layer.
808  * 1 from first inner layer.
809  * 2 form second inner layer.
810  * ...
811  * @param vsi
812  * avf vsi id
813  *
814  * @param nrxq
815  * the rx queue number of the avf
816  *
817  * @return
818  * 0 = successful.
819  * < 0 = failure.
820  */
821 int avf_fdir_rcfg_create (struct avf_fdir_conf **rcfg, int tunnel_level,
822  u16 vsi, u16 nrxq);
823 
824 /**
825  * Destroy a rule cfg object.
826  *
827  * @param rcfg
828  * the cfg object to destroy.
829  *
830  * @return
831  * 0 = successful.
832  * < 0 = failure.
833  */
834 int avf_fdir_rcfg_destroy (struct avf_fdir_conf *rcfg);
835 
836 /**
837  * Set match potocol header on specific layer, it will overwrite is already be
838  * set.
839  *
840  * @param rcfg
841  * the rule cfg object
842  * @param layer
843  * layer of the protocol header.
844  * @param hdr
845  * protocol header type.
846  *
847  * @return
848  * 0 = successful.
849  * < 0 = failure.
850  */
851 int avf_fdir_rcfg_set_hdr (struct avf_fdir_conf *rcfg, int layer,
852  enum virtchnl_proto_hdr_type hdr);
853 
854 /**
855  * Set a match field on specific protocol layer, if any match field already be
856  * set on this layer, it will be overwritten.
857  *
858  * @param rcfg
859  * the rule cfg object
860  * @param layer
861  * layer of the protocol header.
862  * @param item
863  * flow item
864  * @param error
865  * save error cause
866  *
867  * @return
868  * 0 = successful.
869  * < 0 = failure.
870  */
871 int avf_fdir_rcfg_set_field (struct avf_fdir_conf *rcfg, int layer,
872  struct avf_flow_item *item,
873  struct avf_flow_error *error);
874 
875 /**
876  * Set action as to queue(group), conflict with drop action.
877  *
878  * @param rcfg
879  * rule cfg object
880  * @param queue
881  * queue id.
882  * @param size
883  * queue group size, must be 2^n. 1 means only to single queue.
884  * @param act_idx
885  * action index
886  *
887  * @return
888  * 0 = successful.
889  * < 0 = failure.
890  */
891 int avf_fdir_rcfg_act_queue (struct avf_fdir_conf *rcfg, int queue, int size,
892  int act_idx);
893 
894 /**
895  * Set action as to queue group, conflict with drop action.
896  *
897  * @param rcfg
898  * the rule cfg object
899  * @param act
900  * flow actions
901  * @param act_idx
902  * action index
903  * @error
904  * save error cause
905  *
906  * @return
907  * 0 = successful.
908  * < 0 = failure.
909  */
911  const struct avf_flow_action *act,
912  int act_idx, struct avf_flow_error *error);
913 
914 /**
915  * Set action as as drop, conflict with to queue(gropu) action.
916  *
917  * @param rcfg
918  * the rule cfg object
919  * @param act_idx
920  * action index
921  *
922  * @return
923  * 0 = successful.
924  * < 0 = failure.
925  */
926 int avf_fdir_rcfg_act_drop (struct avf_fdir_conf *rcfg, int act_idx);
927 
928 /**
929  * Set action as mark, it can co-exist with to queue(group) or drop action.
930  *
931  * @param rcfg
932  * the rule cfg object
933  * @param mark
934  * a 32 bit flow mark
935  * @param act_idx
936  * action index
937  *
938  * @return
939  * 0 = successful.
940  * < 0 = failure.
941  */
942 int avf_fdir_rcfg_act_mark (struct avf_fdir_conf *rcfg, const u32 mark,
943  int act_idx);
944 
945 /**
946  * Validate a flow rule cfg, check with PF driver if the rule cfg is supportted
947  *or not.
948  *
949  * @param ctx
950  * virtual channel context
951  * @param rcfg
952  * the rule cfg object.
953  *
954  * @return
955  * 0 = successful.
956  * < 0 = failure.
957  */
959  struct avf_fdir_conf *rcfg);
960 
961 /**
962  * Create a flow rule, a FDIR rule is expected to be programmed into hardware
963  *if return success.
964  *
965  * @param ctx
966  * virtual channel context
967  * @param rcfg
968  * rule cfg object.
969  *
970  * @return
971  * 0 = successfule.
972  * < 0 = failure.
973  */
975  struct avf_fdir_conf *rcfg);
976 
977 /**
978  * Destroy a flow rule.
979  *
980  * @param ctx
981  * virtual channel context
982  * @param rcfg
983  * the rule cfg object.
984  *
985  * @return
986  * 0 = successfule.
987  * < 0 = failure.
988  */
990  struct avf_fdir_conf *rcfg);
991 
992 /*
993  * Parse avf patterns and set pattern fields.
994  *
995  * @param rcfg
996  * flow config
997  * @param avf_items
998  * pattern items
999  * @param error
1000  * save error cause
1001  *
1002  * @return
1003  * 0 = successful.
1004  * < 0 = failure
1005  */
1006 int avf_fdir_parse_pattern (struct avf_fdir_conf *rcfg,
1007  struct avf_flow_item avf_items[],
1008  struct avf_flow_error *error);
1009 
1010 /*
1011  * Parse flow actions, set actions.
1012  *
1013  * @param actions
1014  * flow actions
1015  * @param rcfg
1016  * flow config
1017  * @param error
1018  * save error cause
1019  *
1020  * @return
1021  * 0 = successful.
1022  * < 0 = failure
1023  */
1024 int avf_fdir_parse_action (const struct avf_flow_action actions[],
1025  struct avf_fdir_conf *rcfg,
1026  struct avf_flow_error *error);
1027 
1028 /**
1029  * Initialize flow error structure.
1030  *
1031  * @param[out] error
1032  * Pointer to flow error structure (may be NULL).
1033  * @param code
1034  * Related error code
1035  * @param type
1036  * Cause field and error types.
1037  * @param cause
1038  * Object responsible for the error.
1039  * @param message
1040  * Human-readable error message.
1041  *
1042  * @return
1043  * Negative error code (errno value)
1044  */
1045 int avf_flow_error_set (struct avf_flow_error *error, int code,
1046  enum avf_flow_error_type type, const void *cause,
1047  const char *message);
1048 
1049 /*
1050  * decode the error number to Verbose error string
1051  *
1052  * @param err_no
1053  * error number
1054  *
1055  * @return
1056  * Verbose error string
1057  */
1058 char *avf_fdir_prgm_error_decode (int err_no);
1059 
1060 #endif /* _AVF_ADVANCED_FLOW_H_ */
1061 
1062 /*
1063  * fd.io coding-style-patch-verification: ON
1064  *
1065  * Local Variables:
1066  * eval: (c-set-style "gnu")
1067  * End:
1068  */
VIRTCHNL_MAX_NUM_ACTIONS
#define VIRTCHNL_MAX_NUM_ACTIONS
Definition: avf_advanced_flow.h:398
avf_sctp_hdr::cksum
u32 cksum
Checksum.
Definition: avf_advanced_flow.h:715
VIRTCHNL_PROTO_HDR_ETH_ETHERTYPE
@ VIRTCHNL_PROTO_HDR_ETH_ETHERTYPE
Definition: avf_advanced_flow.h:213
avf_pfcp_hdr::msg_type
u8 msg_type
Definition: avf_advanced_flow.h:668
avf_udp_hdr::dst_port
u16 dst_port
UDP destination port.
Definition: avf_advanced_flow.h:636
virtchnl_filter_action_set
Definition: avf_advanced_flow.h:400
avf_ether_addr
Definition: avf_advanced_flow.h:572
virtchnl_filter_action::reserve
u8 reserve[32]
Definition: avf_advanced_flow.h:392
virtchnl_fdir_rule
Definition: avf_advanced_flow.h:410
VIRTCHNL_FDIR_FAILURE_MAX
@ VIRTCHNL_FDIR_FAILURE_MAX
Definition: avf_advanced_flow.h:472
virtchnl_fdir_query::pad1
u16 pad1[3]
Definition: avf_advanced_flow.h:517
VIRTCHNL_PROTO_HDR_GTPU_EH_PDU_UP
@ VIRTCHNL_PROTO_HDR_GTPU_EH_PDU_UP
Definition: avf_advanced_flow.h:199
avf_pfcp_hdr::s_field
u8 s_field
Definition: avf_advanced_flow.h:667
VIRTCHNL_PROTO_HDR_S_VLAN
@ VIRTCHNL_PROTO_HDR_S_VLAN
Definition: avf_advanced_flow.h:189
virtchnl_fdir_rule::proto_hdrs
struct virtchnl_proto_hdrs proto_hdrs
Definition: avf_advanced_flow.h:412
avf_ipv4_hdr::type_of_service
u8 type_of_service
type of service
Definition: avf_advanced_flow.h:590
avf_gtp_hdr
Matches a GTPv1 header.
Definition: avf_advanced_flow.h:693
VIRTCHNL_PROTO_HDR_L2TPV3_SESS_ID
@ VIRTCHNL_PROTO_HDR_L2TPV3_SESS_ID
Definition: avf_advanced_flow.h:257
avf_gtp_psc_hdr::qfi
u8 qfi
QoS flow identifier.
Definition: avf_advanced_flow.h:687
avf_sctp_hdr::tag
u32 tag
Validation tag.
Definition: avf_advanced_flow.h:714
VIRTCHNL_PROTO_HDR_IPV6_DST
@ VIRTCHNL_PROTO_HDR_IPV6_DST
Definition: avf_advanced_flow.h:230
VIRTCHNL_FDIR_FAILURE_RULE_TIMEOUT
@ VIRTCHNL_FDIR_FAILURE_RULE_TIMEOUT
Definition: avf_advanced_flow.h:470
avf_fdir_conf::vsi
u32 vsi
Definition: avf_advanced_flow.h:777
VIRTCHNL_PROTO_HDR_GTPU_IP
@ VIRTCHNL_PROTO_HDR_GTPU_IP
Definition: avf_advanced_flow.h:196
virtchnl_rss_hena
Definition: avf_advanced_flow.h:333
AVF_FLOW_ERROR_TYPE_ACTION_CONF
@ AVF_FLOW_ERROR_TYPE_ACTION_CONF
Action configuration.
Definition: avf_advanced_flow.h:556
avf_pfcp_hdr::seid
u64 seid
Definition: avf_advanced_flow.h:670
virtchnl_rss_cfg::reserved
u8 reserved[128]
Definition: avf_advanced_flow.h:353
avf_fdir_rcfg_set_hdr
int avf_fdir_rcfg_set_hdr(struct avf_fdir_conf *rcfg, int layer, enum virtchnl_proto_hdr_type hdr)
Set match potocol header on specific layer, it will overwrite is already be set.
Definition: avf_fdir_lib.c:70
VIRTCHNL_ACTION_PASSTHRU
@ VIRTCHNL_ACTION_PASSTHRU
Definition: avf_advanced_flow.h:363
VIRTCHNL_ACTION_Q_REGION
@ VIRTCHNL_ACTION_Q_REGION
Definition: avf_advanced_flow.h:365
virtchnl_proto_hdr_type
virtchnl_proto_hdr_type
Definition: avf_advanced_flow.h:185
AVF_FLOW_ERROR_TYPE_ATTR_EGRESS
@ AVF_FLOW_ERROR_TYPE_ATTR_EGRESS
Egress field.
Definition: avf_advanced_flow.h:547
AVF_FLOW_ERROR_TYPE_UNSPECIFIED
@ AVF_FLOW_ERROR_TYPE_UNSPECIFIED
Cause unspecified.
Definition: avf_advanced_flow.h:542
VIRTCHNL_PROTO_HDR_IPV4_TTL
@ VIRTCHNL_PROTO_HDR_IPV4_TTL
Definition: avf_advanced_flow.h:225
avf_sctp_hdr::src_port
u16 src_port
Source port.
Definition: avf_advanced_flow.h:712
avf_ipv4_hdr::fragment_offset
u16 fragment_offset
fragmentation offset
Definition: avf_advanced_flow.h:593
avf_tcp_hdr::tcp_flags
u8 tcp_flags
TCP flags.
Definition: avf_advanced_flow.h:624
virtchnl_fdir_query
Definition: avf_advanced_flow.h:514
virtchnl_filter_action_set::count
int count
Definition: avf_advanced_flow.h:403
AVF_FLOW_ERROR_TYPE_ITEM_MASK
@ AVF_FLOW_ERROR_TYPE_ITEM_MASK
Item specification mask.
Definition: avf_advanced_flow.h:553
VIRTCHNL_ACTION_COUNT
@ VIRTCHNL_ACTION_COUNT
Definition: avf_advanced_flow.h:367
virtchnl_rss_key
Definition: avf_advanced_flow.h:308
virtchnl_filter_action::mark_id
u32 mark_id
Definition: avf_advanced_flow.h:391
VIRTCHNL_ADV_OP_QUERY_FDIR_FILTER
@ VIRTCHNL_ADV_OP_QUERY_FDIR_FILTER
Definition: avf_advanced_flow.h:785
VIRTCHNL_PROTO_HDR_TCP_DST_PORT
@ VIRTCHNL_PROTO_HDR_TCP_DST_PORT
Definition: avf_advanced_flow.h:237
VIRTCHNL_FDIR_FAILURE_QUERY_INVALID
@ VIRTCHNL_FDIR_FAILURE_QUERY_INVALID
Definition: avf_advanced_flow.h:471
avf_eth_hash_function
avf_eth_hash_function
Hash function types.
Definition: avf_advanced_flow.h:721
virtchnl_rss_lut::lut_entries
u16 lut_entries
Definition: avf_advanced_flow.h:320
avf_fdir_rcfg_validate
int avf_fdir_rcfg_validate(struct avf_fdir_vc_ctx *ctx, struct avf_fdir_conf *rcfg)
Validate a flow rule cfg, check with PF driver if the rule cfg is supportted or not.
Definition: avf_fdir_lib.c:594
avf_flow_error::cause
const void * cause
Object responsible for the error.
Definition: avf_advanced_flow.h:567
avf_sctp_hdr
SCTP Header.
Definition: avf_advanced_flow.h:710
AVF_FLOW_ERROR_TYPE_HANDLE
@ AVF_FLOW_ERROR_TYPE_HANDLE
Flow rule (handle).
Definition: avf_advanced_flow.h:543
virtchnl_filter_action
Definition: avf_advanced_flow.h:372
avf_fdir_conf::flow_id
u32 flow_id
Definition: avf_advanced_flow.h:775
virtchnl_fdir_query_info::matched_bytes
u64 matched_bytes
Definition: avf_advanced_flow.h:428
avf_ipv4_hdr::dst_addr
u32 dst_addr
destination address
Definition: avf_advanced_flow.h:598
virtchnl_filter_action::type
enum virtchnl_action type
Definition: avf_advanced_flow.h:374
avf_ipv4_hdr::packet_id
u16 packet_id
packet ID
Definition: avf_advanced_flow.h:592
avf_flow_action_queue::index
u16 index
Queue index to use.
Definition: avf_advanced_flow.h:749
avf_esp_hdr::seq
u32 seq
packet sequence number
Definition: avf_advanced_flow.h:659
virtchnl_proto_hdr_field
virtchnl_proto_hdr_field
Definition: avf_advanced_flow.h:208
virtchnl_filter_action::id
u32 id
Definition: avf_advanced_flow.h:388
VIRTCHNL_PROTO_HDR_GTPU_EH_QFI
@ VIRTCHNL_PROTO_HDR_GTPU_EH_QFI
Definition: avf_advanced_flow.h:252
avf_flow_error_type
avf_flow_error_type
Those headers used temporary, maybe OS packet definition can replace.
Definition: avf_advanced_flow.h:539
virtchnl_filter_action::shared
u8 shared
Definition: avf_advanced_flow.h:387
VIRTCHNL_ACTION_DROP
@ VIRTCHNL_ACTION_DROP
Definition: avf_advanced_flow.h:361
AVF_FLOW_ERROR_TYPE_ITEM_NUM
@ AVF_FLOW_ERROR_TYPE_ITEM_NUM
Pattern length.
Definition: avf_advanced_flow.h:550
avf_tcp_hdr::sent_seq
u32 sent_seq
TX data sequence number.
Definition: avf_advanced_flow.h:621
avf_gtp_psc_hdr
Matches a GTP PDU extension header with type 0x85.
Definition: avf_advanced_flow.h:684
u16
unsigned short u16
Definition: types.h:57
avf_flow_error::type
enum avf_flow_error_type type
Cause field and error types.
Definition: avf_advanced_flow.h:566
VIRTCHNL_RSS_ALG_TOEPLITZ_ASYMMETRIC
@ VIRTCHNL_RSS_ALG_TOEPLITZ_ASYMMETRIC
Definition: avf_advanced_flow.h:343
avf_fdir_parse_action
int avf_fdir_parse_action(const struct avf_flow_action actions[], struct avf_fdir_conf *rcfg, struct avf_flow_error *error)
Definition: avf_fdir_lib.c:672
AVF_ETH_HASH_FUNCTION_DEFAULT
@ AVF_ETH_HASH_FUNCTION_DEFAULT
Definition: avf_advanced_flow.h:723
virtchnl_fdir_del::vsi_id
u16 vsi_id
Definition: avf_advanced_flow.h:501
VIRTCHNL_PROTO_HDR_GTPU_EH
@ VIRTCHNL_PROTO_HDR_GTPU_EH
Definition: avf_advanced_flow.h:197
avf_ipv6_hdr::vtc_flow
u32 vtc_flow
IP version, traffic class & flow label.
Definition: avf_advanced_flow.h:606
VIRTCHNL_PROTO_HDR_PPPOE_SESS_ID
@ VIRTCHNL_PROTO_HDR_PPPOE_SESS_ID
Definition: avf_advanced_flow.h:254
virtchnl_fdir_add::validate_only
u16 validate_only
Definition: avf_advanced_flow.h:487
avf_ah_hdr
Match IP Authentication Header (AH), RFC 4302.
Definition: avf_advanced_flow.h:644
virtchnl_fdir_add
Definition: avf_advanced_flow.h:480
VIRTCHNL_PROTO_HDR_TCP
@ VIRTCHNL_PROTO_HDR_TCP
Definition: avf_advanced_flow.h:193
avf_fdir_rcfg_create
int avf_fdir_rcfg_create(struct avf_fdir_conf **rcfg, int tunnel_level, u16 vsi, u16 nrxq)
Create a rule cfg object.
Definition: avf_fdir_lib.c:43
avf_ipv4_hdr::src_addr
u32 src_addr
source address
Definition: avf_advanced_flow.h:597
AVF_FLOW_ERROR_TYPE_ITEM_SPEC
@ AVF_FLOW_ERROR_TYPE_ITEM_SPEC
Item specification.
Definition: avf_advanced_flow.h:551
VIRTCHNL_ADV_OP_DEL_FDIR_FILTER
@ VIRTCHNL_ADV_OP_DEL_FDIR_FILTER
Definition: avf_advanced_flow.h:784
avf_flow_action_rss::key_len
u32 key_len
Hash key length in bytes.
Definition: avf_advanced_flow.h:741
VIRTCHNL_PROTO_HDR_IPV4
@ VIRTCHNL_PROTO_HDR_IPV4
Definition: avf_advanced_flow.h:191
VIRTCHNL_RSS_ALG_TOEPLITZ_SYMMETRIC
@ VIRTCHNL_RSS_ALG_TOEPLITZ_SYMMETRIC
Definition: avf_advanced_flow.h:345
VIRTCHNL_PROTO_HDR_GTPU_IP_TEID
@ VIRTCHNL_PROTO_HDR_GTPU_IP_TEID
Definition: avf_advanced_flow.h:247
avf_udp_hdr::dgram_len
u16 dgram_len
UDP datagram length.
Definition: avf_advanced_flow.h:637
avf_flow_action_rss::key
const u8 * key
Hash key.
Definition: avf_advanced_flow.h:743
VIRTCHNL_MAX_NUM_PROTO_HDRS
#define VIRTCHNL_MAX_NUM_PROTO_HDRS
Definition: avf_advanced_flow.h:47
avf_flow_eth_hdr::type
u16 type
EtherType or TPID.
Definition: avf_advanced_flow.h:581
VIRTCHNL_ACTION_TC_REDIRECT
@ VIRTCHNL_ACTION_TC_REDIRECT
Definition: avf_advanced_flow.h:362
AVF_FLOW_ERROR_TYPE_ATTR_INGRESS
@ AVF_FLOW_ERROR_TYPE_ATTR_INGRESS
Ingress field.
Definition: avf_advanced_flow.h:546
VIRTCHNL_PROTO_HDR_SCTP_SRC_PORT
@ VIRTCHNL_PROTO_HDR_SCTP_SRC_PORT
Definition: avf_advanced_flow.h:243
VIRTCHNL_PROTO_HDR_AH
@ VIRTCHNL_PROTO_HDR_AH
Definition: avf_advanced_flow.h:203
error
Definition: cJSON.c:88
VIRTCHNL_ACTION_QUEUE
@ VIRTCHNL_ACTION_QUEUE
Definition: avf_advanced_flow.h:364
avf_flow_error_set
int avf_flow_error_set(struct avf_flow_error *error, int code, enum avf_flow_error_type type, const void *cause, const char *message)
Initialize flow error structure.
Definition: avf_fdir_lib.c:810
avf_flow_action_mark
Definition: avf_advanced_flow.h:752
avf_ipv4_hdr::hdr_checksum
u16 hdr_checksum
header checksum
Definition: avf_advanced_flow.h:596
avf_udp_hdr
UDP Header.
Definition: avf_advanced_flow.h:633
VIRTCHNL_PROTO_HDR_ETH
@ VIRTCHNL_PROTO_HDR_ETH
Definition: avf_advanced_flow.h:188
VIRTCHNL_PROTO_HDR_C_VLAN_ID
@ VIRTCHNL_PROTO_HDR_C_VLAN_ID
Definition: avf_advanced_flow.h:218
avf_ipv4_hdr::next_proto_id
u8 next_proto_id
protocol ID
Definition: avf_advanced_flow.h:595
avf_l2tpv3oip_hdr::session_id
u32 session_id
Session ID.
Definition: avf_advanced_flow.h:678
virtchnl_proto_hdrs::count
int count
specify where protocol header start from.
Definition: avf_advanced_flow.h:293
VIRTCHNL_PROTO_HDR_IPV6
@ VIRTCHNL_PROTO_HDR_IPV6
Definition: avf_advanced_flow.h:192
avf_ipv4_hdr::version_ihl
u8 version_ihl
version and header length
Definition: avf_advanced_flow.h:589
AVF_ETH_HASH_FUNCTION_MAX
@ AVF_ETH_HASH_FUNCTION_MAX
Definition: avf_advanced_flow.h:732
VIRTCHNL_PROTO_HDR_IPV4_SRC
@ VIRTCHNL_PROTO_HDR_IPV4_SRC
Definition: avf_advanced_flow.h:221
virtchnl_fdir_add::status
enum virtchnl_fdir_prgm_status status
Definition: avf_advanced_flow.h:490
avf_fdir_vc_op_t
int(* avf_fdir_vc_op_t)(void *vc_hdl, enum virthnl_adv_ops vc_op, void *in, u32 in_len, void *out, u32 out_len)
Definition: avf_advanced_flow.h:790
virtchnl_rss_key::key
u8 key[1]
Definition: avf_advanced_flow.h:312
VIRTCHNL_PROTO_HDR_L2TPV3
@ VIRTCHNL_PROTO_HDR_L2TPV3
Definition: avf_advanced_flow.h:201
virtchnl_proto_hdr
Definition: avf_advanced_flow.h:269
avf_gtp_hdr::msg_len
u16 msg_len
Message length.
Definition: avf_advanced_flow.h:703
avf_fdir_rcfg_act_queue
int avf_fdir_rcfg_act_queue(struct avf_fdir_conf *rcfg, int queue, int size, int act_idx)
Set action as to queue(group), conflict with drop action.
Definition: avf_fdir_lib.c:486
VIRTCHNL_RSS_ALG_XOR_ASYMMETRIC
@ VIRTCHNL_RSS_ALG_XOR_ASYMMETRIC
Definition: avf_advanced_flow.h:344
virtchnl_filter_action_set::actions
struct virtchnl_filter_action actions[VIRTCHNL_MAX_NUM_ACTIONS]
Definition: avf_advanced_flow.h:404
virtchnl_fdir_del::flow_id
u32 flow_id
Definition: avf_advanced_flow.h:503
virtchnl_fdir_query::status
enum virtchnl_fdir_prgm_status status
Definition: avf_advanced_flow.h:521
avf_flow_item::spec
const void * spec
Pointer to item specification structure.
Definition: avf_advanced_flow.h:766
avf_esp_hdr::spi
u32 spi
Security Parameters Index.
Definition: avf_advanced_flow.h:658
VIRTCHNL_ACTION_MARK
@ VIRTCHNL_ACTION_MARK
Definition: avf_advanced_flow.h:366
virtchnl_fdir_query_info::match_packets_valid
u32 match_packets_valid
Definition: avf_advanced_flow.h:423
avf_flow_action_mark::id
u32 id
Integer value to return with packets.
Definition: avf_advanced_flow.h:754
virtchnl_filter_action::act_conf
union virtchnl_filter_action::@32 act_conf
virtchnl_rss_lut::lut
u8 lut[1]
Definition: avf_advanced_flow.h:321
PROTO_HDR_FIELD_START
#define PROTO_HDR_FIELD_START(proto_hdr_type)
Definition: avf_advanced_flow.h:49
avf_gtp_hdr::v_pt_rsv_flags
u8 v_pt_rsv_flags
Version (3b), protocol type (1b), reserved (1b), Extension header flag (1b), Sequence number flag (1b...
Definition: avf_advanced_flow.h:701
AVF_FLOW_ERROR_TYPE_ATTR_PRIORITY
@ AVF_FLOW_ERROR_TYPE_ATTR_PRIORITY
Priority field.
Definition: avf_advanced_flow.h:545
avf_fdir_vc_ctx
Definition: avf_advanced_flow.h:794
virtchnl_fdir_query::vsi_id
u16 vsi_id
Definition: avf_advanced_flow.h:516
VIRTCHNL_PROTO_HDR_SCTP
@ VIRTCHNL_PROTO_HDR_SCTP
Definition: avf_advanced_flow.h:195
virtchnl_rss_algorithm
virtchnl_rss_algorithm
Definition: avf_advanced_flow.h:341
avf_flow_item
Definition: avf_advanced_flow.h:763
virtchnl_rss_key::key_len
u16 key_len
Definition: avf_advanced_flow.h:311
avf_fdir_conf::mark_flag
u32 mark_flag
Definition: avf_advanced_flow.h:776
VIRTCHNL_ADV_OP_MAX
@ VIRTCHNL_ADV_OP_MAX
Definition: avf_advanced_flow.h:786
AVF_FLOW_ERROR_TYPE_ATTR_TRANSFER
@ AVF_FLOW_ERROR_TYPE_ATTR_TRANSFER
Transfer field.
Definition: avf_advanced_flow.h:548
VIRTCHNL_PROTO_HDR_IPV4_PROT
@ VIRTCHNL_PROTO_HDR_IPV4_PROT
Definition: avf_advanced_flow.h:226
avf_pfcp_hdr
Match PFCP Header.
Definition: avf_advanced_flow.h:665
virtchnl_rss_lut
Definition: avf_advanced_flow.h:317
virtchnl_proto_hdrs::tunnel_level
u8 tunnel_level
Definition: avf_advanced_flow.h:285
avf_ah_hdr::payload_len
u32 payload_len
Definition: avf_advanced_flow.h:647
virtchnl_fdir_prgm_status
virtchnl_fdir_prgm_status
Definition: avf_advanced_flow.h:462
VIRTCHNL_PROTO_HDR_PFCP
@ VIRTCHNL_PROTO_HDR_PFCP
Definition: avf_advanced_flow.h:204
virtchnl_fdir_query_info::pad
u32 pad
Definition: avf_advanced_flow.h:426
VIRTCHNL_PROTO_HDR_IPV6_HOP_LIMIT
@ VIRTCHNL_PROTO_HDR_IPV6_HOP_LIMIT
Definition: avf_advanced_flow.h:232
AVF_FLOW_ERROR_TYPE_ACTION
@ AVF_FLOW_ERROR_TYPE_ACTION
Specific action.
Definition: avf_advanced_flow.h:557
VIRTCHNL_PROTO_HDR_AH_SPI
@ VIRTCHNL_PROTO_HDR_AH_SPI
Definition: avf_advanced_flow.h:262
VIRTCHNL_FDIR_SUCCESS
@ VIRTCHNL_FDIR_SUCCESS
Definition: avf_advanced_flow.h:464
avf_ah_hdr::next_hdr
u32 next_hdr
Definition: avf_advanced_flow.h:646
avf_udp_hdr::src_port
u16 src_port
UDP source port.
Definition: avf_advanced_flow.h:635
avf_flow_error
Verbose error structure definition.
Definition: avf_advanced_flow.h:564
avf_fdir_conf
Definition: avf_advanced_flow.h:770
VIRTCHNL_PROTO_HDR_PFCP_SEID
@ VIRTCHNL_PROTO_HDR_PFCP_SEID
Definition: avf_advanced_flow.h:266
avf_flow_action_rss
Definition: avf_advanced_flow.h:735
VIRTCHNL_RSS_ALG_XOR_SYMMETRIC
@ VIRTCHNL_RSS_ALG_XOR_SYMMETRIC
Definition: avf_advanced_flow.h:346
virtchnl_fdir_query::pad2
u32 pad2
Definition: avf_advanced_flow.h:522
virtchnl_proto_hdr::buffer
u8 buffer[64]
Definition: avf_advanced_flow.h:273
virtchnl_fdir_query::reset_counter
u32 reset_counter
Definition: avf_advanced_flow.h:519
avf_flow_action_rss::types
u64 types
Specific RSS hash types (see ETH_RSS_*).
Definition: avf_advanced_flow.h:740
virtchnl_rss_cfg
Definition: avf_advanced_flow.h:349
virtchnl_fdir_del::pad
u16 pad
Definition: avf_advanced_flow.h:502
virtchnl_fdir_add::rule_cfg
struct virtchnl_fdir_rule rule_cfg
Definition: avf_advanced_flow.h:489
avf_flow_eth_hdr::dst
struct avf_ether_addr dst
Destination MAC.
Definition: avf_advanced_flow.h:579
avf_fdir_rcfg_destroy
int avf_fdir_rcfg_destroy(struct avf_fdir_conf *rcfg)
Destroy a rule cfg object.
Definition: avf_fdir_lib.c:62
avf_fdir_rcfg_act_mark
int avf_fdir_rcfg_act_mark(struct avf_fdir_conf *rcfg, const u32 mark, int act_idx)
Set action as mark, it can co-exist with to queue(group) or drop action.
Definition: avf_fdir_lib.c:578
avf_ah_hdr::seq_num
u32 seq_num
Definition: avf_advanced_flow.h:650
avf_fdir_conf::nb_rx_queues
u32 nb_rx_queues
Definition: avf_advanced_flow.h:778
AVF_FLOW_ERROR_TYPE_ATTR_GROUP
@ AVF_FLOW_ERROR_TYPE_ATTR_GROUP
Group field.
Definition: avf_advanced_flow.h:544
AVF_ETH_HASH_FUNCTION_TOEPLITZ
@ AVF_ETH_HASH_FUNCTION_TOEPLITZ
Toeplitz.
Definition: avf_advanced_flow.h:724
avf_tcp_hdr::cksum
u16 cksum
TCP checksum.
Definition: avf_advanced_flow.h:626
VIRTCHNL_PROTO_HDR_GTPU_EH_PDU
@ VIRTCHNL_PROTO_HDR_GTPU_EH_PDU
Definition: avf_advanced_flow.h:250
avf_l2tpv3oip_hdr
Matches a L2TPv3 over IP header.
Definition: avf_advanced_flow.h:676
virtchnl_proto_hdrs
Definition: avf_advanced_flow.h:283
avf_fdir_vc_ctx::vc_op
avf_fdir_vc_op_t vc_op
Definition: avf_advanced_flow.h:797
avf_ipv6_hdr::src_addr
u8 src_addr[16]
IP address of source host.
Definition: avf_advanced_flow.h:610
AVF_FLOW_ERROR_TYPE_ITEM
@ AVF_FLOW_ERROR_TYPE_ITEM
Specific pattern item.
Definition: avf_advanced_flow.h:554
virtchnl_fdir_query_info
Definition: avf_advanced_flow.h:421
virtchnl_filter_action::region
u8 region
Definition: avf_advanced_flow.h:381
size
u32 size
Definition: vhost_user.h:125
virtchnl_fdir_query::query_info
struct virtchnl_fdir_query_info query_info
Definition: avf_advanced_flow.h:520
avf_tcp_hdr
TCP Header.
Definition: avf_advanced_flow.h:617
avf_flow_action_rss::queue
const u16 * queue
Queue indices to use.
Definition: avf_advanced_flow.h:744
VIRTCHNL_PROTO_HDR_IPV4_DST
@ VIRTCHNL_PROTO_HDR_IPV4_DST
Definition: avf_advanced_flow.h:223
virtchnl_fdir_del::status
enum virtchnl_fdir_prgm_status status
Definition: avf_advanced_flow.h:504
virtchnl_rss_lut::vsi_id
u16 vsi_id
Definition: avf_advanced_flow.h:319
avf_flow_eth_hdr
Definition: avf_advanced_flow.h:577
u64
unsigned long u64
Definition: types.h:89
avf_fdir_rule_create
int avf_fdir_rule_create(struct avf_fdir_vc_ctx *ctx, struct avf_fdir_conf *rcfg)
Create a flow rule, a FDIR rule is expected to be programmed into hardware if return success.
Definition: avf_fdir_lib.c:620
avf_flow_action_rss::queue_num
u32 queue_num
Number of entries in queue.
Definition: avf_advanced_flow.h:742
VIRTCHNL_PROTO_HDR_IPV6_TC
@ VIRTCHNL_PROTO_HDR_IPV6_TC
Definition: avf_advanced_flow.h:231
VIRTCHNL_PROTO_HDR_IPV4_DSCP
@ VIRTCHNL_PROTO_HDR_IPV4_DSCP
Definition: avf_advanced_flow.h:224
avf_tcp_hdr::src_port
u16 src_port
TCP source port.
Definition: avf_advanced_flow.h:619
u32
unsigned int u32
Definition: types.h:88
virtchnl_fdir_query_info::reserved
u32 reserved
Definition: avf_advanced_flow.h:425
virtchnl_fdir_add::flow_id
u32 flow_id
Definition: avf_advanced_flow.h:488
AVF_FLOW_ERROR_TYPE_ATTR
@ AVF_FLOW_ERROR_TYPE_ATTR
Attributes structure.
Definition: avf_advanced_flow.h:549
avf_udp_hdr::dgram_cksum
u16 dgram_cksum
UDP datagram checksum.
Definition: avf_advanced_flow.h:638
avf_fdir_conf::input_set
u64 input_set
Definition: avf_advanced_flow.h:774
avf_ipv4_hdr::time_to_live
u8 time_to_live
time to live
Definition: avf_advanced_flow.h:594
virthnl_adv_ops
virthnl_adv_ops
Definition: avf_advanced_flow.h:781
ctx
long ctx[MAX_CONNS]
Definition: main.c:144
AVF_FLOW_ERROR_TYPE_ITEM_LAST
@ AVF_FLOW_ERROR_TYPE_ITEM_LAST
Item specification range.
Definition: avf_advanced_flow.h:552
AVF_FLOW_ERROR_TYPE_ACTION_NUM
@ AVF_FLOW_ERROR_TYPE_ACTION_NUM
Number of actions.
Definition: avf_advanced_flow.h:555
avf_esp_hdr
ESP Header.
Definition: avf_advanced_flow.h:656
VIRTCHNL_PROTO_HDR_UDP_SRC_PORT
@ VIRTCHNL_PROTO_HDR_UDP_SRC_PORT
Definition: avf_advanced_flow.h:239
VIRTCHNL_PROTO_HDR_PPPOE
@ VIRTCHNL_PROTO_HDR_PPPOE
Definition: avf_advanced_flow.h:200
avf_gtp_psc_hdr::pdu_type
u8 pdu_type
PDU type.
Definition: avf_advanced_flow.h:686
avf_fdir_rule_destroy
int avf_fdir_rule_destroy(struct avf_fdir_vc_ctx *ctx, struct avf_fdir_conf *rcfg)
Destroy a flow rule.
Definition: avf_fdir_lib.c:647
VIRTCHNL_FDIR_FAILURE_RULE_CONFLICT
@ VIRTCHNL_FDIR_FAILURE_RULE_CONFLICT
Definition: avf_advanced_flow.h:467
avf_flow_item::type
enum virtchnl_proto_hdr_type type
Item type.
Definition: avf_advanced_flow.h:765
virtchnl_proto_hdrs::proto_hdr
struct virtchnl_proto_hdr proto_hdr[VIRTCHNL_MAX_NUM_PROTO_HDRS]
Definition: avf_advanced_flow.h:294
VIRTCHNL_CHECK_STRUCT_LEN
#define VIRTCHNL_CHECK_STRUCT_LEN(n, X)
Definition: avf_advanced_flow.h:32
virtchnl_proto_hdr::field_selector
u32 field_selector
Definition: avf_advanced_flow.h:272
avf_ipv6_hdr
IPv6 Header.
Definition: avf_advanced_flow.h:604
VIRTCHNL_PROTO_HDR_PFCP_S_FIELD
@ VIRTCHNL_PROTO_HDR_PFCP_S_FIELD
Definition: avf_advanced_flow.h:264
VIRTCHNL_PROTO_HDR_NONE
@ VIRTCHNL_PROTO_HDR_NONE
Definition: avf_advanced_flow.h:187
virtchnl_rss_hena::hena
u64 hena
Definition: avf_advanced_flow.h:335
actions
vl_api_flow_action_t actions
Definition: flow_types.api:224
avf_tcp_hdr::data_off
u8 data_off
Data offset.
Definition: avf_advanced_flow.h:623
avf_gtp_hdr::msg_type
u8 msg_type
Message type.
Definition: avf_advanced_flow.h:702
VIRTCHNL_PROTO_HDR_IPV6_PROT
@ VIRTCHNL_PROTO_HDR_IPV6_PROT
Definition: avf_advanced_flow.h:233
virtchnl_fdir_query::flow_id
u32 flow_id
Definition: avf_advanced_flow.h:518
virtchnl_filter_action::count
struct virtchnl_filter_action::@32::@34 count
avf_flow_action_rss::func
enum avf_eth_hash_function func
RSS hash function to apply.
Definition: avf_advanced_flow.h:737
item
cJSON * item
Definition: cJSON.h:222
virtchnl_fdir_query_info::match_bytes_valid
u32 match_bytes_valid
Definition: avf_advanced_flow.h:424
virtchnl_filter_action::index
u16 index
Definition: avf_advanced_flow.h:380
virtchnl_fdir_add::vsi_id
u16 vsi_id
Definition: avf_advanced_flow.h:482
VIRTCHNL_PROTO_HDR_ETH_DST
@ VIRTCHNL_PROTO_HDR_ETH_DST
Definition: avf_advanced_flow.h:212
avf_flow_action_queue
Definition: avf_advanced_flow.h:747
u8
unsigned char u8
Definition: types.h:56
VIRTCHNL_PROTO_HDR_UDP_DST_PORT
@ VIRTCHNL_PROTO_HDR_UDP_DST_PORT
Definition: avf_advanced_flow.h:241
avf_flow_action_rss::level
u32 level
Definition: avf_advanced_flow.h:739
avf_pfcp_hdr::msg_len
u16 msg_len
Definition: avf_advanced_flow.h:669
VIRTCHNL_FDIR_FAILURE_RULE_INVALID
@ VIRTCHNL_FDIR_FAILURE_RULE_INVALID
Definition: avf_advanced_flow.h:469
avf_ipv4_hdr
IPv4 Header.
Definition: avf_advanced_flow.h:587
avf_flow_action::conf
const void * conf
Pointer to action configuration object.
Definition: avf_advanced_flow.h:760
avf_flow_eth_hdr::src
struct avf_ether_addr src
Source MAC.
Definition: avf_advanced_flow.h:580
VIRTCHNL_PROTO_HDR_C_VLAN
@ VIRTCHNL_PROTO_HDR_C_VLAN
Definition: avf_advanced_flow.h:190
AVF_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ
@ AVF_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ
Symmetric Toeplitz: src, dst will be replaced by xor(src, dst).
Definition: avf_advanced_flow.h:731
VIRTCHNL_PROTO_HDR_ETH_SRC
@ VIRTCHNL_PROTO_HDR_ETH_SRC
Definition: avf_advanced_flow.h:211
VIRTCHNL_ACTION_NONE
@ VIRTCHNL_ACTION_NONE
Definition: avf_advanced_flow.h:368
avf_gtp_hdr::teid
u32 teid
Tunnel endpoint identifier.
Definition: avf_advanced_flow.h:704
VIRTCHNL_FDIR_FAILURE_RULE_NONEXIST
@ VIRTCHNL_FDIR_FAILURE_RULE_NONEXIST
Definition: avf_advanced_flow.h:468
VIRTCHNL_PROTO_HDR_GTPU_EH_PDU_DWN
@ VIRTCHNL_PROTO_HDR_GTPU_EH_PDU_DWN
Definition: avf_advanced_flow.h:198
AVF_FLOW_ERROR_TYPE_NONE
@ AVF_FLOW_ERROR_TYPE_NONE
No error.
Definition: avf_advanced_flow.h:541
avf_ipv4_hdr::total_length
u16 total_length
length of packet
Definition: avf_advanced_flow.h:591
avf_fdir_conf::add_fltr
struct virtchnl_fdir_add add_fltr
Definition: avf_advanced_flow.h:772
VIRTCHNL_FDIR_FAILURE_RULE_NORESOURCE
@ VIRTCHNL_FDIR_FAILURE_RULE_NORESOURCE
Definition: avf_advanced_flow.h:465
virtchnl_rss_cfg::proto_hdrs
struct virtchnl_proto_hdrs proto_hdrs
Definition: avf_advanced_flow.h:351
avf_fdir_vc_ctx::vc_hdl
void * vc_hdl
Definition: avf_advanced_flow.h:796
VIRTCHNL_PROTO_HDR_UDP
@ VIRTCHNL_PROTO_HDR_UDP
Definition: avf_advanced_flow.h:194
avf_fdir_rcfg_set_field
int avf_fdir_rcfg_set_field(struct avf_fdir_conf *rcfg, int layer, struct avf_flow_item *item, struct avf_flow_error *error)
Set a match field on specific protocol layer, if any match field already be set on this layer,...
Definition: avf_fdir_lib.c:85
avf_tcp_hdr::rx_win
u16 rx_win
RX flow control window.
Definition: avf_advanced_flow.h:625
avf_tcp_hdr::tcp_urp
u16 tcp_urp
TCP urgent pointer, if any.
Definition: avf_advanced_flow.h:627
virtchnl_fdir_query_info::matched_packets
u64 matched_packets
Definition: avf_advanced_flow.h:427
avf_ah_hdr::spi
u32 spi
Definition: avf_advanced_flow.h:649
VIRTCHNL_FDIR_FAILURE_RULE_EXIST
@ VIRTCHNL_FDIR_FAILURE_RULE_EXIST
Definition: avf_advanced_flow.h:466
VIRTCHNL_PROTO_HDR_ESP_SPI
@ VIRTCHNL_PROTO_HDR_ESP_SPI
Definition: avf_advanced_flow.h:260
VIRTCHNL_PROTO_HDR_ESP
@ VIRTCHNL_PROTO_HDR_ESP
Definition: avf_advanced_flow.h:202
VIRTCHNL_PROTO_HDR_IPV6_SRC
@ VIRTCHNL_PROTO_HDR_IPV6_SRC
Definition: avf_advanced_flow.h:228
avf_fdir_conf::del_fltr
struct virtchnl_fdir_del del_fltr
Definition: avf_advanced_flow.h:773
virtchnl_filter_action::queue
struct virtchnl_filter_action::@32::@33 queue
AVF_ETHER_ADDR_LEN
#define AVF_ETHER_ADDR_LEN
Definition: avf_advanced_flow.h:571
avf_ah_hdr::reserved
u32 reserved
Definition: avf_advanced_flow.h:648
avf_tcp_hdr::recv_ack
u32 recv_ack
RX data acknowledgment sequence number.
Definition: avf_advanced_flow.h:622
avf_sctp_hdr::dst_port
u16 dst_port
Destin port.
Definition: avf_advanced_flow.h:713
avf_flow_action::type
enum virtchnl_action type
Action type.
Definition: avf_advanced_flow.h:759
virtchnl_action
virtchnl_action
Definition: avf_advanced_flow.h:358
virtchnl_proto_hdr::type
enum virtchnl_proto_hdr_type type
Definition: avf_advanced_flow.h:271
avf_fdir_parse_action_qregion
int avf_fdir_parse_action_qregion(struct avf_fdir_conf *rcfg, const struct avf_flow_action *act, int act_idx, struct avf_flow_error *error)
Set action as to queue group, conflict with drop action.
Definition: avf_fdir_lib.c:507
AVF_ETH_HASH_FUNCTION_SIMPLE_XOR
@ AVF_ETH_HASH_FUNCTION_SIMPLE_XOR
Simple XOR.
Definition: avf_advanced_flow.h:725
avf_fdir_parse_pattern
int avf_fdir_parse_pattern(struct avf_fdir_conf *rcfg, struct avf_flow_item avf_items[], struct avf_flow_error *error)
Definition: avf_fdir_lib.c:789
avf_fdir_prgm_error_decode
char * avf_fdir_prgm_error_decode(int err_no)
Definition: avf_fdir_lib.c:827
avf_ipv6_hdr::dst_addr
u8 dst_addr[16]
IP address of destination host(s).
Definition: avf_advanced_flow.h:611
avf_flow_action
Definition: avf_advanced_flow.h:757
virtchnl_rss_key::vsi_id
u16 vsi_id
Definition: avf_advanced_flow.h:310
VIRTCHNL_PROTO_HDR_TCP_SRC_PORT
@ VIRTCHNL_PROTO_HDR_TCP_SRC_PORT
Definition: avf_advanced_flow.h:235
avf_ipv6_hdr::payload_len
u16 payload_len
IP packet length - includes header size.
Definition: avf_advanced_flow.h:607
avf_ipv6_hdr::hop_limits
u8 hop_limits
Hop limits.
Definition: avf_advanced_flow.h:609
avf_tcp_hdr::dst_port
u16 dst_port
TCP destination port.
Definition: avf_advanced_flow.h:620
avf_fdir_rcfg_act_drop
int avf_fdir_rcfg_act_drop(struct avf_fdir_conf *rcfg, int act_idx)
Set action as as drop, conflict with to queue(gropu) action.
Definition: avf_fdir_lib.c:564
virtchnl_fdir_del
Definition: avf_advanced_flow.h:499
type
vl_api_fib_path_type_t type
Definition: fib_types.api:123
avf_flow_error::message
const char * message
Human-readable error message.
Definition: avf_advanced_flow.h:568
VIRTCHNL_PROTO_HDR_SCTP_DST_PORT
@ VIRTCHNL_PROTO_HDR_SCTP_DST_PORT
Definition: avf_advanced_flow.h:245
avf_flow_item::mask
const void * mask
Bit-mask applied to spec and last.
Definition: avf_advanced_flow.h:767
avf_ipv6_hdr::proto
u8 proto
Protocol, next header.
Definition: avf_advanced_flow.h:608
VIRTCHNL_ADV_OP_ADD_FDIR_FILTER
@ VIRTCHNL_ADV_OP_ADD_FDIR_FILTER
Definition: avf_advanced_flow.h:783
avf_ether_addr::addr_bytes
u8 addr_bytes[AVF_ETHER_ADDR_LEN]
Addr bytes in tx order.
Definition: avf_advanced_flow.h:574
virtchnl_rss_cfg::rss_algorithm
enum virtchnl_rss_algorithm rss_algorithm
Definition: avf_advanced_flow.h:352
VIRTCHNL_PROTO_HDR_S_VLAN_ID
@ VIRTCHNL_PROTO_HDR_S_VLAN_ID
Definition: avf_advanced_flow.h:215
virtchnl_fdir_rule::action_set
struct virtchnl_filter_action_set action_set
Definition: avf_advanced_flow.h:413