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 5D1E545955; Tue, 10 Sep 2024 13:10:36 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 48A9D42F06; Tue, 10 Sep 2024 13:09:52 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) by mails.dpdk.org (Postfix) with ESMTP id 42AD342EE1 for ; Tue, 10 Sep 2024 13:09:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725966592; x=1757502592; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=/OUhltj/U+HBOHTx34OYHE1nOFP2Eqh0gSoC2bK6kV0=; b=mn/oDgAcmmBKNgt0no92jIIVc8pPdUaD5tDiYWZ3lrB0eR2e+TjynuxK bA7UWVlwEAAEmWU4fawZoJFECNlqz+/LsixIJiMJqk8FwmzfPCatCNQfR ebybo+jh2W5mOVclv5VXSZ2ka7YFLh8V6MD1luLTBoN719EHpm6og71k5 lmpKqTdfifgPABdfSWkjNrO0SbAEnFq3QCTZksOb1Ew8MBeS5EWtDvqwc rgbkxIz60+hX1RAcyLOkiCWVhTd9tjyE5hzfqBfJtyjYS9Wx/dd/XJN+q wMNCsuv20e7OmrdLiVx6/tNgrhW4PnSKPqBC1m/V/5aIqxLIJaxcBVV8W Q==; X-CSE-ConnectionGUID: yxzOal1ES3CDAj4v08YjfA== X-CSE-MsgGUID: eV9B7b1OSqa7E4C4+c/kyw== X-IronPort-AV: E=McAfee;i="6700,10204,11190"; a="35276938" X-IronPort-AV: E=Sophos;i="6.10,217,1719903600"; d="scan'208";a="35276938" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Sep 2024 04:09:51 -0700 X-CSE-ConnectionGUID: e3u0W1hbRGOGjd7bP0J0/A== X-CSE-MsgGUID: P/pMMdtCTBqcd1ODdvy7Yg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,217,1719903600"; d="scan'208";a="71969863" Received: from unknown (HELO npf-hyd-clx-03..) ([10.145.170.182]) by orviesa004.jf.intel.com with ESMTP; 10 Sep 2024 04:09:49 -0700 From: Soumyadeep Hore To: bruce.richardson@intel.com, aman.deep.singh@intel.com Cc: dev@dpdk.org, shaiq.wani@intel.com, Ahmed Zaki Subject: [PATCH v1 9/9] common/iavf: add RSS CONFIG hash function Date: Tue, 10 Sep 2024 10:12:24 +0000 Message-ID: <20240910101224.497044-10-soumyadeep.hore@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240910101224.497044-1-soumyadeep.hore@intel.com> References: <20240910101224.497044-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 From: Ahmed Zaki Add VIRTCHNL_OP_CONFIG_RSS_HFUNC that allows the iavf to select the VF's hash function. Signed-off-by: Ahmed Zaki Signed-off-by: Soumyadeep Hore --- drivers/common/iavf/virtchnl.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/common/iavf/virtchnl.h b/drivers/common/iavf/virtchnl.h index 92e323d741..c0d52ddd32 100644 --- a/drivers/common/iavf/virtchnl.h +++ b/drivers/common/iavf/virtchnl.h @@ -122,6 +122,7 @@ enum virtchnl_ops { VIRTCHNL_OP_GET_STATS = 15, VIRTCHNL_OP_RSVD = 16, VIRTCHNL_OP_EVENT = 17, /* must ALWAYS be 17 */ + VIRTCHNL_OP_CONFIG_RSS_HFUNC = 18, /* opcode 19 is reserved */ /* opcodes 20, 21, and 22 are reserved */ VIRTCHNL_OP_CONFIG_RSS_KEY = 23, @@ -1308,6 +1309,21 @@ enum virtchnl_rss_algorithm { /* This is used by PF driver to enforce max supported channels */ #define VIRTCHNL_MAX_QGRPS 16 +/* VIRTCHNL_OP_CONFIG_RSS_HFUNC + * VF sends this message to configure the RSS hash function. Only supported + * if both PF and VF drivers set the VIRTCHNL_VF_OFFLOAD_RSS_PF bit during + * configuration negotiation. + * The hash function is initialized to VIRTCHNL_RSS_ALG_TOEPLITZ_ASYMMETRIC + * by the PF. + */ +struct virtchnl_rss_hfunc { + u16 vsi_id; + u16 rss_algorithm; /* enum virtchnl_rss_algorithm */ + u32 reserved; +}; + +VIRTCHNL_CHECK_STRUCT_LEN(8, virtchnl_rss_hfunc); + /* VIRTCHNL_OP_ENABLE_CHANNELS * VIRTCHNL_OP_DISABLE_CHANNELS * VF sends these messages to enable or disable channels based on @@ -2749,6 +2765,9 @@ virtchnl_vc_validate_vf_msg(struct virtchnl_version_info *ver, u32 v_opcode, valid_len += vrl->lut_entries - 1; } break; + case VIRTCHNL_OP_CONFIG_RSS_HFUNC: + valid_len = sizeof(struct virtchnl_rss_hfunc); + break; case VIRTCHNL_OP_GET_RSS_HENA_CAPS: break; case VIRTCHNL_OP_SET_RSS_HENA: -- 2.34.1