Re: Ajusting XSKMAP max_entries value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 31 Jul 2019 at 01:43, Rafael Vargas <vargas@xxxxxxxxx> wrote:
>
> Hi,
>

Hi Rafael,

> I'm using AF_XDP sockets to bulk read from the network device and it
> seems to work fine.
>
> Now I'm fine tuning my code in order to compatible in a broader range
> of scenarios.
>
> How should I set the size of my XSKMAP? As I'm creating one AF_XDP
> socket for each RX queue, and using this as the map size, is this
> correct?
>

There's really no right or wrong here, since the XDP program decides
which slot of XSKMAP to redirect to. The "builtin" libbpf XDP program
uses an XSKMAP with as many entries as there are enabled queues
(ethtool -l) on the device.


> As I'm using programs compiled using clang-bpf, is there a way to
> change this value without having to recompile the program?
>

You mean changing the size of the map? You can't do that, but you can
create a *new* map and swap that in. But that would require that your
XDP program would be a bit more complex (handling the XSKMAP
swapping).

> What would be the recommended way to setting this value correctly for
> each interface?
>

Again, hard to say in general. For one socket per queue, scenario,
then # entries would be the same as # queues.


Björn

> Thanks!
>
> Rafael Vargas




[Index of Archives]     [Linux Networking Development]     [Fedora Linux Users]     [Linux SCTP]     [DCCP]     [Gimp]     [Yosemite Campsites]

  Powered by Linux