From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C4FF6A0C4C; Tue, 28 Sep 2021 03:35:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 42D7F40E3C; Tue, 28 Sep 2021 03:35:01 +0200 (CEST) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id 4C5B940DF6 for ; Tue, 28 Sep 2021 03:34:59 +0200 (CEST) Received: from dggeme756-chm.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4HJMQS5H8VzbmsS; Tue, 28 Sep 2021 09:30:40 +0800 (CST) Received: from [10.67.103.128] (10.67.103.128) by dggeme756-chm.china.huawei.com (10.3.19.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.8; Tue, 28 Sep 2021 09:34:56 +0800 From: "Min Hu (Connor)" To: CC: , References: <1617876888-63458-1-git-send-email-humin29@huawei.com> <1620272768-42421-1-git-send-email-humin29@huawei.com> <1620272768-42421-2-git-send-email-humin29@huawei.com> Message-ID: Date: Tue, 28 Sep 2021 09:34:56 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <1620272768-42421-2-git-send-email-humin29@huawei.com> Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.103.128] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggeme756-chm.china.huawei.com (10.3.19.102) X-CFilter-Loop: Reflected Subject: Re: [dpdk-dev] [PATCH v2 1/2] examples/ethtool: fix Rx/Tx queue setup with rte socket id X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi, Thomas, any comments? ÔÚ 2021/5/6 11:46, Min Hu (Connor) дµÀ: > From: Chengwen Feng > > In DPDK, 'rte_socket_id' means the running socket while > 'rte_eth_dev_socket_id' is the device socket. For better performance, > memory which queue setup used and device should be in the same socket. > > This patch make sure it calls rte_eth_dev_socket_id API to get device > socket_id when setting ringparam. > > Fixes: bda68ab9d1e7 ("examples/ethtool: add user-space ethtool sample application") > Cc: stable@dpdk.org > > Signed-off-by: Chengwen Feng > Signed-off-by: Min Hu (Connor) > --- > examples/ethtool/lib/rte_ethtool.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/examples/ethtool/lib/rte_ethtool.c b/examples/ethtool/lib/rte_ethtool.c > index 4132516..b2e45f5 100644 > --- a/examples/ethtool/lib/rte_ethtool.c > +++ b/examples/ethtool/lib/rte_ethtool.c > @@ -465,12 +465,12 @@ rte_ethtool_set_ringparam(uint16_t port_id, > return stat; > > stat = rte_eth_tx_queue_setup(port_id, 0, ring_param->tx_pending, > - rte_socket_id(), NULL); > + rte_eth_dev_socket_id(port_id), NULL); > if (stat != 0) > return stat; > > stat = rte_eth_rx_queue_setup(port_id, 0, ring_param->rx_pending, > - rte_socket_id(), NULL, rx_qinfo.mp); > + rte_eth_dev_socket_id(port_id), NULL, rx_qinfo.mp); > if (stat != 0) > return stat; > >