-
Notifications
You must be signed in to change notification settings - Fork 23
infra: add TX queue sharing support #474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
rjarry
wants to merge
7
commits into
DPDK:main
Choose a base branch
from
rjarry:txq-share
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
a7dfd26
dpdk: add patch to fix iavf max queues
rjarry a1af6bb
infra: only assign TX queues to workers with RX queues
rjarry 87a1b13
infra: introduce tx_node_ctx for TX node context
rjarry a66b344
infra: factor out find_port helper in graph.c
rjarry 53c4e12
infra: add TX queue sharing support
rjarry 282e3c8
port: return explicit error when requesting too many rxqs
rjarry 4ffc11d
port: force equal queue counts for net_tap and net_virtio
rjarry File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -91,19 +91,32 @@ int port_configure(struct iface_info_port *p, uint16_t n_txq_min) { | |
| if (numa_available() != -1) | ||
| socket_id = rte_eth_dev_socket_id(p->port_id); | ||
|
|
||
| // FIXME: deal with drivers that do not support more than 1 (or N) tx queues | ||
| p->n_txq = n_txq_min; | ||
| if ((ret = rte_eth_dev_info_get(p->port_id, &info)) < 0) | ||
| return errno_log(-ret, "rte_eth_dev_info_get"); | ||
|
|
||
| if (p->n_rxq == 0) | ||
| p->n_rxq = 1; | ||
|
|
||
| if ((ret = rte_eth_dev_info_get(p->port_id, &info)) < 0) | ||
| return errno_log(-ret, "rte_eth_dev_info_get"); | ||
| if (p->n_rxq > info.max_rx_queues) | ||
| return errno_set(EOVERFLOW); | ||
|
|
||
| // cap number of queues to device maximum | ||
| p->n_txq = RTE_MIN(n_txq_min, info.max_tx_queues); | ||
|
|
||
| if (strcmp(info.driver_name, "net_tap") == 0) { | ||
| p->n_txq = RTE_MAX(p->n_txq, p->n_rxq); | ||
| p->n_rxq = p->n_txq; | ||
| if (strcmp(info.driver_name, "net_tap") == 0 | ||
| || strcmp(info.driver_name, "net_virtio") == 0) { | ||
| // force number of TX queues equal to requested RX queues | ||
| p->n_txq = p->n_rxq; | ||
| if (p->n_txq > info.max_tx_queues) | ||
| return errno_set(EOVERFLOW); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not a tx queue with N virtio ring ? |
||
| } | ||
|
|
||
| if (p->n_txq < n_txq_min) | ||
| LOG(NOTICE, "port %s TX queues limited to %u", p->devargs, p->n_txq); | ||
|
|
||
| for (uint16_t q = 0; q < p->n_txq; q++) | ||
| rte_spinlock_init(&p->txq_locks[q]); | ||
|
|
||
| rxq_size = get_rxq_size(p, &info); | ||
| txq_size = get_txq_size(p, &info); | ||
|
|
||
|
|
||
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with virtio ?