Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp198101ybg; Sun, 31 May 2020 21:57:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxSPQ5nyTL3+WUoNDswyKiylQ2nE/18evSmsf/IqyxUBCDJHDN2cJc5i1r17W8xYrMgy5O X-Received: by 2002:a17:906:f155:: with SMTP id gw21mr17528843ejb.388.1590987458809; Sun, 31 May 2020 21:57:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590987458; cv=none; d=google.com; s=arc-20160816; b=M9b1sJC2ufhVgJlFEmRM5oyMBed6NniG+E3ljVUxyDSBmDty5J2q3zM0IIGork92F3 ftRxPAz8TSHp1Ma/OBl6AUGXClEPGm+Mvp4ePkXimMna8AFl7qhQsxTsBe4WYs6cx3mW qkJC0iF24te16EjZWNlNjNQ5U3QBNl+/KAl9lapgyaM/mSyT2JFOiLwu4h/Xy6LlEt9Z Z51tXpY9FJXyVi1HHKJ/xJ+fhWHCVkOS7ZthkoFKo/4oXyP38/8ymhn6IkiRH1z+H3G9 MK7LfgkirHPsCRXiX5LAsk/UJCKzc9pX3mUb7INPywhQFd3KsyAPxb27EGtSUaAfSPsR 1ofA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=GxC6QEr2PO7V4ldeHEKDeX0An5bZ9rtnXIpWYqv5FTo=; b=SKStAVti5nVVHGbQWxao1tiMjx1ZFVDkfr9bH/EsP1ItjW9Z051qMkvPY5q/WzCksc 9IhjOn2rJ4rvaCr7rE8X9ggzxDXlAKEXzdmAanSxpXEhb0M8YEUJ5u1w7a6b9foc0hlX bQXO9pENB/lpa45dhY2qkSCHzGkYIfjcCngRhYGPekdMDtwurwr+nJpBPCzxzy2SpZlI qsky84+5dBW80D5sLKdw1hQz+VymIn7OwmkYH5qdHcPCNFTzm6Ixi+qinAQx3cekWYVk 0RSrn7Tbs1K0HTaO9TfE4z+0CX8E66msX545kDFtQNaspPpbysH22W+muutRZoZewvqm sGeQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f22si9934632ejq.720.2020.05.31.21.56.58; Sun, 31 May 2020 21:57:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725876AbgFAEyP (ORCPT + 99 others); Mon, 1 Jun 2020 00:54:15 -0400 Received: from mx2.suse.de ([195.135.220.15]:58498 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725290AbgFAEyP (ORCPT ); Mon, 1 Jun 2020 00:54:15 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id EFA63AE6E; Mon, 1 Jun 2020 04:54:14 +0000 (UTC) Received: by lion.mk-sys.cz (Postfix, from userid 1000) id C97FA6045E; Mon, 1 Jun 2020 06:54:11 +0200 (CEST) Date: Mon, 1 Jun 2020 06:54:11 +0200 From: Michal Kubecek To: netdev@vger.kernel.org Cc: Luo bin , davem@davemloft.net, linux-kernel@vger.kernel.org, luoxianjun@huawei.com, yin.yinshi@huawei.com, cloud.wangxiaoyun@huawei.com Subject: Re: [PATCH net-next v4] hinic: add set_channels ethtool_ops support Message-ID: <20200601045411.6hgos2pyxum4o2sd@lion.mk-sys.cz> References: <20200601094206.20785-1-luobin9@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200601094206.20785-1-luobin9@huawei.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 01, 2020 at 09:42:06AM +0000, Luo bin wrote: > add support to change TX/RX queue number with ethtool -L ethx combined > > Signed-off-by: Luo bin > --- [...] The patch looks correct but I'm not sure how is this change > diff --git a/drivers/net/ethernet/huawei/hinic/hinic_tx.c b/drivers/net/ethernet/huawei/hinic/hinic_tx.c > index 4c66a0bc1b28..6da761d7a6ef 100644 > --- a/drivers/net/ethernet/huawei/hinic/hinic_tx.c > +++ b/drivers/net/ethernet/huawei/hinic/hinic_tx.c > @@ -470,6 +470,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; > + } > + > txq = &nic_dev->txqs[q_id]; > qp = container_of(txq->sq, struct hinic_qp, sq); > related to the rest. It rather looks as a fix/workaround for a race condition you encountered while testing it but which could also happen under other circumstances. Michal