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 F231245FD9; Fri, 3 Jan 2025 20:18:04 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E7E62402DC; Fri, 3 Jan 2025 20:18:03 +0100 (CET) Received: from mail-qk1-f176.google.com (mail-qk1-f176.google.com [209.85.222.176]) by mails.dpdk.org (Postfix) with ESMTP id 72F01402B1 for ; Fri, 3 Jan 2025 20:18:02 +0100 (CET) Received: by mail-qk1-f176.google.com with SMTP id af79cd13be357-7b6f1b54dc3so1853366085a.1 for ; Fri, 03 Jan 2025 11:18:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1735931882; x=1736536682; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=ON3yFc9ZU4/QF/a4dAMoIJNJZbIUV4o6YheJagvAuDw=; b=CnZJ/wX3eu6uAUunXknpYrjbpGNUa02qQDZuKpA+0LPOQB5iswet4FODbNms9AXO0j JeHEhFFXgjOtRNH/w6pOAy1fZTJXo2pEJzBKUJIoWxAxwT9bRhbV+NYtv3ete+mZoujT X0mRmF8IOLCAH0uxa6IedD4lpD52UelQ1zMWBi5x5suW0mAb4XIhpND62AA4dpWhRNWe HUIGhNZ8D4zAT1c1bTimx/aZ7+6tLiygyfBL9RTxHKxodq6LXasJRTpdzXDZ99fx0ZjF RjVC0WrIzDQWTEQrgZp/IIHH5694BpL++w0TyS03Xrtjg8Wiz1TR/y5V7S8xT7CSVUQE dW8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735931882; x=1736536682; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ON3yFc9ZU4/QF/a4dAMoIJNJZbIUV4o6YheJagvAuDw=; b=SQpXrdtjFKP8l1LCTvQBFuqVTpH15/8JLHEyjtGRuCJe9nnPGV20lyw7YqKA4kem89 5fTnb0sKbwl7h2Vpl3MHqRu0gZN3WMfvuy8w0h6cCj3xFVWVJVPUuCoLn3oUcMeRIe6T q5FOZmve/XSeV7IeWNYOnANRE4Q4zGgvHWVUTZaFVTHCowKc+dmSfv9yAZBj4BlzSrlu ffdX2/qivtV7vSdv9ppk2mzbIAKq+wRhhehqSdd8SJZ1RrwlixVb+GHKnrBdT78B1+uH ZzMjuP62gE97Y3BGVZ+51SjDJuPglXlsOO4Ki5qIxtz+OPB2c6g9vBrAhhh8MEh/Ds7P EPog== X-Gm-Message-State: AOJu0Yxax4ODQAL/gf+Ygn0KI/nx0a9AJIGa+a+z74yWLAgW/hTa1lx7 PLfRtCcG1unsd8xMWajhnx8ps+eXV7JBEzSn7NRDgBlj0z++Q03+jbCmIY694OE= X-Gm-Gg: ASbGncv20MiubenduFXx6NH7zIMBOHbI/xb8P1hMKlgJET71H0IK6f1uQFY/9oKpMuX ZuKqkeg66Yfgcnh9dm0psR0qcqjSsTx2QcoAUCHodNf3tIUsW5xrPtY0E4KkHNCQ5sfW6z/nUvA /biBHfPtMj4Z255I9fSAaDBz6oPOdHGhwCiLj16KQT0Mxg8fn36JwknHK8uvesamdDpD+55zHHC 9gShQCXvfvj+AoR8+B5cBfdotYzjIJBd4cxcxTXlC7y1FQBgJnFzWYQRylXUlCvrkaoUzHQCdae MRTp9W/d X-Google-Smtp-Source: AGHT+IFUhMoEYLNU5r02qiacl8YqUNU7Xow0gghhdcyZMNdSh8zg9ingrOr3zCyn2HNQ5P1GYk302g== X-Received: by 2002:a05:620a:4007:b0:7b6:f0e0:3f79 with SMTP id af79cd13be357-7b9ba8338a7mr8843254785a.57.1735931881875; Fri, 03 Jan 2025 11:18:01 -0800 (PST) Received: from pi5 (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7b9ac2bc85fsm1289209085a.7.2025.01.03.11.18.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Jan 2025 11:18:01 -0800 (PST) Date: Fri, 3 Jan 2025 11:17:58 -0800 From: Stephen Hemminger To: "WanRenyong" Cc: , , , , , , , , , Subject: Re: [PATCH v4 09/15] net/xsc: add ethdev start Message-ID: <20250103111758.609298f1@pi5> In-Reply-To: <20250103150422.1529663-10-wanry@yunsilicon.com> References: <20250103150404.1529663-1-wanry@yunsilicon.com> <20250103150422.1529663-10-wanry@yunsilicon.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; aarch64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 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.