From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
To: Akihiko Odaki <akihiko.odaki@daynix.com>
Cc: <linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>,
<intel-wired-lan@lists.osuosl.org>,
Jesse Brandeburg <jesse.brandeburg@intel.com>,
Tony Nguyen <anthony.l.nguyen@intel.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
"Yan Vugenfirer" <yan@daynix.com>,
Yuri Benditovich <yuri.benditovich@daynix.com>
Subject: Re: [PATCH v2] igbvf: Regard vf reset nack as success
Date: Tue, 22 Nov 2022 17:22:59 +0100 [thread overview]
Message-ID: <Y3z3Y5kpz2EgN3uq@boxer> (raw)
In-Reply-To: <20221122152630.76190-1-akihiko.odaki@daynix.com>
On Wed, Nov 23, 2022 at 12:26:30AM +0900, Akihiko Odaki wrote:
> vf reset nack actually represents the reset operation itself is
> performed but no address is assigned. Therefore, e1000_reset_hw_vf
> should fill the "perm_addr" with the zero address and return success on
> such an occasion. This prevents its callers in netdev.c from saying PF
> still resetting, and instead allows them to correctly report that no
> address is assigned.
What's the v1->v2 diff?
Probably route to net and add fixes tag?
>
> Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
> ---
> drivers/net/ethernet/intel/igbvf/vf.c | 15 ++++++++++++---
> 1 file changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/igbvf/vf.c b/drivers/net/ethernet/intel/igbvf/vf.c
> index b8ba3f94c363..2691ae2a8002 100644
> --- a/drivers/net/ethernet/intel/igbvf/vf.c
> +++ b/drivers/net/ethernet/intel/igbvf/vf.c
> @@ -1,6 +1,8 @@
> // SPDX-License-Identifier: GPL-2.0
> /* Copyright(c) 2009 - 2018 Intel Corporation. */
>
> +#include <linux/etherdevice.h>
> +
> #include "vf.h"
>
> static s32 e1000_check_for_link_vf(struct e1000_hw *hw);
> @@ -131,11 +133,18 @@ static s32 e1000_reset_hw_vf(struct e1000_hw *hw)
> /* set our "perm_addr" based on info provided by PF */
> ret_val = mbx->ops.read_posted(hw, msgbuf, 3);
> if (!ret_val) {
> - if (msgbuf[0] == (E1000_VF_RESET |
> - E1000_VT_MSGTYPE_ACK))
> + switch (msgbuf[0]) {
> + case E1000_VF_RESET | E1000_VT_MSGTYPE_ACK:
> memcpy(hw->mac.perm_addr, addr, ETH_ALEN);
> - else
> + break;
> +
> + case E1000_VF_RESET | E1000_VT_MSGTYPE_NACK:
> + eth_zero_addr(hw->mac.perm_addr);
> + break;
> +
> + default:
> ret_val = -E1000_ERR_MAC_INIT;
> + }
> }
> }
>
> --
> 2.38.1
>
next prev parent reply other threads:[~2022-11-22 16:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-22 15:26 [PATCH v2] igbvf: Regard vf reset nack as success Akihiko Odaki
2022-11-22 16:22 ` Maciej Fijalkowski [this message]
2022-11-23 1:04 ` Akihiko Odaki
2022-11-28 22:07 ` Tony Nguyen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y3z3Y5kpz2EgN3uq@boxer \
--to=maciej.fijalkowski@intel.com \
--cc=akihiko.odaki@daynix.com \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jesse.brandeburg@intel.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=yan@daynix.com \
--cc=yuri.benditovich@daynix.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).