netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Huazhong Tan <tanhuazhong@huawei.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: <davem@davemloft.net>, <netdev@vger.kernel.org>,
	<salil.mehta@huawei.com>, <yisen.zhuang@huawei.com>,
	<huangdaode@huawei.com>, <linuxarm@openeuler.org>,
	<linuxarm@huawei.com>, Guangbin Huang <huangguangbin2@huawei.com>
Subject: Re: [PATCH net-next 1/2] net: hns3: PF add support for pushing link status to VFs
Date: Thu, 15 Apr 2021 09:11:03 +0800	[thread overview]
Message-ID: <ab9a508c-29f0-1ff5-bb95-fbae4a859d6b@huawei.com> (raw)
In-Reply-To: <20210414094230.64caf43e@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>


On 2021/4/15 0:42, Jakub Kicinski wrote:
> On Wed, 14 Apr 2021 09:51:38 +0800 Huazhong Tan wrote:
>> On 2021/4/14 1:18, Jakub Kicinski wrote:
>>> On Tue, 13 Apr 2021 14:17:00 +0800 Huazhong Tan wrote:
>>>> +static void hclge_push_link_status(struct hclge_dev *hdev)
>>>> +{
>>>> +	struct hclge_vport *vport;
>>>> +	int ret;
>>>> +	u16 i;
>>>> +
>>>> +	for (i = 0; i < pci_num_vf(hdev->pdev); i++) {
>>>> +		vport = &hdev->vport[i + HCLGE_VF_VPORT_START_NUM];
>>>> +
>>>> +		if (!test_bit(HCLGE_VPORT_STATE_ALIVE, &vport->state) ||
>>>> +		    vport->vf_info.link_state != IFLA_VF_LINK_STATE_AUTO)
>>>> +			continue;
>>>> +
>>>> +		ret = hclge_push_vf_link_status(vport);
>>>> +		if (ret) {
>>>> +			dev_err(&hdev->pdev->dev,
>>>> +				"failed to push link status to vf%u, ret = %d\n",
>>>> +				i, ret);
>>> Isn't this error printed twice? Here and...
>> They are in different contexts. here will be called to
>> update the link status of all VFs when the underlying
>> link status is changed, while the below one is called
>> when the admin set up the specific VF link status.
> I see.


So this error will be printed twice only if these two cases
happen at the same, do you mean to add some keyword to
distinguish them?


> .


  reply	other threads:[~2021-04-15  1:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-13  6:16 [PATCH net-next 0/2] net: hns3: updates for -next Huazhong Tan
2021-04-13  6:17 ` [PATCH net-next 1/2] net: hns3: PF add support for pushing link status to VFs Huazhong Tan
2021-04-13 17:18   ` Jakub Kicinski
2021-04-14  1:51     ` Huazhong Tan
2021-04-14 16:42       ` Jakub Kicinski
2021-04-15  1:11         ` Huazhong Tan [this message]
2021-04-15  1:53           ` Jakub Kicinski
2021-04-15  2:13             ` Huazhong Tan
2021-04-13  6:17 ` [PATCH net-next 2/2] net: hns3: VF not request link status when PF support push link status feature Huazhong Tan

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=ab9a508c-29f0-1ff5-bb95-fbae4a859d6b@huawei.com \
    --to=tanhuazhong@huawei.com \
    --cc=davem@davemloft.net \
    --cc=huangdaode@huawei.com \
    --cc=huangguangbin2@huawei.com \
    --cc=kuba@kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=linuxarm@openeuler.org \
    --cc=netdev@vger.kernel.org \
    --cc=salil.mehta@huawei.com \
    --cc=yisen.zhuang@huawei.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).