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 CA60E43BF1; Mon, 26 Feb 2024 19:20:40 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A0152402B2; Mon, 26 Feb 2024 19:20:40 +0100 (CET) Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) by mails.dpdk.org (Postfix) with ESMTP id 9100540144 for ; Mon, 26 Feb 2024 19:20:38 +0100 (CET) Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-6e435542d41so2105198b3a.1 for ; Mon, 26 Feb 2024 10:20:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1708971637; x=1709576437; 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=taVSNxyV+2FDicIlwK7lnGn7zvYS6pVav/IOSMHn4oU=; b=yAcjgvxvv0Ame4nzgygY+E0Tbfbdx8I7BgyT7UTvdD0cqKC/ZD7wRuGkqrkvfoh6Wq D6qeJ4N8uhmFAg6F0g8qZnbKVR9vzsQmLA2j/ntcVnSaBZ1G+aFEum9pZlAJQKTMGlDx ptfP9BedWVs4f9Mn82onWIDPscdIkWrLN/jVGnuh2G+jyNBpaqZuty2ejBOnjljtVaug kZgZBcnJDlkuIqnUTZL2KR+pkIKjLUN/x0k5TsXsg2vAW7YHrpBfot2/Tpsp3Xapu+VM zHJlcJ0pWiUBwvMt5LhO9K7QgpklQKcoxINu50ytdoKi3lA6DnVABxAG6Mn3hjPat5vO +S3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708971637; x=1709576437; 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=taVSNxyV+2FDicIlwK7lnGn7zvYS6pVav/IOSMHn4oU=; b=lsddOQe+eWHbOw4UWuGI4myjRJqJBdRHReimpFPjhy70/Q9s2XDxBkH9RdmJ3fX2nC W/GKYFBUMA1XzoR41nglB4pVUD5OEDnYHcdvpg5QkBk25tTbdrLZBStxXSHs5eivsjO+ 9pMMCsKblcGqwQAn/H1r3Az3evjHHRmIPurKmclopwNvQbP5HtSDtZMcRNqGOW/OjVDi 4FL25StX38047aq/KPeOwEMS0ggHxGuAnr+oNJ47Wv8l9fPbnLQQmJ6Rb3Ybk7TTAJsR CVhOsJw4sUewwSbXCvOwSPN1eU/VnDu3BZNj6m2yWKyf4FErJ31E7jrkXZ6khirr+SjY kwWg== X-Forwarded-Encrypted: i=1; AJvYcCUkEI0tWFprchdR3i7k1zGG8tTft+Dg7ofNMKkbCr+5n5UXCUVbd3O/FqY+Gc1GGDFK5Q7c6yuWKFh6LTk= X-Gm-Message-State: AOJu0YxfRJel4cUjD9alQM3ydAI1qzpsRmpGDXW8M/HpjeP7wKVHjAvi WR+0uyelc45W5R/ChUzzQOjckbzaqy4IG13yEFlZuvYPwOU/cYBNApBhrueXPyU= X-Google-Smtp-Source: AGHT+IFnwbYQXvi0aIX5uzvDSqZS1GmEDVvCIkqLwFyepUbnoUQIY/YhkNJBmbzqc+Ju86yk2ESKVA== X-Received: by 2002:a05:6a00:1ac7:b0:6e4:d198:6d66 with SMTP id f7-20020a056a001ac700b006e4d1986d66mr9554211pfv.7.1708971637575; Mon, 26 Feb 2024 10:20:37 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id ey20-20020a056a0038d400b006e10bfd6a94sm4343102pfb.128.2024.02.26.10.20.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 10:20:37 -0800 (PST) Date: Mon, 26 Feb 2024 10:20:34 -0800 From: Stephen Hemminger To: Thomas Monjalon Cc: Tyler Retzlaff , dev@dpdk.org, Ajit Khaparde , Andrew Boyer , Andrew Rybchenko , Bruce Richardson , Chenbo Xia , Chengwen Feng , Dariusz Sosnowski , David Christensen , Hyong Youb Kim , Jerin Jacob , Jie Hai , Jingjing Wu , John Daley , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Maciej Czekaj , Matan Azrad , Maxime Coquelin , Nithin Dabilpuram , Ori Kam , Ruifeng Wang , Satha Rao , Somnath Kotur , Suanming Mou , Sunil Kumar Kori , Viacheslav Ovsiienko , Yisen Zhuang , Yuying Zhang , mb@smartsharesystems.com Subject: Re: [PATCH v5 05/22] mbuf: stop using mbuf cacheline marker fields Message-ID: <20240226102034.640cd625@hermes.local> In-Reply-To: <4970687.0VBMTVartN@thomas> References: <1706657173-26166-1-git-send-email-roretzla@linux.microsoft.com> <1708762927-14126-1-git-send-email-roretzla@linux.microsoft.com> <1708762927-14126-6-git-send-email-roretzla@linux.microsoft.com> <4970687.0VBMTVartN@thomas> 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 Sat, 24 Feb 2024 11:58:59 +0100 Thomas Monjalon wrote: > 24/02/2024 09:21, Tyler Retzlaff: > > Update prefetch inline functions to access rte_mbuf struct fields > > directly instead of via cacheline{0,1} marker extension fields. > > > > Signed-off-by: Tyler Retzlaff > [...] > > rte_mbuf_prefetch_part1(struct rte_mbuf *m) > > { > > - rte_prefetch0(&m->cacheline0); > > + rte_prefetch0(&m->buf_addr); > > Should be simply "m", no need to point to the first field explicitly. > > [...] > > rte_mbuf_prefetch_part2(struct rte_mbuf *m) > > { > > #if RTE_CACHE_LINE_SIZE == 64 > > - rte_prefetch0(&m->cacheline1); > > +#if RTE_IOVA_IN_MBUF > > + rte_prefetch0(&m->next); > > +#else > > + rte_prefetch0(&m->dynfield2); > > +#endif > > I think it is better to calculate m + min cache line size > instead of relying on fields. > > Agree with Thomas, the markers and field dependency are bad idea.