From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <dev-bounces@dpdk.org> Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D8D4D460D0; Tue, 21 Jan 2025 09:57:26 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 67C7742D26; Tue, 21 Jan 2025 09:57:26 +0100 (CET) Received: from mail-il1-f172.google.com (mail-il1-f172.google.com [209.85.166.172]) by mails.dpdk.org (Postfix) with ESMTP id 1E9B6427C6 for <dev@dpdk.org>; Tue, 21 Jan 2025 09:57:25 +0100 (CET) Received: by mail-il1-f172.google.com with SMTP id e9e14a558f8ab-3a9628d20f0so40085825ab.2 for <dev@dpdk.org>; Tue, 21 Jan 2025 00:57:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; t=1737449844; x=1738054644; darn=dpdk.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=LlRfbyc7SD5F8n7crifNVezb+r1A+1qolMl5vyguPeo=; b=YduT+wcPbHZEpCg/luX2/Z2WHkcXxVYi16UBk5wwB+8Q7+53INHesCX9ALWJ44lirE obSOGIfUuPj+O18aHN9bKKm4kXTnlb+p05lKkwvIHvKWeuYQUhAZAMt4VzK+wqkoxbEr RStWJP5kV//OrBn1GaAwDPf8m9kuFxRJ63Ij4YjJhxzr7bcDmWzhpYc74mnz3OswpcV+ ougDnBZYrYktDpkAUfuX8J3UpyKejzmCOBvYlBdu/WSJmexVMDBYqDu9wPNWkhTwNfFr HHdWFJZtajRW8/Xs2Z8nhT0yU9EqMU3j2l5TQZC0VlF0ofvqbCiwFk4kDUWbam/9fGUN Rg2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737449844; x=1738054644; h=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=LlRfbyc7SD5F8n7crifNVezb+r1A+1qolMl5vyguPeo=; b=oSqsLLccfX6CCgmw/G4PzDStUurFdCVzQ2AuwmdwSZgjmzMBPMslDDP8vb837Rd9DL FjmSg1FuF8VChDeel02YcQtVEnm5tuw83c1TCq9o0UiOH7QrQvJ91ntXt2h8z6Wn2R5T 0ubl+bMPi4ElnberRx3NSqOS1xSyZZhoiiFaAteWkzABCP4YNoh+LKqLpx6G5hICi7L9 VQizbGgB+ybFJUtW/AH6YcXBUP6uaVnAksgJzVamaYzZNtZi4Qrx5y6FY9fBB4hcRTv3 p1Qs8DBonAvbcr8XRJUjuAX0K/YZibtXgBe5MwaLo3Nz8jBffcReRgXEuOEbufd3lEoc oNcQ== X-Gm-Message-State: AOJu0YzK6YLjQ1dG3D4qkUL76JIgLVHD2BV2HLOyPERw6OK5Bi1MAwRI gmEXOQedZHCK1zE2hvTFK2Noch2HgaQT+8SyFaW/XLpBD7XSocEaFyA6bE/9zmLXgQGDbh7N3ri IqktV8Tf6Cdzy88lbgfDrbZuCfqm7AqfQU2W/UA== X-Gm-Gg: ASbGncv5/ryr16bVSkdCpeSlRz5RlMnpjg9O6+97uRDbzcFn+GQwDQZ/bVt1F0WrJNy ndpatnRCidhuaeK/Ud0/RCMhQqlUzIOjqQc5H6B7Li+j936r/tGAmhYT4riFExz+gYlXAwjlfF9 tvHRcP X-Google-Smtp-Source: AGHT+IEOhi3ELf+a6ScHNtbQScps3k5xhOsdO3EpOi0GPlVeUJkpam4PDVsCef6/EJQI2DXoI3H+Z+U0ZLIv/JnaUw0= X-Received: by 2002:a05:6e02:1c88:b0:3a7:1bfc:97c6 with SMTP id e9e14a558f8ab-3cf744953f7mr113768635ab.16.1737449844410; Tue, 21 Jan 2025 00:57:24 -0800 (PST) MIME-Version: 1.0 References: <20250116195640.68885-1-ariel.otilibili@6wind.com> <20250116225151.188214-1-ariel.otilibili@6wind.com> <20250116225151.188214-3-ariel.otilibili@6wind.com> <44ffb73b-427d-4ddf-a195-900e05241050@redhat.com> In-Reply-To: <44ffb73b-427d-4ddf-a195-900e05241050@redhat.com> From: Ariel Otilibili <ariel.otilibili@6wind.com> Date: Tue, 21 Jan 2025 09:57:13 +0100 X-Gm-Features: AbW1kvZzovVbfBTriadA5NBZ0k342y21HMYW0RVrKDclZznx0CvFzo-l-9egsiM Message-ID: <CAF1zDgY1Lg4+o-ou1W9GYxCw_mDx6L8McM8OVECMABWZJovzLg@mail.gmail.com> Subject: Re: [PATCH v2 2/2] net/af_xdp: Refactor af_xdp_tx_zc() To: Maryam Tahhan <mtahhan@redhat.com> Cc: dev@dpdk.org, stable@dpdk.org, Stephen Hemminger <stephen@networkplumber.org>, Thomas Monjalon <thomas@monjalon.net>, David Marchand <david.marchand@redhat.com>, Ciara Loftus <ciara.loftus@intel.com> Content-Type: multipart/alternative; boundary="000000000000cab00e062c33909a" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org --000000000000cab00e062c33909a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Maryam, On Mon, Jan 20, 2025 at 4:28=E2=80=AFPM Maryam Tahhan <mtahhan@redhat.com> = wrote: > > On 16/01/2025 17:51, Ariel Otilibili wrote: > This ends up duplicating the if condition `if (mbuf->pool =3D=3D > umem->mb_pool) {` twice in `af_xdp_tx_zc`. Which is messy to read tbh... > > I think it would be better to create an inline function for the > duplicate code that setting desc, addr and offset. These three things > could be pointers passed to the new inline function and that way their > values can be used in `af_xdp_tx_zc()` after they are set. I think that > would cleanup the `af_xdp_tx_zc()` function in a neater way. > Thanks for having looked into this patch. I'll improve the series on your feedback. --000000000000cab00e062c33909a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr">Hi Maryam,<br></div><br><div class=3D"gma= il_quote gmail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Mo= n, Jan 20, 2025 at 4:28=E2=80=AFPM Maryam Tahhan <<a href=3D"mailto:mtah= han@redhat.com">mtahhan@redhat.com</a>> wrote:<br></div><blockquote clas= s=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid r= gb(204,204,204);padding-left:1ex"><br> On 16/01/2025 17:51, Ariel Otilibili wrote: <br></blockquote><blockquote cl= ass=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid= rgb(204,204,204);padding-left:1ex"> This ends up duplicating the if condition `if (mbuf->pool =3D=3D <br> umem->mb_pool) {` twice in `af_xdp_tx_zc`. Which is messy to read tbh...= <br> <br> I think it would be better to create an inline function for the <br> duplicate code that setting desc, addr and offset. These three things <br> could be pointers passed to the new inline function and that way their <br> values can be used in `af_xdp_tx_zc()` after they are set. I think that <br= > would cleanup the `af_xdp_tx_zc()` function in a neater way.<br>=C2=A0</blo= ckquote><div>Thanks for having looked into this patch. I'll improve the= series on your feedback. <br></div></div></div> --000000000000cab00e062c33909a--