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 C281E425DF; Wed, 4 Oct 2023 15:00:50 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8BD11402CE; Wed, 4 Oct 2023 15:00:50 +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> In-Reply-To: From: Jerin Jacob Date: Wed, 4 Oct 2023 18:30:21 +0530 Message-ID: Subject: Re: [PATCH v2] app/dma-perf: fix physical address seg-fault To: "Varghese, Vipin" Cc: "Jiang, Cheng1" , "thomas@monjalon.net" , "dev@dpdk.org" , "anoobj@marvell.com" , Jerin Jacob , "Yigit, Ferruh" , "stable@dpdk.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Wed, Oct 4, 2023 at 3:46=E2=80=AFPM Varghese, Vipin 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.