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 9159B460D1 for ; Tue, 21 Jan 2025 09:57:27 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 82C9542D76; Tue, 21 Jan 2025 09:57:27 +0100 (CET) Received: from mail-il1-f180.google.com (mail-il1-f180.google.com [209.85.166.180]) by mails.dpdk.org (Postfix) with ESMTP id 204AC42D26 for ; Tue, 21 Jan 2025 09:57:25 +0100 (CET) Received: by mail-il1-f180.google.com with SMTP id e9e14a558f8ab-3a81324bbdcso40280415ab.1 for ; 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=TQcko6HXfBt//XULe0ttKEm/mLUI11nh+83GDkAet+/DoQOweCtP/+chpmIVZDNM6k ertQGdmcltnNBO6qetPouEbpqy2d6WToMOzPOswdbPyAXKDwwHLF8UiNIULyN2CDTpNT nP4od0/V1b4c2TVhgNoLOr3f6Os7FnCd54jQBWqTuWiAAD9u7gsy+KBgfguPogd6sOTb 8CkNiLqruANL8wymRyAHZRfXeGoz8orn6ppewY26BqtLMImviihUch+KSmV8wXccB/Zo gp2shLLR4HwVL0oF5qChvzK16m3IeHRvtGsX9AoBDNboNlyycuJmI0LHtZqu5H6eQFGv uy1A== X-Forwarded-Encrypted: i=1; AJvYcCU60PLxN5hd4K9PXVoAWUmuGJXOWixxZBxtAOIQgdh963afigcz7CYGA/xuicE4lnCoLoaoh3s=@dpdk.org X-Gm-Message-State: AOJu0YysSmCFj+13RhRc+E2b1GIsIiIL/yJ9wIc2nOcKBtbhjG/ZMKMd TKr+XcIS208GtD+l/vXdb0b9c7dL5gCkfCcTQSgGHXJtWAkz/bQAJfQ58CiV1jZp1B05i7eTDtM pWlae088AZVo7D7t5VhwYtsQ0j22gsXriQpa9AQ== X-Gm-Gg: ASbGncscbrjvckpkIsE8og5ThEN6WjTAnUdIZshSCF8PQT20AqnnQPrfCMtOb4cSFpX 7FT3IGr8H8oKom2Dd9GEIuKKYihgunwABV79jk63gBeMfj0KeOvHxZoRXK+l2/T6BEQpaZ3iGke tJDljE 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 Date: Tue, 21 Jan 2025 09:57:13 +0100 X-Gm-Features: AbW1kvZzovVbfBTriadA5NBZ0k342y21HMYW0RVrKDclZznx0CvFzo-l-9egsiM Message-ID: Subject: Re: [PATCH v2 2/2] net/af_xdp: Refactor af_xdp_tx_zc() To: Maryam Tahhan Cc: dev@dpdk.org, stable@dpdk.org, Stephen Hemminger , Thomas Monjalon , David Marchand , Ciara Loftus Content-Type: multipart/alternative; boundary="000000000000cab00e062c33909a" X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-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 = 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
Hi Maryam,

On Mo= n, 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.
=C2=A0
Thanks for having looked into this patch. I'll improve the= series on your feedback.
--000000000000cab00e062c33909a--