mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
dpif-netdev: Allow different numbers of rx queues for different ports.
Currently, all of the PMD netdevs can only have the same number of rx queues, which is specified in other_config:n-dpdk-rxqs. Fix that by introducing of new option for PMD interfaces: 'n_rxq', which specifies the maximum number of rx queues to be created for this interface. Example: ovs-vsctl set Interface dpdk0 options:n_rxq=8 Old 'other_config:n-dpdk-rxqs' deleted. Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Acked-by: Ben Pfaff <blp@ovn.org> Acked-by: Flavio Leitner <fbl@sysclose.org> Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
This commit is contained in:
committed by
Daniele Di Proietto
parent
9d2d2b5cd2
commit
a14b8947fd
@@ -106,6 +106,12 @@ netdev_n_rxq(const struct netdev *netdev)
|
||||
return netdev->n_rxq;
|
||||
}
|
||||
|
||||
int
|
||||
netdev_requested_n_rxq(const struct netdev *netdev)
|
||||
{
|
||||
return netdev->requested_n_rxq;
|
||||
}
|
||||
|
||||
bool
|
||||
netdev_is_pmd(const struct netdev *netdev)
|
||||
{
|
||||
@@ -376,6 +382,7 @@ netdev_open(const char *name, const char *type, struct netdev **netdevp)
|
||||
/* By default enable one tx and rx queue per netdev. */
|
||||
netdev->n_txq = netdev->netdev_class->send ? 1 : 0;
|
||||
netdev->n_rxq = netdev->netdev_class->rxq_alloc ? 1 : 0;
|
||||
netdev->requested_n_rxq = netdev->n_rxq;
|
||||
|
||||
list_init(&netdev->saved_flags_list);
|
||||
|
||||
|
Reference in New Issue
Block a user