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 E001E45B60; Thu, 17 Oct 2024 18:44:09 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2F3AB402F1; Thu, 17 Oct 2024 18:44:09 +0200 (CEST) Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by mails.dpdk.org (Postfix) with ESMTP id C3EC040657 for ; Thu, 17 Oct 2024 18:44:07 +0200 (CEST) Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-20cdb889222so12559175ad.3 for ; Thu, 17 Oct 2024 09:44:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1729183447; x=1729788247; 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=gSGQCKCcytVgSrGXphl+AC7nXp8oFt+WSu9TL8LR9u4=; b=0HoO2SRpgimvwAnC6F5UwNz0zPlFo7MBbAFr7S3hVSOIuEtD5UftupK9XHBeyiol+M whU19aQj/YKyY4P78fQ//DT5BFLrPmR9hnZ1uaf9L6r6Ur2rOQCH7cfpAtAMGM0kEOtS Rw2SbkUICuJ5j2erpDGP2q5KJJ+t2UavAUnc+2xr5SRcp2IOnOk2jes/f2ykDB9PJdTW 0thtInFi7nKS5vL1arDgyRw6zOR5QXXPr56/sqZMbHJfqoGXplHasxY4Lvwdw99Jhu2s PVk4j4pUZ6f8puyjUk1Go1Z7OwG4Et0mpF17aMogNUXtaz/39PJTGl9bcLnfNLA9WWLz PAww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729183447; x=1729788247; 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=gSGQCKCcytVgSrGXphl+AC7nXp8oFt+WSu9TL8LR9u4=; b=r5G+0ZdqeUpau9wM3SlReAwVtPn6Ny7f6Qr6IXMM24iZBuwaIgPQcwpJpcOqE8tr0Q S4rZ84Q26I968KWS9B64SOyWggn0B765xCacF7ogPxJUOWSufhpLzAEeBnoBjx5Po6Wc kxp0sJRlGXjkdtlrv0ieENmTq1ZfE9VkmP7DfTQNNg3Q+AijCYoUlVFpphVITNfRBovP NAHggzyovK8Q/WCmNKNwYRd9Yasjl67WJCnR/BWjDPj1moeVgEC0orLZTYlFFEt6XAVJ WJW1xnBWBnDS2Wfzj7QTWjjy+HOeAjy8IgA2ypfiqU6TRfGxzx4raArqZyYKdrkBwmQW eCOg== X-Gm-Message-State: AOJu0YzTNJiXLFOuZcwPM2k6fwryw9xW2F2N2s/sV+meqbAArhAAoKw0 w3ucqjC+EUd09aLQXRyBBkZqIJdHKAJdFWIRT0w1VjxSG4G9W3WjzsluB6YcnAc= X-Google-Smtp-Source: AGHT+IEGY6F+EQ5dWv03Mb+lgln+GoK1TYGIkn+n8BinsqvEtPqN8PoXJs9VjAwJSE1k7vdm3hwALQ== X-Received: by 2002:a17:903:2301:b0:20c:7d4c:64db with SMTP id d9443c01a7336-20ca16be1f5mr342795735ad.49.1729183446789; Thu, 17 Oct 2024 09:44:06 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20d17fa5d55sm46684745ad.109.2024.10.17.09.44.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Oct 2024 09:44:06 -0700 (PDT) Date: Thu, 17 Oct 2024 09:34:24 -0700 From: Stephen Hemminger To: Howard Wang Cc: , Subject: Re: [PATCH v2 03/18] net/r8169: add hardware registers access routines Message-ID: <20241017093424.091b3474@hermes.local> In-Reply-To: <20241017063200.26101-4-howard_wang@realsil.com.cn> References: <20241017063200.26101-1-howard_wang@realsil.com.cn> <20241017063200.26101-4-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 Thu, 17 Oct 2024 14:31:45 +0800 Howard Wang wrote: > +u32 > +rtl_csi_read(struct rtl_hw *hw, u32 addr) > +{ > + u32 cmd; > + int i; > + u32 value = 0; > + > + cmd = CSIAR_Read | CSIAR_ByteEn << CSIAR_ByteEn_shift | > + (addr & CSIAR_Addr_Mask); > + > + RTL_W32(hw, CSIAR, cmd); > + > + for (i = 0; i < 10; i++) { > + udelay(100); With DPDK drivers, it is preferred to use rte_delay instead of usleep. Usleep ends up being a system call (nanosleep) and that can take much longer than you want. rte_delay_us() is a spin loop.