lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 16 Feb 2024 07:16:26 +0000
From: Ferenc Fejes <ferenc.fejes@...csson.com>
To: "kurt@...utronix.de" <kurt@...utronix.de>, "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>
CC: "vinicius.gomes@...el.com" <vinicius.gomes@...el.com>, "hawk@...nel.org"
	<hawk@...nel.org>
Subject: Re: igc: AF_PACKET and SO_TXTIME question

I think I'm figured out what was the issue, thanks for the help!

Solution inline.

On Thu, 2024-02-15 at 09:38 +0100, Fejes Ferenc wrote:
> 
> > 
> > Second point to make sure is that the Tx queue your packet is being
> > transmitted to has Launch Time enabled.
> 
> Good point! We missed that. IIUC the TX queue selected by the skb-
> > queue_mapping after the igc_xmit_frame part. We set that parameter
> > by
> skbedit tc  action but that is not executed in the bypass case. For
> that reason, the skb->queue_mapping more or less random.
> 
> However, for a quick test, we set ETF offload for all 4 TX queues. So
> no matter which queue the packet enqueued it should respect the
> launchtime. But we dont really see this behavior... Nevertheless its
> a
> good catch, I missed this aspect completely at the time of my first
> email.

...

We simply placed the ETF qdisc as the root qdisc and assumed that this
would enable offload on all TX queues. Apparently this is not the case.
According to the code, it was only enabled for queue 0. Another mistake
we made is we used multiq qdisc with skbedit queue_mapping without
bypass - which works since the tx action is executed.
However, with qdisc baypass, the TX queue selection for the packets
sent to the AF_PACKET socket looks like this

tx_queue = cpu_id of task % num_tx_queues.

With taskset, we were able to explicitly send packets to TX queue 0 in
the bypass case, and that essentially solved the problem.

So we switched to mqprio and enabled offloading on all queues and with
that we always see the delayed packet transmission with launchtime
enabled.

> > 
> > 

...

> > Is that already possible with AF_XDP? There were some patches on
> > xdp-hints, but i don't think it has been merged yet.
> 
> Not yet. There was a patchset with the infra and stmmac as an user,
> right now I think its under some rework including igc as another
> user. 
> However in principle, the codepath might be similar to AF_PACKET, the
> only difference is the lunchtime metadata bundled with the xdp_buff
> and
> not with the skb.

As a results the AF_XDP hints must be work as expected when its done.

> 
> > 
> > Thanks,
> > Kurt
> 
> Best,
> Ferenc
> 

Thanks,
Ferenc

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ