Added virtchnl2_flow_types to be used for flow steering.

Added flow steer cap flags for vport create.

Add flow steer flow types and action types for vport create.

Signed-off-by: Soumyadeep Hore <soumyadeep.h...@intel.com>
---
 drivers/common/idpf/base/virtchnl2.h | 60 ++++++++++++++++++++++++++--
 1 file changed, 57 insertions(+), 3 deletions(-)

diff --git a/drivers/common/idpf/base/virtchnl2.h 
b/drivers/common/idpf/base/virtchnl2.h
index 317bd06c0f..c14a4e2c7d 100644
--- a/drivers/common/idpf/base/virtchnl2.h
+++ b/drivers/common/idpf/base/virtchnl2.h
@@ -269,6 +269,43 @@ enum virtchnl2_cap_other {
        VIRTCHNL2_CAP_OEM                       = BIT_ULL(63),
 };
 
+/**
+ * enum virtchnl2_action_types - Available actions for sideband flow steering
+ * @VIRTCHNL2_ACTION_DROP: Drop the packet
+ * @VIRTCHNL2_ACTION_PASSTHRU: Forward the packet to the next classifier/stage
+ * @VIRTCHNL2_ACTION_QUEUE: Forward the packet to a receive queue
+ * @VIRTCHNL2_ACTION_Q_GROUP: Forward the packet to a receive queue group
+ * @VIRTCHNL2_ACTION_MARK: Mark the packet with specific marker value
+ * @VIRTCHNL2_ACTION_COUNT: Increment the corresponding counter
+ */
+
+enum virtchnl2_action_types {
+       VIRTCHNL2_ACTION_DROP           = BIT(0),
+       VIRTCHNL2_ACTION_PASSTHRU       = BIT(1),
+       VIRTCHNL2_ACTION_QUEUE          = BIT(2),
+       VIRTCHNL2_ACTION_Q_GROUP        = BIT(3),
+       VIRTCHNL2_ACTION_MARK           = BIT(4),
+       VIRTCHNL2_ACTION_COUNT          = BIT(5),
+};
+
+/* Flow type capabilities for Flow Steering and Receive-Side Scaling */
+enum virtchnl2_flow_types {
+       VIRTCHNL2_FLOW_IPV4_TCP         = BIT(0),
+       VIRTCHNL2_FLOW_IPV4_UDP         = BIT(1),
+       VIRTCHNL2_FLOW_IPV4_SCTP        = BIT(2),
+       VIRTCHNL2_FLOW_IPV4_OTHER       = BIT(3),
+       VIRTCHNL2_FLOW_IPV6_TCP         = BIT(4),
+       VIRTCHNL2_FLOW_IPV6_UDP         = BIT(5),
+       VIRTCHNL2_FLOW_IPV6_SCTP        = BIT(6),
+       VIRTCHNL2_FLOW_IPV6_OTHER       = BIT(7),
+       VIRTCHNL2_FLOW_IPV4_AH          = BIT(8),
+       VIRTCHNL2_FLOW_IPV4_ESP         = BIT(9),
+       VIRTCHNL2_FLOW_IPV4_AH_ESP      = BIT(10),
+       VIRTCHNL2_FLOW_IPV6_AH          = BIT(11),
+       VIRTCHNL2_FLOW_IPV6_ESP         = BIT(12),
+       VIRTCHNL2_FLOW_IPV6_AH_ESP      = BIT(13),
+};
+
 /**
  * enum virtchnl2_txq_sched_mode - Transmit Queue Scheduling Modes
  * @VIRTCHNL2_TXQ_SCHED_MODE_QUEUE: Queue mode is the legacy mode i.e. inorder
@@ -707,11 +744,16 @@ VIRTCHNL2_CHECK_STRUCT_VAR_LEN(40, 
virtchnl2_queue_reg_chunks, chunks);
 /**
  * enum virtchnl2_vport_flags - Vport flags
  * @VIRTCHNL2_VPORT_UPLINK_PORT: Uplink port flag
- * @VIRTCHNL2_VPORT_INLINE_FLOW_STEER_ENA: Inline flow steering enable flag
+ * @VIRTCHNL2_VPORT_INLINE_FLOW_STEER: Inline flow steering enabled
+ * @VIRTCHNL2_VPORT_INLINE_FLOW_STEER_RXQ: Inline flow steering enabled
+ * with explicit Rx queue action
+ * @VIRTCHNL2_VPORT_SIDEBAND_FLOW_STEER: Sideband flow steering enabled
  */
 enum virtchnl2_vport_flags {
        VIRTCHNL2_VPORT_UPLINK_PORT             = BIT(0),
-       VIRTCHNL2_VPORT_INLINE_FLOW_STEER_ENA   = BIT(1),
+       VIRTCHNL2_VPORT_INLINE_FLOW_STEER       = BIT(1),
+       VIRTCHNL2_VPORT_INLINE_FLOW_STEER_RXQ   = BIT(2),
+       VIRTCHNL2_VPORT_SIDEBAND_FLOW_STEER     = BIT(3),
 };
 
 #define VIRTCHNL2_ETH_LENGTH_OF_ADDRESS  6
@@ -739,6 +781,14 @@ enum virtchnl2_vport_flags {
  * @rx_desc_ids: See enum virtchnl2_rx_desc_id_bitmasks
  * @tx_desc_ids: See enum virtchnl2_tx_desc_ids
  * @reserved: Reserved bytes and cannot be used
+ * @inline_flow_types: Bit mask of supported inline-flow-steering
+ *  flow types (See enum virtchnl2_flow_types)
+ * @sideband_flow_types: Bit mask of supported sideband-flow-steering
+ *  flow types (See enum virtchnl2_flow_types)
+ * @sideband_flow_actions: Bit mask of supported action types
+ *  for sideband flow steering (See enum virtchnl2_action_types)
+ * @flow_steer_max_rules: Max rules allowed for inline and sideband
+ *  flow steering combined
  * @rss_algorithm: RSS algorithm
  * @rss_key_size: RSS key size
  * @rss_lut_size: RSS LUT size
@@ -768,7 +818,11 @@ struct virtchnl2_create_vport {
        __le16 vport_flags;
        __le64 rx_desc_ids;
        __le64 tx_desc_ids;
-       u8 reserved[72];
+       u8 reserved[48];
+       __le64 inline_flow_types;
+       __le64 sideband_flow_types;
+       __le32 sideband_flow_actions;
+       __le32 flow_steer_max_rules;
        __le32 rss_algorithm;
        __le16 rss_key_size;
        __le16 rss_lut_size;
-- 
2.43.0

Reply via email to