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 E0D86A0C4C; Sat, 23 Oct 2021 18:13:32 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 94AA040041; Sat, 23 Oct 2021 18:13:31 +0200 (CEST) Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) by mails.dpdk.org (Postfix) with ESMTP id 4DEAE4003C for ; Sat, 23 Oct 2021 18:13:30 +0200 (CEST) Received: by mail-pg1-f178.google.com with SMTP id q5so6293780pgr.7 for ; Sat, 23 Oct 2021 09:13:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=X47Z0OadHzVqmLUenTRmMGJg71eC/W2+xX37amgRNDA=; b=VS+QmLzfUkp4w4XR4XmkFoLEiabHhfRiYbUsKwuZ6fdxCWCZQlxCxsSzae8FSFvdvh z+EfOELDbdcoQu9tvlpvkBtFT/bnrRbFGM9ci9gvuIpw+RQSA1P7zqHq0F/WoGw4TjYF bPq2sx+DQAoCugqdM1wU7vtkda6kWgvFcNUa9F9FISWU93Mr6ZT8ZB0Sub+yFCSZNutM LGW8+kx8+cEmdKylEErPRUN5JadC2mQkMPji8VYVflmXHNwX8l2gVVCxXxjn/FVTdx7G ZUn57pWFu9GRg2XVQFmTXZOsERDGp7mbpFFvBI4smNsgJF41dGVz3KKrOomW/NmThfnm HTWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=X47Z0OadHzVqmLUenTRmMGJg71eC/W2+xX37amgRNDA=; b=1lul8VbQXa6zMa2p24LjdUEuqnl9Of8lOullzwz/NMQ5ZNnlojs36Iw1rZsvrN0hVh QNQ5zQ1Plja9/nmJQT9eZPenMCwnN1sWZnD5cAO+sBgK6Z7h82xpaROJP13qjs4EDJx/ iTB5LMf8JiUOdG/I4JyQ0HRCLpLHt0A7C7vV/15XDVOV9NUqbzlx1DmMmcHune+4O7ue THfZr6+LzSNCILb9Hyaopge7I1LEMgO1ix1LCrB1UVB46H/ImtxueFm2vOqr43+GvXIO 6vAsyryCcxNwFL9DqVNdhcH1U1+8cDfSr3OLDYfCr+wyL/tsetP+ye1+bHTiGN4i9rzL N54g== X-Gm-Message-State: AOAM533Mg/SZEzdR4o62cdsz5anxHRH21b47o/w0i2CCRrzkYvZXT5Y8 FmLaUD4pK+eM6U9dF50mRlaX8Q== X-Google-Smtp-Source: ABdhPJzH6vvjMORZGC/jrrHtaUTsCbpnHMIXMIsSQ2Qrelk7ukMyqC2ihTuO5BM/bDi6Edap6e7uAg== X-Received: by 2002:a62:2c82:0:b0:44d:71c3:8a3 with SMTP id s124-20020a622c82000000b0044d71c308a3mr6846446pfs.84.1635005609073; Sat, 23 Oct 2021 09:13:29 -0700 (PDT) Received: from hermes.local (204-195-33-123.wavecable.com. [204.195.33.123]) by smtp.gmail.com with ESMTPSA id u2sm13088521pfi.120.2021.10.23.09.13.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Oct 2021 09:13:28 -0700 (PDT) Date: Sat, 23 Oct 2021 09:13:25 -0700 From: Stephen Hemminger To: Bing Zhao Cc: , , , , Message-ID: <20211023091325.0120256c@hermes.local> In-Reply-To: <20211022211407.315068-2-bingz@nvidia.com> References: <20211022211407.315068-1-bingz@nvidia.com> <20211022211407.315068-2-bingz@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 2/2] ethdev: fix the race condition for fp ops reset 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" On Sat, 23 Oct 2021 00:14:07 +0300 Bing Zhao wrote: > diff --git a/lib/ethdev/ethdev_private.c b/lib/ethdev/ethdev_private.c > index fbc3df91ad..cda9a6e228 100644 > --- a/lib/ethdev/ethdev_private.c > +++ b/lib/ethdev/ethdev_private.c > @@ -206,7 +206,7 @@ eth_dev_fp_ops_reset(struct rte_eth_fp_ops *fpo) > .txq = {.data = dummy_data, .clbk = dummy_data,}, > }; > > - *fpo = dummy_ops; > + rte_memcpy(fpo, &dummy_ops, sizeof(struct rte_eth_fp_ops)); memcpy is not thread safe either.