[PATCH v2 2/2] net/af_xdp: Refactor af_xdp_tx_zc()

Ariel Otilibili ariel.otilibili at 6wind.com
Tue Jan 21 09:57:13 CET 2025


Hi Maryam,

On Mon, Jan 20, 2025 at 4:28 PM Maryam Tahhan <mtahhan at redhat.com> wrote:

>
> On 16/01/2025 17:51, Ariel Otilibili wrote:
>
This ends up duplicating the if condition `if (mbuf->pool ==
> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/dev/attachments/20250121/6c1a9375/attachment.htm>


More information about the dev mailing list