From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D52CC4414E; Tue, 4 Jun 2024 10:50:57 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 653F1435AF; Tue, 4 Jun 2024 10:49:14 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by mails.dpdk.org (Postfix) with ESMTP id 9CDE4435A8 for ; Tue, 4 Jun 2024 10:49:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717490952; x=1749026952; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=vq7TvYjAXQ9XZT/ueqvkX10QWNdjDz4Rp+jHPyTpuXc=; b=UFxqA2BdgGwpUzhWfS2J3kSUuOngVdJUr1NkN8uHi2wBENmjfGJ8/0Z4 OLCa2geXQFxz2QukXMoe5yNEHAj396ZBwn1WxjFE3uavvWO0rui/n0DyD kkLD4tHPne1zTMrSHWMroHIh/zC2NAnq9Pqr/3GsWMiLoWJSaEfqNES0C x/KLST2X6fKpihszU0uiOvFxSHTzGXcTyvwcz3sUWPWnWM/M/eC4kyl6e Ig2VvrbeJGfDE7DXFrvarh0EUfgPqB0sA8psRvaETE4jEmiNtQ3Og4m+H WjkHrZXkGvfwHDaZ1EvOgJK5VWWJ6/N4xqw7u1e8V5n33YAdEiWIQIGK8 w==; X-CSE-ConnectionGUID: o8tN+cJaTFGW7HaCyAgkyQ== X-CSE-MsgGUID: Cw7Njs3tSF+O8y0wDMiYLw== X-IronPort-AV: E=McAfee;i="6600,9927,11092"; a="13971730" X-IronPort-AV: E=Sophos;i="6.08,213,1712646000"; d="scan'208";a="13971730" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2024 01:49:11 -0700 X-CSE-ConnectionGUID: bYVjXHPLQeKmGyq81IaGOA== X-CSE-MsgGUID: vbuQ8RytSo29cwkrc33z+w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,213,1712646000"; d="scan'208";a="42268732" Received: from unknown (HELO npf-hyd-clx-03..) ([10.145.170.182]) by orviesa004.jf.intel.com with ESMTP; 04 Jun 2024 01:49:09 -0700 From: Soumyadeep Hore To: bruce.richardson@intel.com, anatoly.burakov@intel.com Cc: dev@dpdk.org Subject: [PATCH v2 18/21] common/idpf: enable flow steer capability for vports Date: Tue, 4 Jun 2024 08:06:08 +0000 Message-ID: <20240604080611.2197835-19-soumyadeep.hore@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240604080611.2197835-1-soumyadeep.hore@intel.com> References: <20240528072839.867100-1-soumyadeep.hore@intel.com> <20240604080611.2197835-1-soumyadeep.hore@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 --- 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 fb017b1306..4ef4015429 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