From nobody Tue Feb 10 11:56:16 2026 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 07AB119006B; Thu, 2 Oct 2025 00:17:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759364239; cv=none; b=EDgcAuBbNWp50s8gG1PorcJ9UkrkZ4PVihL4mTMSsb/L28boftgnG0J5eRq23INdzEWJpLik6LwkQ4W0KzwZXHcoBWdfe4DQKNdBZv6sCeGWMPsIz+ZsdEfK589tgO+2HRSyC2WP6VXdNN5K6rFcKoE8fnA5tr6GtFMQZl/kt6Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759364239; c=relaxed/simple; bh=RgeNQBcQgpqgx11kptNdxlrmcyjbhIOGk0TQRxdSRQA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=PrdSV7h5TaY/gUgEK9g/Zs1ejPfp9UTOBTeDQPLevid6hHP52me9EPfhp+lnMpOHGoLcElVQcWF6NoCH+fkR35f53OnOEu1agYh8j0XutRzrUIPrTR4lFmXXA2v2S9wB/dOiJo4pvX1MSA61d2aWqAIll3GnaM6GouxDdCOGn80= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=GcZka3kQ; arc=none smtp.client-ip=192.198.163.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="GcZka3kQ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1759364237; x=1790900237; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=RgeNQBcQgpqgx11kptNdxlrmcyjbhIOGk0TQRxdSRQA=; b=GcZka3kQhYVIV6ln4E8QfnB/Xd8tDImL36NceAykVAdR9Bwq/dVTjSTY IW0qLrbJI6hGPZK8eQqi1j49jqq9yO71LxfHgtHzMwTh5wihWiGr46+Ge w3NmnlomkB43iXO7p47ViyhVWHoRL9mXkTMPKQOb019yuTcQ9ruPOfBvN /MS047E9frLxqV0REWp83jXmM+QgXRom8oP3zoFGUgRBFINwB5d/v4PS7 Yq9YT1a95nL/otaSv7z6KiTwnJk4667B0ggsguK6OemKwJQRoXzhRrFPt RapPRLJR/E13BKcPjIAjXzGg3lA0PbCp7AEZIazB0WL9unSFWBKQp08kR Q==; X-CSE-ConnectionGUID: fVe9ylm1StaQ/OE/b6Y/gQ== X-CSE-MsgGUID: WdW3qZGJT/uFIJKwrONNNQ== X-IronPort-AV: E=McAfee;i="6800,10657,11569"; a="61561628" X-IronPort-AV: E=Sophos;i="6.18,308,1751266800"; d="scan'208";a="61561628" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Oct 2025 17:17:11 -0700 X-CSE-ConnectionGUID: H4YKFwD/R56Ltf7p+OL93Q== X-CSE-MsgGUID: Etn6d/q3QsK2UGknoilQfw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.18,308,1751266800"; d="scan'208";a="184105732" Received: from orcnseosdtjek.jf.intel.com (HELO [10.166.28.70]) ([10.166.28.70]) by orviesa005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Oct 2025 17:17:09 -0700 From: Jacob Keller Date: Wed, 01 Oct 2025 17:14:17 -0700 Subject: [PATCH net 7/8] ixgbe: handle IXGBE_VF_FEATURES_NEGOTIATE mbox cmd Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251001-jk-iwl-net-2025-10-01-v1-7-49fa99e86600@intel.com> References: <20251001-jk-iwl-net-2025-10-01-v1-0-49fa99e86600@intel.com> In-Reply-To: <20251001-jk-iwl-net-2025-10-01-v1-0-49fa99e86600@intel.com> To: Przemek Kitszel , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Emil Tantilov , Pavan Kumar Linga , Alexander Lobakin , Willem de Bruijn , Sridhar Samudrala , Phani Burra , Piotr Kwapulinski , Simon Horman , Radoslaw Tyl , Jedrzej Jagielski , Mateusz Polchlopek Cc: Anton Nadezhdin , Konstantin Ilichev , Milena Olech , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jacob Keller , Aleksandr Loktionov , Rafal Romanowski X-Mailer: b4 0.15-dev-cbe0e X-Developer-Signature: v=1; a=openpgp-sha256; l=5911; i=jacob.e.keller@intel.com; h=from:subject:message-id; bh=MsoNO3H718UnSfV5mKU/AvA3F+RoOyxFypHxNu2Okig=; b=owGbwMvMwCWWNS3WLp9f4wXjabUkhoy7R1pctGqaEu9ulLvOMqFjgrDrMeUFq07sfGgltMT8w kFLxaurO0pYGMS4GGTFFFkUHEJWXjeeEKb1xlkOZg4rE8gQBi5OAZhI5V9GhkPJi62SX0t+XuPz 0nx2lVSaVL+M3efm2Ve4D5kaJXTw7Gf40de8zunuZh/2Dv3yfbyP1C0aUpIU2G33OjvKP+tem8I MAA== X-Developer-Key: i=jacob.e.keller@intel.com; a=openpgp; fpr=204054A9D73390562AEC431E6A965D3E6F0F28E8 From: Jedrzej Jagielski Send to VF information about features supported by the PF driver. Increase API version to 1.7. Reviewed-by: Przemek Kitszel Reviewed-by: Aleksandr Loktionov Signed-off-by: Jedrzej Jagielski Tested-by: Rafal Romanowski --- drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h | 10 +++++++ drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 37 ++++++++++++++++++++++= ++++ 2 files changed, 47 insertions(+) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h b/drivers/net/eth= ernet/intel/ixgbe/ixgbe_mbx.h index f7256a339c99..0334ed4b8fa3 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h @@ -52,6 +52,7 @@ enum ixgbe_pfvf_api_rev { ixgbe_mbox_api_14, /* API version 1.4, linux/freebsd VF driver */ ixgbe_mbox_api_15, /* API version 1.5, linux/freebsd VF driver */ ixgbe_mbox_api_16, /* API version 1.6, linux/freebsd VF driver */ + ixgbe_mbox_api_17, /* API version 1.7, linux/freebsd VF driver */ /* This value should always be last */ ixgbe_mbox_api_unknown, /* indicates that API version is not known */ }; @@ -91,6 +92,9 @@ enum ixgbe_pfvf_api_rev { /* mailbox API, version 1.6 VF requests */ #define IXGBE_VF_GET_PF_LINK_STATE 0x11 /* request PF to send link info */ =20 +/* mailbox API, version 1.7 VF requests */ +#define IXGBE_VF_FEATURES_NEGOTIATE 0x12 /* get features supported by PF */ + /* length of permanent address message returned from PF */ #define IXGBE_VF_PERMADDR_MSG_LEN 4 /* word in permanent address message with the current multicast type */ @@ -101,6 +105,12 @@ enum ixgbe_pfvf_api_rev { #define IXGBE_VF_MBX_INIT_TIMEOUT 2000 /* number of retries on mailbox */ #define IXGBE_VF_MBX_INIT_DELAY 500 /* microseconds between retries */ =20 +/* features negotiated between PF/VF */ +#define IXGBEVF_PF_SUP_IPSEC BIT(0) +#define IXGBEVF_PF_SUP_ESX_MBX BIT(1) + +#define IXGBE_SUPPORTED_FEATURES IXGBEVF_PF_SUP_IPSEC + struct ixgbe_hw; =20 int ixgbe_read_mbx(struct ixgbe_hw *, u32 *, u16, u16); diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/e= thernet/intel/ixgbe/ixgbe_sriov.c index b09271d61a4e..ee133d6749b3 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c @@ -511,6 +511,7 @@ static int ixgbe_set_vf_lpe(struct ixgbe_adapter *adapt= er, u32 max_frame, u32 vf case ixgbe_mbox_api_13: case ixgbe_mbox_api_14: case ixgbe_mbox_api_16: + case ixgbe_mbox_api_17: /* Version 1.1 supports jumbo frames on VFs if PF has * jumbo frames enabled which means legacy VFs are * disabled @@ -1048,6 +1049,7 @@ static int ixgbe_negotiate_vf_api(struct ixgbe_adapte= r *adapter, case ixgbe_mbox_api_13: case ixgbe_mbox_api_14: case ixgbe_mbox_api_16: + case ixgbe_mbox_api_17: adapter->vfinfo[vf].vf_api =3D api; return 0; default: @@ -1075,6 +1077,7 @@ static int ixgbe_get_vf_queues(struct ixgbe_adapter *= adapter, case ixgbe_mbox_api_13: case ixgbe_mbox_api_14: case ixgbe_mbox_api_16: + case ixgbe_mbox_api_17: break; default: return -1; @@ -1115,6 +1118,7 @@ static int ixgbe_get_vf_reta(struct ixgbe_adapter *ad= apter, u32 *msgbuf, u32 vf) =20 /* verify the PF is supporting the correct API */ switch (adapter->vfinfo[vf].vf_api) { + case ixgbe_mbox_api_17: case ixgbe_mbox_api_16: case ixgbe_mbox_api_14: case ixgbe_mbox_api_13: @@ -1149,6 +1153,7 @@ static int ixgbe_get_vf_rss_key(struct ixgbe_adapter = *adapter, =20 /* verify the PF is supporting the correct API */ switch (adapter->vfinfo[vf].vf_api) { + case ixgbe_mbox_api_17: case ixgbe_mbox_api_16: case ixgbe_mbox_api_14: case ixgbe_mbox_api_13: @@ -1180,6 +1185,7 @@ static int ixgbe_update_vf_xcast_mode(struct ixgbe_ad= apter *adapter, case ixgbe_mbox_api_13: case ixgbe_mbox_api_14: case ixgbe_mbox_api_16: + case ixgbe_mbox_api_17: break; default: return -EOPNOTSUPP; @@ -1251,6 +1257,7 @@ static int ixgbe_get_vf_link_state(struct ixgbe_adapt= er *adapter, case ixgbe_mbox_api_13: case ixgbe_mbox_api_14: case ixgbe_mbox_api_16: + case ixgbe_mbox_api_17: break; default: return -EOPNOTSUPP; @@ -1278,6 +1285,7 @@ static int ixgbe_send_vf_link_status(struct ixgbe_ada= pter *adapter, =20 switch (adapter->vfinfo[vf].vf_api) { case ixgbe_mbox_api_16: + case ixgbe_mbox_api_17: if (hw->mac.type !=3D ixgbe_mac_e610) return -EOPNOTSUPP; break; @@ -1293,6 +1301,32 @@ static int ixgbe_send_vf_link_status(struct ixgbe_ad= apter *adapter, return 0; } =20 +/** + * ixgbe_negotiate_vf_features - negotiate supported features with VF dri= ver + * @adapter: pointer to adapter struct + * @msgbuf: pointer to message buffers + * @vf: VF identifier + * + * Return: 0 on success or -EOPNOTSUPP when operation is not supported. + */ +static int ixgbe_negotiate_vf_features(struct ixgbe_adapter *adapter, + u32 *msgbuf, u32 vf) +{ + u32 features =3D msgbuf[1]; + + switch (adapter->vfinfo[vf].vf_api) { + case ixgbe_mbox_api_17: + break; + default: + return -EOPNOTSUPP; + } + + features &=3D IXGBE_SUPPORTED_FEATURES; + msgbuf[1] =3D features; + + return 0; +} + static int ixgbe_rcv_msg_from_vf(struct ixgbe_adapter *adapter, u32 vf) { u32 mbx_size =3D IXGBE_VFMAILBOX_SIZE; @@ -1370,6 +1404,9 @@ static int ixgbe_rcv_msg_from_vf(struct ixgbe_adapter= *adapter, u32 vf) case IXGBE_VF_GET_PF_LINK_STATE: retval =3D ixgbe_send_vf_link_status(adapter, msgbuf, vf); break; + case IXGBE_VF_FEATURES_NEGOTIATE: + retval =3D ixgbe_negotiate_vf_features(adapter, msgbuf, vf); + break; default: e_err(drv, "Unhandled Msg %8.8x\n", msgbuf[0]); retval =3D -EIO; --=20 2.51.0.rc1.197.g6d975e95c9d7