Skip to content

ixgbevf XDP shared queues#5

Open
walking-machine wants to merge 9 commits into
ixgbevf-xdp-publicfrom
ixgbevf-shared-queues
Open

ixgbevf XDP shared queues#5
walking-machine wants to merge 9 commits into
ixgbevf-xdp-publicfrom
ixgbevf-shared-queues

Conversation

@walking-machine

Copy link
Copy Markdown
Owner

No description provided.

num_online_cpus() is not a good goal for number of VF queues. We only have
3 interrupts of which 1 is used for mbx, so effectively we have 2 channels
max, only 2 CPUs are used. More queue pairs are still useful for
AF_XDP/TCs. Good idea to default to 2 queue pairs by default.

Another option is to limit Rx queue number to num_online_cpus(), and hence
always have possible XDP without TCs.

Handling of queue number when dealing with TCs has to bee updated too:
* how does VF know, if the configuration is a result of DCB, and hence
  incompatible with XDP vs GDV TCs
* we should not limit number of Tx queues to 1 when there are TCs, Rx queue
  number also doesn't have to be equal to TC, as LKV allows 2 queues per
  TC, and this makes RSS sense

Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
Currently, XDP Tx bulk flush implicitely unlocks the used XDP Tx queue,
which is assumed to be locked inside of the prep() callback. This does not
permit the usage of any other locking mechanism, e.g. locking netdev queues
as igc does to circumvent resource limitations.

Given that locking is assumed to be done by the prep() callback, add an
unprep() callback, which is meant to unconditionally undo the effects of
prep(). Add a default unprep() which unlocks XDP TxQ in order to not
disturb the existing driver code.

Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
While having a platform-dependent priv size improves 32-bit performance, it
complicates usage of priv as a container.

Make priv a 64-bit int, so structures can be packed there more
conveniently.

Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
Currently, XDP queue sharing, and hence modulo operation in the bulk
initialization, are dependent on initialized libeth XDP SQ locks. But when
using Tx queues for XDP, we do not use libeth locking. So add a static
variant of a buff initializeation function, which will perform modulo
operation unconditionally.

Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
libeth_tx provides structures and helpers for Tx buffer management. Using
it in ixgbevf will allow seemless integration with libeth_xdp and to reduce
code volume.

Use libeth_tx in Tx buffer management code.

Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
VFs supported by ixgbevf driver can have pretty limited queue number, e.g.
only 4. User may wish to use all 4 netdev queues and XDP simultaneously.
Such feature is already provided by igc and igb drivers.

Based on igb and igc approach, add a shared (between XDP and skb Tx) queue
mode, which is used, if current configured number of channels is more than
half of number of available queue pairs.

Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant