From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796133894; b=fvWye4fBNo1qUAyiCYlzuNWnBqYDSvQSj3LcDGGQXK7DZcWh2jNk/veJBInc4qpoQAIG dRs4I5p+rAabWFXUsAqKjUlbLeRWpzXKMi9HapzbOEdkVwc112wkD3Pm7hkByI6dVlkqr RB6ciByRfcV0xBgT4Um+9vOQKf2YKfLod55/DEWlV1ItR//Fmmixn1/ixHUku7x0PV+Bt DMkv2Qw7MHWFkQ4IWvsmhyKYTjp+N4dHZUG9BnXDLNRxVLljRQgbBZJfnKD3YhTsaSDbk TDHCCkhkSWsen91My01on7YmOrFFR1xvd5118+NcVV8wn7wrsZXqjUSU2vF+s4cGmfQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796133894; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=mJde8k9PddSfZJvLuBrTkuMeXuvtI0NP3EAtfOhgZOk=; b=IHXxpMkRu/MY+dWb9P5iEwYooRPp2Ukr+A94fvQPwbGvGxyFcgWp2oAZJXyOEz3Xai51 HiN2aRoEz6LLdewxn8XLHmkLCuT6CrWUivXOC3358aCrWV5WpN1vc4ZNvrA8QFOoWTOd/ xu9khI+RiKkc+gVWLqOASBpfceYGY18nKEzrsY33LSWFH/6l1cg4MTM/vK3oH1PAvrFA8 swv9TU6f4TG7kGsfwYUyEKHsnJ9haLUg7HSIH0nuxlRH1cZTbLyD7zK5j9Gur2mHPh7gx NTaA2xw8t0gIs04vQk8wQ0lftw3pGblUHNf0QoA1Uz/FikIuK9it9bslR6MidcSPz+Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=CRQEA5XE; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 00DD8606A686; Tue, 1 Dec 2026 14:04:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=CRQEA5XE Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE33F1F00898; Tue, 1 Dec 2026 14:04:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796133893; bh=mJde8k9PddSfZJvLuBrTkuMeXuvtI0NP3EAtfOhgZOk=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=CRQEA5XEWaQHFXC8l9Yqc70xkQFbovyAU9H2jy9r6x6NiTYSTciXtPQFeJuP3Q/Ua d2Aterd6TcIv2acqRnD23giRTjwHqq1y2ONwDA1QwHzBvCZKVbV31WhQvq9S8jAEdc RUJklYg+tpvYGY2g7Pb6rgBGKeZRBfZ8HXuqo6oKiKYgkiMm5hGNexbYFtF7lCfWdw gAS7bMYsplYLK91l0G0VFYg7NAAnHgFe6G2V2sDMJhu3F3UVtd8ll76JS9Py6M8iK3 yr80z31ns5QJDfgv9/S2jkjxnIw491hGb534w49N+mu26vzN6aN6Y8k930nUgU6kP4 XpukL5V5nXjbQ== Subject: Re: [PATCH net-next v4 4/6] enic: validate V2 VF configuration replies From: netdev-bot+sashiko@kernel.org To: satishkh@cisco.com Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, willemb@google.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, sebaddel@cisco.com, aradhana@cisco.com, rfaucett@cisco.com Date: Tue, 01 Dec 2026 14:04:52 +0000 Message-ID: <179613389228.3146.12227403577099366046@kernel.org> In-Reply-To: <20261130-b4-enic-sriov-v2-vf-receive-control-v4-4-5858d5a9ecb1@cisco.com> References: <20261130-b4-enic-sriov-v2-vf-receive-control-v4-4-5858d5a9ecb1@cisco.com> X-sashiko-severity: Low Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Thank you for your contribution! Sashiko AI review found more severe issue(s) in other patches of this series. This mail is only an FYI, in case you want to address the nit picks below when you respin. Low priority / nit picks for your consideration: - [Low] The warning in enic_mbox_vf_capability_check() (drivers/net/ethernet/cisco/enic/enic_mbox.c) still says 'MBOX: PF… -- enic: validate V2 VF configuration replies This patch adds VF-side V2 mailbox operations for MAC filters and packet-filter settings, plus the administrative-MAC protocol definitions. It validates reply framing, echoed operations, result counts and applied filter flags. Malformed replies and registration loss now force a VF reconnect, and the patch adds a per-request mbox_reply_status that the existing capability, register and unregister callers now check. > diff --git a/drivers/net/ethernet/cisco/enic/enic_mbox.c b/drivers/net/ethernet/cisco/enic/enic_mbox.c > index 3579d2980a246..5afb45033772b 100644 > --- a/drivers/net/ethernet/cisco/enic/enic_mbox.c > +++ b/drivers/net/ethernet/cisco/enic/enic_mbox.c [ ... ] > @@ -572,23 +649,21 @@ static void enic_mbox_vf_handle_reply(struct enic *enic, u8 reply_type, > void *payload, u64 msg_num) > { > struct enic_mbox_generic_reply *reply = payload; > + enum enic_mbox_vf_reply_recovery recovery; > u16 ret_major = le16_to_cpu(reply->ret_major); > - u64 expected_msg_num; > - u8 expected_type; > + u8 expected; > + int status; > > - spin_lock_bh(&enic->mbox_state_lock); > - expected_type = enic->mbox_expected_reply; > - expected_msg_num = enic->mbox_expected_msg_num; > - if (expected_type != reply_type || expected_msg_num != msg_num) { > - spin_unlock_bh(&enic->mbox_state_lock); > + status = enic_mbox_vf_classify_reply(false, ret_major, &recovery); [ ... ] > - if (!ret_major) { > + if (!status) { > switch (reply_type) { > case ENIC_MBOX_VF_CAPABILITY_REPLY: { > struct enic_mbox_vf_capability_reply_msg *cap = payload; [ ... ] > @@ -829,12 +1104,15 @@ int enic_mbox_vf_capability_check(struct enic *enic) > > err = enic_mbox_wait_reply(enic, 3000); > version = READ_ONCE(enic->pf_cap_version); > + status = READ_ONCE(enic->mbox_reply_status); > enic_mbox_vf_request_finish(enic); > if (err) { > netdev_warn(enic->netdev, > "MBOX: no capability reply from PF\n"); > return err; > } > + if (status) > + return status; > > if (version < ENIC_MBOX_CAP_VERSION_1) { > netdev_warn(enic->netdev, [Severity: Low] Is the warning text that follows this check still accurate? It currently reads: netdev_warn(enic->netdev, "MBOX: PF rejected capability request or reported unsupported version %u\n", version); Before this patch, a PF rejection (nonzero ret_major) left pf_cap_version at 0. That case reached this warning and returned -EOPNOTSUPP. Now enic_mbox_vf_handle_reply() passes ret_major through enic_mbox_vf_classify_reply(). It stores the result in mbox_reply_status and skips the pf_cap_version write. The new "if (status) return status;" then returns -EIO, -ENODEV or -EOPNOTSUPP before the version check, and nothing is printed at this site. This means the warning only fires when the PF accepted the request but reported a version below ENIC_MBOX_CAP_VERSION_1. The "PF rejected capability request" part can no longer happen. Rejections are still logged by the "PF rejected reply type %u" warning in enic_mbox_vf_handle_reply(). Should this message be reduced to just the unsupported version case? As far as I can tell, the same wording is still there at the end of the series. -- Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261130-b4-enic-sriov-v2-vf-receive-control-v4-0-5858d5a9ecb1%40cisco.com