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 8D77345FF9; Mon, 6 Jan 2025 04:02:05 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 20B6C40264; Mon, 6 Jan 2025 04:02:05 +0100 (CET) Received: from lf-1-33.ptr.blmpb.com (lf-1-33.ptr.blmpb.com [103.149.242.33]) by mails.dpdk.org (Postfix) with ESMTP id 0EACD4014F for ; Mon, 6 Jan 2025 04:02:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=feishu2403070942; d=yunsilicon.com; t=1736132509; h=from:subject: mime-version:from:date:message-id:subject:to:cc:reply-to:content-type: mime-version:in-reply-to:message-id; bh=Iu+QZrBO3fOZo5xzeqosQBk3wPBJhpi+rrm5Io85g/U=; b=M7J7xNCupmsZm055+HzMkPo6uydf/V4FLOKZvrzPO/tfaXmRgnl/HFOByEkTXTuL7Rk/9E d1T8ce8o8FCu3Axbwl5V2ezS7/eFdUMjBjYBSt+DLcMJ84MFywd/Xaua7A/NSuj4jPfDJB LIqg8u9Gz5G6GwSJ5GNcSqJvsiwyJ9TgyWqeh3rNV8lFOeVGFaUn3UlzYo2ylUaF6XbACa 0vg5oyy3LAY4npK5AK+A/T/ai6Eq+Pv8vA1BHkkXb1y5Kf9cSdJaMt9zBoi9L9grLqP6+J lLjGT/QJpeXhryH0/EGQwFyWlzZ+uood16e+FElpK+GZfF3yhx1s7EzlOFiwow== Received: from [127.0.0.1] ([116.231.104.97]) by smtp.feishu.cn with ESMTPS; Mon, 06 Jan 2025 11:01:46 +0800 Mime-Version: 1.0 X-Original-From: WanRenyong Subject: Re: [PATCH v4 09/15] net/xsc: add ethdev start X-Lms-Return-Path: Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=UTF-8 User-Agent: Mozilla Thunderbird Cc: , , , , , , , , From: "WanRenyong" In-Reply-To: <20250103111758.609298f1@pi5> Date: Mon, 6 Jan 2025 11:01:48 +0800 Message-Id: <49d1dc92-ce29-42d2-b6a1-9a91680d121f@yunsilicon.com> To: "Stephen Hemminger" References: <20250103150404.1529663-1-wanry@yunsilicon.com> <20250103150422.1529663-10-wanry@yunsilicon.com> <20250103111758.609298f1@pi5> 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 On 2025/1/4 3:17, Stephen Hemminger wrote: > On Fri, 03 Jan 2025 23:04:23 +0800 > "WanRenyong" wrote: > >> +static int >> +xsc_ethdev_start(struct rte_eth_dev *dev) >> +{ >> + int ret; >> + struct xsc_ethdev_priv *priv = TO_XSC_ETHDEV_PRIV(dev); >> + >> + ret = xsc_txq_start(priv); >> + if (ret) { >> + PMD_DRV_LOG(ERR, "Port %u txq start failed: %s", >> + dev->data->port_id, strerror(rte_errno)); >> + goto error; >> + } >> + >> + ret = xsc_rxq_start(priv); >> + if (ret) { >> + PMD_DRV_LOG(ERR, "Port %u Rx queue start failed: %s", >> + dev->data->port_id, strerror(rte_errno)); >> + goto error; >> + } >> + >> + dev->data->dev_started = 1; >> + >> + rte_wmb(); > In general, it is preferred that DPDK drivers use rte_atomic to get > finer grain control over shared variables. Rather than using volatile > and barriers. This is not an absolute requirement, but something > that is preferred and improves performance on weakly ordered platforms. Understood, maybe rte_wmb is not neccessary here, will remove it in the next version. -- Thanks, WanRenyong