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 14A3B45B42; Tue, 15 Oct 2024 17:29:07 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8AD44400D7; Tue, 15 Oct 2024 17:29:06 +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 326E3400D6 for ; Tue, 15 Oct 2024 17:29:05 +0200 (CEST) Received: by mail-pg1-f178.google.com with SMTP id 41be03b00d2f7-7db908c9c83so3285992a12.2 for ; Tue, 15 Oct 2024 08:29:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1729006144; x=1729610944; 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=CU2m5pNKN/r8f1V0fcEv3y73j3qNdwOuKVHrhogpSng=; b=qqicI5gh5jqIjWq312daf+mQjcNrY/vf2db5QozGxSfvBqm7mp2vGPqKTcL+jMtB/D Cf0RSc9UcRFq4ootyDuJq1QFQfX9W01MSc8bhXWrB7nyOU/fpctvAqYhIW0kgKly0zQ2 2CzNvVAPO21tY1JRCgFEdXEbVWA3W50s/EiocJdb8T4HZ4KsmfJCa7m6xwGVAruXxwtM HReo5Oenz1afWQH0MZlVbmvnCzvtMRc35gv0kFqqEWoaz2UPk48MQzhRL7rYBeNPu9t3 jRdVeKIH+qZfLMxEdfugGW/BIQi3tkVaM8aWoRTEfJi6vA7OkUW+HbrJ4Xu3mGzg2vTF SrDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729006144; x=1729610944; 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=CU2m5pNKN/r8f1V0fcEv3y73j3qNdwOuKVHrhogpSng=; b=DoulG1iXzl2QEbEM05aL6r0cyWc1Wuqh9orZwQKdgXpkioAfmzkrQWeNscZ17OacjB zlfKw5uAFjnqnKiEsVEhQa50vOSkyUSNj6gCa8jlKcQ7pe9jQlByj6eo+UITBVhqlCoW MwrsjI63kbvymvEqDdxREWgZ9qWoMHS5vBsdnElOAKuHvSxVnyQNy8DLB1QsszgUxyK4 ShwM3bUGRdPjdopXF9mSRcCxOg1RMty1qFHkzNsiex5JQhHPERZjIJ6ozXttytWsN3jR nSXLAOUownkeJQlvN7yDFO1RqdDFZ5VtSLuVrTGh7JqcGSizt59TkZBwIwO5ySIANYuR kmxw== X-Gm-Message-State: AOJu0Yw6ywFbtnNQmVAy15j+l6WBPmmrTaZ6kgEdeAqV9qk4uQ/U0ejA WmTiXwnNC4tLmgbdXigJmLabUSY/PbWereFzw4XC0B9+3t9KnesFY0P0Gsq0OhU= X-Google-Smtp-Source: AGHT+IEpjZ7dqNLfVrDaQgT3XDck6D4ktQ4YVJ7YnpbZSpPPY0jrBu7ClLPaP65Lg5duz/iQ8Des3Q== X-Received: by 2002:a05:6a20:438d:b0:1d6:2378:cffd with SMTP id adf61e73a8af0-1d8c93f5dbemr18713332637.0.1729006144102; Tue, 15 Oct 2024 08:29:04 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71e773b1672sm1396587b3a.83.2024.10.15.08.29.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Oct 2024 08:29:03 -0700 (PDT) Date: Tue, 15 Oct 2024 08:29:01 -0700 From: Stephen Hemminger To: Howard Wang Cc: , Subject: Re: [PATCH v1 12/18] net/r8169: implement Tx path Message-ID: <20241015082901.398f6e2b@hermes.local> In-Reply-To: <20241015030928.70642-13-howard_wang@realsil.com.cn> References: <20241015030928.70642-1-howard_wang@realsil.com.cn> <20241015030928.70642-13-howard_wang@realsil.com.cn> 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 Tue, 15 Oct 2024 11:09:22 +0800 Howard Wang wrote: > --- a/drivers/net/r8169/r8169_base.h > +++ b/drivers/net/r8169/r8169_base.h > @@ -589,6 +589,13 @@ enum RTL_chipset_name { > > #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL << (n)) - 1)) > > +#ifndef WRITE_ONCE > +#define WRITE_ONCE(var, val) (*((volatile typeof(val) *)(&(var))) = (val)) > +#endif > +#ifndef READ_ONCE > +#define READ_ONCE(var) (*((volatile typeof(var) *)(&(var)))) > +#endif > + I would prefer use of stdatomic for these.