mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "luobin (L)" <luobin9@huawei.com>
To: David Miller <davem@davemloft.net>
Cc: <linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>,
	<luoxianjun@huawei.com>, <yin.yinshi@huawei.com>,
	<cloud.wangxiaoyun@huawei.com>, <chiqijun@huawei.com>
Subject: Re: [PATCH net 3/3] hinic: fix bug of send pkts while setting channels
Date: Thu, 3 Sep 2020 22:27:11 +0800	[thread overview]
Message-ID: <4846879f-92ac-3726-58c8-beb719eee22e@huawei.com> (raw)
In-Reply-To: <20200902.125257.1961904187228004830.davem@davemloft.net>

On 2020/9/3 3:52, David Miller wrote:
> From: Luo bin <luobin9@huawei.com>
> Date: Wed, 2 Sep 2020 17:41:45 +0800
> 
>> @@ -531,6 +531,11 @@ netdev_tx_t hinic_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
>>  	struct hinic_txq *txq;
>>  	struct hinic_qp *qp;
>>  
>> +	if (unlikely(!netif_carrier_ok(netdev))) {
>> +		dev_kfree_skb_any(skb);
>> +		return NETDEV_TX_OK;
>> +	}
> 
> As Eric said, these kinds of tests should not be placed in the fast path
> of the driver.
> 
> If you invoke close and the core networking still sends packets to the
> driver, that's a bug that needs to be fixed in the core networking.
> .
> 
Okay, I'm trying to figure out why the core networking can still call ndo_start_xmit
after netif_tx_disable and solve the problem fundamentally. And I'll undo this patch
temporarily.

      reply	other threads:[~2020-09-03 14:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-02  9:41 [PATCH net 0/3] hinic: BugFixes Luo bin
2020-09-02  9:41 ` [PATCH net 1/3] hinic: bump up the timeout of SET_FUNC_STATE cmd Luo bin
2020-09-02  9:41 ` [PATCH net 2/3] hinic: bump up the timeout of UPDATE_FW cmd Luo bin
2020-09-02  9:41 ` [PATCH net 3/3] hinic: fix bug of send pkts while setting channels Luo bin
2020-09-02 10:16   ` Eric Dumazet
2020-09-03 14:18     ` luobin (L)
2020-09-02 19:52   ` David Miller
2020-09-03 14:27     ` luobin (L) [this message]

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=4846879f-92ac-3726-58c8-beb719eee22e@huawei.com \
    --to=luobin9@huawei.com \
    --cc=chiqijun@huawei.com \
    --cc=cloud.wangxiaoyun@huawei.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luoxianjun@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=yin.yinshi@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

all inboxes | Powered by JetHome®