ixgbevf XDP shared queues#5
Open
walking-machine wants to merge 9 commits into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.