From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <stable-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id D27EE425DF
	for <public@inbox.dpdk.org>; Wed,  4 Oct 2023 15:00:51 +0200 (CEST)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id BE4DA4064A;
	Wed,  4 Oct 2023 15:00:51 +0200 (CEST)
Received: from mail-qt1-f182.google.com (mail-qt1-f182.google.com
 [209.85.160.182])
 by mails.dpdk.org (Postfix) with ESMTP id 17C1C402A9;
 Wed,  4 Oct 2023 15:00:49 +0200 (CEST)
Received: by mail-qt1-f182.google.com with SMTP id
 d75a77b69052e-4197fa36b6aso13887731cf.3; 
 Wed, 04 Oct 2023 06:00:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1696424448; x=1697029248; darn=dpdk.org;
 h=content-transfer-encoding:cc:to:subject:message-id:date:from
 :in-reply-to:references:mime-version:from:to:cc:subject:date
 :message-id:reply-to;
 bh=VvOWmhDXRNlfCch7F0ARlipXsrCNCpR6Da5XpoEJ9dM=;
 b=EPLZQW1zz8hQ/A/gKVOir4S0Z7Si4VTEjntj+4PzA2o5mGZJLXu5XdHtYE2hTMIiFb
 DJor5OVYGPvt7zYuWZU05eGIXCOEnJKiZG3oBnRmiQeB6ZmicGZPXIz9AcNrYCbAg0vC
 midrsPUu8aFxctHETnKIswTVNYVNLngtTqpxQUMlQs9VdNu7ri+2WoAAAfDu27LDYf1T
 l48Tjmso0+vFRMIKPy1tzwS3g1CS+6c2QgPljF8CwVJdi9tEfrD7PLTFTE4593vF0XCA
 GuBRJO6nCUjRi6sBJU/P7g5YoZF7wZbKn+n9OL7IBzeA0oWjNT0nQuBRjsWemRlCHbbs
 b4gg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1696424448; x=1697029248;
 h=content-transfer-encoding:cc:to:subject:message-id:date:from
 :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=VvOWmhDXRNlfCch7F0ARlipXsrCNCpR6Da5XpoEJ9dM=;
 b=OIj5dI4DLiUE92ioA2c5Z+g1wlwmoej0zwUvIs1x8k6ZX7R7cwrvFFWzXBijuyaW6j
 PQUR3m7h0i4j5pVc/DfN3CCLIQNiFtbHnApHZrXUPm2c3CoQ0CEXxxoMQlz4kg6ghelP
 URcEFWLLjcv7a5IspyE5rmr1GKIyf3oBFwlHb/GgO1iwLYoB4gJy2fpK83OdbKfOvjnu
 zlxvMuY2I+zGVWiNm2xOTWvUERYS38U0dFFOJ8Plo8O+E7k4oc+CDFas5f7OhK6SADW/
 K/CEnLBYU3AUAgm8knsmVmiy5v/7Eb/Zz6XSYtiEMPV8WmSxxLcSlzd80zawt2XxIED3
 X97A==
X-Gm-Message-State: AOJu0YyfXh4hFhZInVNFWWy+CYn11R12J99//A3Q8iPSuBDevNo+rznu
 auPY7IykZ3HAb4DWzxec5AYa5R+s3MSh2Piew/4=
X-Google-Smtp-Source: AGHT+IH3hOAIH23s0nvlqNZWhr+HB/P69L2+i1eUJXChsQO2VmPAnO3ZFWL/Fa1NpLzZa6pkfgqsUQf2+/deG2/lrBY=
X-Received: by 2002:a05:622a:3cd:b0:412:2dd3:e108 with SMTP id
 k13-20020a05622a03cd00b004122dd3e108mr2567769qtx.9.1696424448353; Wed, 04 Oct
 2023 06:00:48 -0700 (PDT)
MIME-Version: 1.0
References: <20230816071810.1796-1-vipin.varghese@amd.com>
 <20230816094216.1847-1-vipin.varghese@amd.com>
 <SN7PR11MB701965547C8FFE5EA17E1442DCF8A@SN7PR11MB7019.namprd11.prod.outlook.com>
 <MN2PR12MB3085D5B8B0DB13CC9AE58AA482CBA@MN2PR12MB3085.namprd12.prod.outlook.com>
In-Reply-To: <MN2PR12MB3085D5B8B0DB13CC9AE58AA482CBA@MN2PR12MB3085.namprd12.prod.outlook.com>
From: Jerin Jacob <jerinjacobk@gmail.com>
Date: Wed, 4 Oct 2023 18:30:21 +0530
Message-ID: <CALBAE1PYxQwqbn+ci+oELdJL1ZH13S=HyFt40xZa2_iw3H4dJQ@mail.gmail.com>
Subject: Re: [PATCH v2] app/dma-perf: fix physical address seg-fault
To: "Varghese, Vipin" <Vipin.Varghese@amd.com>
Cc: "Jiang, Cheng1" <cheng1.jiang@intel.com>,
 "thomas@monjalon.net" <thomas@monjalon.net>, 
 "dev@dpdk.org" <dev@dpdk.org>, "anoobj@marvell.com" <anoobj@marvell.com>,
 Jerin Jacob <jerinj@marvell.com>, 
 "Yigit, Ferruh" <Ferruh.Yigit@amd.com>, "stable@dpdk.org" <stable@dpdk.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-BeenThere: stable@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: patches for DPDK stable branches <stable.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/stable>,
 <mailto:stable-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/stable/>
List-Post: <mailto:stable@dpdk.org>
List-Help: <mailto:stable-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/stable>,
 <mailto:stable-request@dpdk.org?subject=subscribe>
Errors-To: stable-bounces@dpdk.org

On Wed, Oct 4, 2023 at 3:46=E2=80=AFPM Varghese, Vipin <Vipin.Varghese@amd.=
com> wrote:
>
> [AMD Official Use Only - General]
>
> Hi Jerrin,
>
> Apologies for the delay, I missed on the comment
>
> ```
> >                 for (i =3D 0; i < nr_buf; i++) {
> > +                       void *src =3D rte_pktmbuf_mtod(dsts[i], void *)=
;
> > +                       void *dst =3D rte_pktmbuf_mtod(srcs[i], void *)=
;
>
> Use _const_ in fast path if src and dst in not changing as better optimiz=
ation hint to compiler.
> ```
>
> Thanks for the suggestion, but may I ask this differently `rte_memcpy` is=
 defined with `always_inline` and all places where src used is with `const =
*`. Hence I have different view there as `setting const * for always_inline=
 definition has the same effect too`.

Yeah, most likely. However, Is the above behavior is documented in
gcc/clang? if not, the compiler is free to change as it deemed to fit
based on the register allocation and optimization flags etc.