From: Tariq Toukan <ttoukan.linux@gmail.com>
To: Maxim Mikityanskiy <maxtram95@gmail.com>,
Jakub Kicinski <kuba@kernel.org>,
Eelco Chaudron <echaudro@redhat.com>,
Tariq Toukan <tariqt@nvidia.com>
Cc: "Toke Høiland-Jørgensen" <toke@redhat.com>,
"Andy Gospodarek" <andrew.gospodarek@broadcom.com>,
ast@kernel.org, daniel@iogearbox.net, davem@davemloft.net,
hawk@kernel.org, john.fastabend@gmail.com, andrii@kernel.org,
kafai@fb.com, songliubraving@fb.com, yhs@fb.com,
kpsingh@kernel.org, lorenzo.bianconi@redhat.com,
netdev@vger.kernel.org, bpf@vger.kernel.org,
"Jesper Dangaard Brouer" <brouer@redhat.com>,
"Ilias Apalodimas" <ilias.apalodimas@linaro.org>,
"Andy Gospodarek" <gospo@broadcom.com>,
"Lorenzo Bianconi" <lorenzo@kernel.org>,
gal@nvidia.com, "Saeed Mahameed" <saeedm@nvidia.com>
Subject: Re: [PATCH net-next v2] samples/bpf: fixup some tools to be able to support xdp multibuffer
Date: Wed, 25 Jan 2023 14:49:56 +0200 [thread overview]
Message-ID: <6ab07d63-10c7-c591-152b-473ebf37b5ff@gmail.com> (raw)
In-Reply-To: <4866ab1d-4d3c-577c-c94f-a51d82ca56a7@gmail.com>
On 13/01/2023 23:07, Tariq Toukan wrote:
>
>
> On 10/01/2023 22:59, Maxim Mikityanskiy wrote:
>> On Tue, Jan 03, 2023 at 05:21:53PM -0800, Jakub Kicinski wrote:
>>> On Tue, 03 Jan 2023 16:19:49 +0100 Toke Høiland-Jørgensen wrote:
>>>> Hmm, good question! I don't think we've ever explicitly documented any
>>>> assumptions one way or the other. My own mental model has certainly
>>>> always assumed the first frag would continue to be the same size as in
>>>> non-multi-buf packets.
>>>
>>> Interesting! :) My mental model was closer to GRO by frags
>>> so the linear part would have no data, just headers.
>>>
>>> A random datapoint is that bpf_xdp_adjust_head() seems
>>> to enforce that there is at least ETH_HLEN.
>>
>> Also bpf_xdp_frags_increase_tail has the following check:
>>
>> if (!rxq->frag_size || rxq->frag_size > xdp->frame_sz)
>> return -EOPNOTSUPP;
>>
>> However, I can't seem to find where the `frag_size > frame_sz` part is
>> actually used. Maybe this condition can be dropped? Can someone shed
>> some light?
>>
>> BTW, Tariq, we seem to have missed setting frag_size to a non-zero
>> value.
>
> Hey Maxim,
> Indeed. We use xdp_rxq_info_reg, it passes 0 as frag_size.
>
>> Could you check that increasing the tail indeed doesn't work on
>> fragmented packets on mlx5e? I can send a oneliner to fix that.
>
> I can test early next week, and update.
Hi Maxim,
Hacking the existing adjust_tail sample program, in between other high
prio tasks, to make it work with frags took me some time.
But I can approve the fix below (or equivalent) is needed. Please go on
and submit it.
Regards,
Tariq
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -600,7 +600,7 @@ static int mlx5e_init_rxq_rq(struct mlx5e_channel
*c, struct mlx5e_params *param
if (err)
return err;
- return xdp_rxq_info_reg(&rq->xdp_rxq, rq->netdev, rq->ix,
c->napi.napi_id);
+ return __xdp_rxq_info_reg(&rq->xdp_rxq, rq->netdev, rq->ix,
c->napi.napi_id, PAGE_SIZE);
}
static int mlx5_rq_shampo_alloc(struct mlx5_core_dev *mdev,
next prev parent reply other threads:[~2023-01-25 12:50 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-21 17:54 [PATCH net-next v2] samples/bpf: fixup some tools to be able to support xdp multibuffer Andy Gospodarek
2022-06-22 2:00 ` patchwork-bot+netdevbpf
2023-01-03 12:55 ` Tariq Toukan
2023-01-03 15:19 ` Toke Høiland-Jørgensen
2023-01-04 1:21 ` Jakub Kicinski
2023-01-04 8:44 ` Lorenzo Bianconi
2023-01-04 12:28 ` Toke Høiland-Jørgensen
2023-01-05 1:17 ` Jakub Kicinski
2023-01-05 7:20 ` Tariq Toukan
2023-01-05 15:43 ` Toke Høiland-Jørgensen
2023-01-05 16:57 ` Andy Gospodarek
2023-01-05 18:16 ` Jakub Kicinski
2023-01-06 13:56 ` Andy Gospodarek
2023-01-08 12:33 ` Tariq Toukan
[not found] ` <8369e348-a8ec-cb10-f91f-4277e5041a27@nvidia.com>
2023-01-08 12:42 ` Tariq Toukan
2023-01-09 13:50 ` Toke Høiland-Jørgensen
2023-01-05 22:07 ` Toke Høiland-Jørgensen
2023-01-06 17:54 ` Toke Høiland-Jørgensen
2023-01-05 16:22 ` Andy Gospodarek
2023-01-10 20:59 ` Maxim Mikityanskiy
2023-01-13 21:07 ` Tariq Toukan
2023-01-25 12:49 ` Tariq Toukan [this message]
2023-01-05 16:18 ` Andy Gospodarek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6ab07d63-10c7-c591-152b-473ebf37b5ff@gmail.com \
--to=ttoukan.linux@gmail.com \
--cc=andrew.gospodarek@broadcom.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=brouer@redhat.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=echaudro@redhat.com \
--cc=gal@nvidia.com \
--cc=gospo@broadcom.com \
--cc=hawk@kernel.org \
--cc=ilias.apalodimas@linaro.org \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=kpsingh@kernel.org \
--cc=kuba@kernel.org \
--cc=lorenzo.bianconi@redhat.com \
--cc=lorenzo@kernel.org \
--cc=maxtram95@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=saeedm@nvidia.com \
--cc=songliubraving@fb.com \
--cc=tariqt@nvidia.com \
--cc=toke@redhat.com \
--cc=yhs@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).