Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1739775
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Yunsheng Lin <linyunsheng@huawei.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 net-next 10/10] net: hns3: Add mqprio support when interacting with network stack |
| Date | Tue, 26 Sep 2017 12:50:01 +0200 |
| Message-ID | <utVB7-3Ca-3@gated-at.bofh.it> (permalink) |
| References | <utNNf-6PT-3@gated-at.bofh.it> <utNNf-6PT-1@gated-at.bofh.it> <utRQS-150-19@gated-at.bofh.it> |
| X-Original-To | Yuval Mintz <yuvalm@mellanox.com> |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset="utf-8" |
| Content-Language | en-US |
| Content-Transfer-Encoding | 7bit |
| X-Originating-IP | [10.74.191.121] |
| X-Cfilter-Loop | Reflected |
| X-Mirapoint-Virus-Rapid-Raw | score=unknown(0), refid=str=0001.0A090201.59CA30B1.01BE,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 |
| X-Mirapoint-Loop-ID | c76adcc21de481378508f32c3decbe87 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 67 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | "huangdaode@hisilicon.com" <huangdaode@hisilicon.com>, "xuwei5@hisilicon.com" <xuwei5@hisilicon.com>, "liguozhu@hisilicon.com" <liguozhu@hisilicon.com>, "Yisen.Zhuang@huawei.com" <Yisen.Zhuang@huawei.com>, "gabriele.paoloni@huawei.com" <gabriele.paoloni@huawei.com>, "john.garry@huawei.com" <john.garry@huawei.com>, "linuxarm@huawei.com" <linuxarm@huawei.com>, "salil.mehta@huawei.com" <salil.mehta@huawei.com>, "lipeng321@huawei.com" <lipeng321@huawei.com>, "netdev@vger.kernel.org" <netdev@vger.kernel.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "davem@davemloft.net" <davem@davemloft.net> |
| X-Original-Date | Tue, 26 Sep 2017 18:49:14 +0800 |
| X-Original-Message-ID | <3fe662df-a216-4966-863c-d98555ef3ed2@huawei.com> |
| X-Original-References | <1506392718-50463-1-git-send-email-linyunsheng@huawei.com> <1506392718-50463-11-git-send-email-linyunsheng@huawei.com> <AM0PR0502MB3683C922A7D87D3E1F64B93EBF7B0@AM0PR0502MB3683.eurprd05.prod.outlook.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1739775 |
Show key headers only | View raw
Hi, Yuval
On 2017/9/26 14:43, Yuval Mintz wrote:
>> When using tc qdisc to configure DCB parameter, dcb_ops->setup_tc
>> is used to tell hclge_dcb module to do the setup.
>
> While this might be a step in the right direction, this causes an inconsistency
> in user experience - Some [well, most] vendors didn't allow the mqprio
> priority mapping to affect DCB, instead relying on the dcbnl functionality
> to control that configuration.
>
> A couple of options to consider:
> - Perhaps said logic shouldn't be contained inside the driver but rather
> in mqprio logic itself. I.e., rely on DCBNL functionality [if available] from
> within mqprio and try changing the configuration.
In net/dcb/dcbnl.c
dcbnl_ieee_set already call dcbnl_ieee_notify to notify the user space
configuration has changed, does this dcbnl_ieee_notify function do the
job for us? I am not sure if lldpad has registered for this notifition.
As you suggested below, can we add a new TC_MQPRIO_HW_OFFLOAD_ value to
reflect that the configuration is needed to be changed by dcbnl_ieee_set
(perhaps some other function) in dcbnl?
Do you think it is feasible?
> - Add a new TC_MQPRIO_HW_OFFLOAD_ value to explicitly reflect user
> request to allow this configuration to affect DCB.
>
>> When using lldptool to configure DCB parameter, hclge_dcb module
>> call the client_ops->setup_tc to tell network stack which queue
>> and priority is using for specific tc.
>
> You're basically bypassing the mqprio logic.
> Since you're configuring the prio->queue mapping from DCB flow,
> you'll get an mqprio-like behavior [meaning a transmitted packet
> would reach a transmission queue associated with its priority] even
> if device wasn't grated with an mqprio qdisc.
> Why should your user even use mqprio? What benefit does he get from it?
>
> ...
>
>> +static int hns3_nic_set_real_num_queue(struct net_device *netdev)
>> +{
>> + struct hns3_nic_priv *priv = netdev_priv(netdev);
>> + struct hnae3_handle *h = priv->ae_handle;
>> + struct hnae3_knic_private_info *kinfo = &h->kinfo;
>> + unsigned int queue_size = kinfo->rss_size * kinfo->num_tc;
>> + int ret;
>> +
>> + ret = netif_set_real_num_tx_queues(netdev, queue_size);
>> + if (ret) {
>> + netdev_err(netdev,
>> + "netif_set_real_num_tx_queues fail, ret=%d!\n",
>> + ret);
>> + return ret;
>> + }
>> +
>> + ret = netif_set_real_num_rx_queues(netdev, queue_size);
>
> I don't think you're changing the driver behavior, but why are you setting
> the real number of rx queues based on the number of TCs?
> Do you actually open (TC x RSS) Rx queues?
>
> .
>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 net-next 10/10] net: hns3: Add mqprio support when interacting with network stack Yunsheng Lin <linyunsheng@huawei.com> - 2017-09-26 04:30 +0200
RE: [PATCH v2 net-next 10/10] net: hns3: Add mqprio support when interacting with network stack Yuval Mintz <yuvalm@mellanox.com> - 2017-09-26 08:50 +0200
Re: [PATCH v2 net-next 10/10] net: hns3: Add mqprio support when interacting with network stack Yunsheng Lin <linyunsheng@huawei.com> - 2017-09-26 09:30 +0200
Re: [PATCH v2 net-next 10/10] net: hns3: Add mqprio support when interacting with network stack Yunsheng Lin <linyunsheng@huawei.com> - 2017-09-26 09:40 +0200
Re: [PATCH v2 net-next 10/10] net: hns3: Add mqprio support when interacting with network stack Yunsheng Lin <linyunsheng@huawei.com> - 2017-09-26 12:50 +0200
RE: [PATCH v2 net-next 10/10] net: hns3: Add mqprio support when interacting with network stack Yuval Mintz <yuvalm@mellanox.com> - 2017-09-26 14:40 +0200
Re: [PATCH v2 net-next 10/10] net: hns3: Add mqprio support when interacting with network stack Yunsheng Lin <linyunsheng@huawei.com> - 2017-09-27 03:00 +0200
csiph-web