net/virtio: reject deferred start Rx queue setup
PATCH 1/3 net/virtio: reject deferred start Rx queue setup
From: Dilshod Urazov <[email protected]>
Deferred start Rx queue is not supported by the driver.
--- drivers/net/virtio/virtio_rxtx.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/net/virtio/virtio_rxtx.c +5 -0
@@ -929,6 +929,11 @@ virtio_dev_rx_queue_setup(struct rte_eth_dev *dev,PMD_INIT_FUNC_TRACE (); +if (rx_conf->rx_deferred_start) { +PMD_INIT_LOG (ERR ,"Rx deferred start is not supported" ); +return -EINVAL ; + } +if (nb_desc ==0 || nb_desc > vq->vq_nentries) nb_desc = vq->vq_nentries; vq->vq_free_cnt =RTE_MIN (vq->vq_free_cnt, nb_desc);
Signature · 1 line
2.17.1
PATCH 2/3 net/virtio: reject deferred start Tx queue setup
From: Dilshod Urazov <[email protected]>
Deferred start Tx queue is not supported by the driver.
--- drivers/net/virtio/virtio_rxtx.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/net/virtio/virtio_rxtx.c +5 -0
@@ -1057,6 +1057,11 @@ virtio_dev_tx_queue_setup(struct rte_eth_dev *dev,PMD_INIT_FUNC_TRACE (); +if (tx_conf->tx_deferred_start) { +PMD_INIT_LOG (ERR ,"Tx deferred start is not supported" ); +return -EINVAL ; + } +if (nb_desc ==0 || nb_desc > vq->vq_nentries) nb_desc = vq->vq_nentries; vq->vq_free_cnt =RTE_MIN (vq->vq_free_cnt, nb_desc);
Signature · 1 line
2.17.1
Re: [dpdk-dev] [PATCH 2/3] net/virtio: reject deferred start Tx queue setup
Quoted 4 lines · Andrew Rybchenko
From: Dilshod Urazov <[email protected]>
Deferred start Tx queue is not supported by the driver.
Quoted 8 lines
Fixes 0748be2cf9a2 ("ethdev: queue start and stop")Signed-off-by Dilshod Urazov <[email protected]>Signed-off-by Andrew Rybchenko <[email protected]>--- drivers/net/virtio/virtio_rxtx.c | 5 +++++ 1 file changed, 5 insertions(+)
PATCH 3/3 net/virtio: reject unsupported Rx multi queue modes
In reply to Andrew RybchenkoFrom: Dilshod Urazov <[email protected]>
This driver supports none of DCB, RSS or VMDQ modes, therefore must check and return error if configured incorrectly.
--- drivers/net/virtio/virtio_ethdev.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/net/virtio/virtio_ethdev.c +7 -0
@@ -2071,6 +2071,13 @@ virtio_dev_configure(struct rte_eth_dev *dev)PMD_INIT_LOG (DEBUG ,"configure" ); req_features =VIRTIO_PMD_DEFAULT_GUEST_FEATURES ; +if (rxmode->mq_mode !=ETH_MQ_RX_NONE ) { +PMD_DRV_LOG (ERR , +"Unsupported Rx multi queue mode %d" , + rxmode->mq_mode); +return -EINVAL ; + } +if (dev->data->dev_conf.intr_conf.rxq) { ret =virtio_init_device (dev, hw->req_guest_features);if (ret <0 )
Signature · 1 line
2.17.1
Re: [dpdk-dev] [PATCH 3/3] net/virtio: reject unsupported Rx multi queue modes
Quoted 19 lines · Andrew Rybchenko
From: Dilshod Urazov <[email protected]>
This driver supports none of DCB, RSS or VMDQ modes, therefore must check and return error if configured incorrectly.
Fixes c1f86306a026 ("virtio: add new driver")Signed-off-by Dilshod Urazov <[email protected]>Signed-off-by Andrew Rybchenko <[email protected]>--- drivers/net/virtio/virtio_ethdev.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/net/virtio/virtio_ethdev.c +0
-0
drivers/net/virtio/virtio_ethdev.c virtio_dev_configure(struct rte_eth_dev *dev) · line 2079
Quoted 9 lines
drivers/net/virtio/virtio_ethdev.c +6
-0@@ -2071,6 +2071,13 @@ virtio_dev_configure(struct rte_eth_dev *dev)PMD_INIT_LOG (DEBUG ,"configure" ); req_features =VIRTIO_PMD_DEFAULT_GUEST_FEATURES ; +if (rxmode->mq_mode !=ETH_MQ_RX_NONE ) { +PMD_DRV_LOG (ERR , +"Unsupported Rx multi queue mode %d" , + rxmode->mq_mode); +return -EINVAL ; + }
We need similar checks for Tx as well.
Thanks,
Tiwei
Quoted 7 lines
drivers/net/virtio/virtio_ethdev.c +1
-0+if (dev->data->dev_conf.intr_conf.rxq) { ret =virtio_init_device (dev, hw->req_guest_features);if (ret <0 )Signature · 1 line
2.17.1
Re: [dpdk-dev] [PATCH 3/3] net/virtio: reject unsupported Rx multi queue modes
Quoted 23 lines · Tiwei Bie
Quoted 22 lines · Andrew Rybchenko
From: Dilshod Urazov <[email protected]>
This driver supports none of DCB, RSS or VMDQ modes, therefore must check and return error if configured incorrectly.
Fixes c1f86306a026 ("virtio: add new driver")Signed-off-by Dilshod Urazov <[email protected]>Signed-off-by Andrew Rybchenko <[email protected]>--- drivers/net/virtio/virtio_ethdev.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/net/virtio/virtio_ethdev.c +0
-0@@ -2071,6 +2071,13 @@ virtio_dev_configure(struct rte_eth_dev *dev)PMD_INIT_LOG (DEBUG ,"configure" ); req_features =VIRTIO_PMD_DEFAULT_GUEST_FEATURES ;
Quoted 7 lines
drivers/net/virtio/virtio_ethdev.c virtio_dev_configure(struct rte_eth_dev *dev) · line 2079
Quoted 6 lines
drivers/net/virtio/virtio_ethdev.c +6
-0+if (rxmode->mq_mode !=ETH_MQ_RX_NONE ) { +PMD_DRV_LOG (ERR , +"Unsupported Rx multi queue mode %d" , + rxmode->mq_mode); +return -EINVAL ; + }We need similar checks for Tx as well.
OK, I'll add.
However, I'm not 100% sure about RSS. Yes, I know that virtio has no RSS configuration support, but it looks possible to have multi queue in vhost-net case.
Re: [dpdk-dev] [PATCH 3/3] net/virtio: reject unsupported Rx multi queue modes
Quoted 31 lines · Andrew Rybchenko
Quoted 15 lines · Tiwei Bie
Quoted 14 lines · Andrew Rybchenko
From: Dilshod Urazov <[email protected]>
This driver supports none of DCB, RSS or VMDQ modes, therefore must check and return error if configured incorrectly.
Fixes c1f86306a026 ("virtio: add new driver")Signed-off-by Dilshod Urazov <[email protected]>Signed-off-by Andrew Rybchenko <[email protected]>--- drivers/net/virtio/virtio_ethdev.c | 7 +++++++ 1 file changed, 7 insertions(+)Quoted 14 lines
drivers/net/virtio/virtio_ethdev.c virtio_dev_configure(struct rte_eth_dev *dev) · line 2078
Quoted 13 lines
drivers/net/virtio/virtio_ethdev.c +6
-0@@ -2071,6 +2071,13 @@ virtio_dev_configure(struct rte_eth_dev *dev)PMD_INIT_LOG (DEBUG ,"configure" ); req_features =VIRTIO_PMD_DEFAULT_GUEST_FEATURES ; +if (rxmode->mq_mode !=ETH_MQ_RX_NONE ) { +PMD_DRV_LOG (ERR , +"Unsupported Rx multi queue mode %d" , + rxmode->mq_mode); +return -EINVAL ; + }We need similar checks for Tx as well.
Quoted 5 lines
OK, I'll add.
However, I'm not 100% sure about RSS. Yes, I know that virtio has no RSS configuration support, but it looks possible to have multi queue in vhost-net case.
Yeah, it's possible to have MQ in virtio.
The RSS support in virtio is still WIP.
https://github.com/oasis-tcs/virtio-spec/issues/48
Re: [dpdk-dev] [PATCH 3/3] net/virtio: reject unsupported Rx multi queue modes
Quoted 31 lines · Tiwei Bie
Quoted 30 lines · Andrew Rybchenko
Quoted 29 lines · Tiwei Bie
Quoted 19 lines · Andrew Rybchenko
From: Dilshod Urazov <[email protected]>
This driver supports none of DCB, RSS or VMDQ modes, therefore must check and return error if configured incorrectly.
Fixes c1f86306a026 ("virtio: add new driver")Signed-off-by Dilshod Urazov <[email protected]>Signed-off-by Andrew Rybchenko <[email protected]>--- drivers/net/virtio/virtio_ethdev.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/net/virtio/virtio_ethdev.c +0
-0drivers/net/virtio/virtio_ethdev.c virtio_dev_configure(struct rte_eth_dev *dev) · line 2078
Quoted 8 lines
drivers/net/virtio/virtio_ethdev.c +6
-0@@ -2071,6 +2071,13 @@ virtio_dev_configure(struct rte_eth_dev *dev)PMD_INIT_LOG (DEBUG ,"configure" ); req_features =VIRTIO_PMD_DEFAULT_GUEST_FEATURES ; +if (rxmode->mq_mode !=ETH_MQ_RX_NONE ) { +PMD_DRV_LOG (ERR , +"Unsupported Rx multi queue mode %d" , + rxmode->mq_mode); +return -EINVAL ; + }We need similar checks for Tx as well.
Quoted 8 lines
Quoted 5 lines
OK, I'll add.
However, I'm not 100% sure about RSS. Yes, I know that virtio has no RSS configuration support, but it looks possible to have multi queue in vhost-net case.
Yeah, it's possible to have MQ in virtio.
The RSS support in virtio is still WIP.
https://github.com/oasis-tcs/virtio-spec/issues/48
Thanks for the link. So, may be ETH_MQ_RX_RSS should be accepted as well, but attempts to configure RSS rejected?
Yes, it is a bit strange to accept RSS with empty rss_hf etc, but at least it is exactly what net/virtio can do.
And one more thought...
It looks like if more than one Rx queue is configured, mq_mode must be ETH_MQ_RX_RSS and must not be ETH_MQ_RX_NONE.
Re: [dpdk-dev] [PATCH 3/3] net/virtio: reject unsupported Rx multi queue modes
Quoted 41 lines · Andrew Rybchenko
Quoted 31 lines · Tiwei Bie
Quoted 30 lines · Andrew Rybchenko
Quoted 29 lines · Tiwei Bie
Quoted 19 lines · Andrew Rybchenko
From: Dilshod Urazov <[email protected]>
This driver supports none of DCB, RSS or VMDQ modes, therefore must check and return error if configured incorrectly.
Fixes c1f86306a026 ("virtio: add new driver")Signed-off-by Dilshod Urazov <[email protected]>Signed-off-by Andrew Rybchenko <[email protected]>--- drivers/net/virtio/virtio_ethdev.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/net/virtio/virtio_ethdev.c +0
-0drivers/net/virtio/virtio_ethdev.c virtio_dev_configure(struct rte_eth_dev *dev) · line 2078
Quoted 8 lines
drivers/net/virtio/virtio_ethdev.c +6
-0@@ -2071,6 +2071,13 @@ virtio_dev_configure(struct rte_eth_dev *dev)PMD_INIT_LOG (DEBUG ,"configure" ); req_features =VIRTIO_PMD_DEFAULT_GUEST_FEATURES ; +if (rxmode->mq_mode !=ETH_MQ_RX_NONE ) { +PMD_DRV_LOG (ERR , +"Unsupported Rx multi queue mode %d" , + rxmode->mq_mode); +return -EINVAL ; + }We need similar checks for Tx as well.
Quoted 8 lines
Quoted 5 lines
OK, I'll add.
However, I'm not 100% sure about RSS. Yes, I know that virtio has no RSS configuration support, but it looks possible to have multi queue in vhost-net case.
Yeah, it's possible to have MQ in virtio.
The RSS support in virtio is still WIP.
https://github.com/oasis-tcs/virtio-spec/issues/48
Quoted 8 lines
Thanks for the link. So, may be
ETH_MQ_RX_RSSshould be accepted as well, but attempts to configure RSS rejected?
Yes, it is a bit strange to accept RSS with emptyrss_hfetc, but at least it is exactly what net/virtio can do.And one more thought...
It looks like if more than one Rx queue is configured,mq_modemust beETH_MQ_RX_RSSand must not beETH_MQ_RX_NONE.
Some apps in DPDK will set mq_mode to ETH_MQ_RX_NONE while enabling multiple queue pairs, e.g.:
https://github.com/DPDK/dpdk/blob/5b5bb56532fd5dea5d6260c0a0e405c0e32da2a0/app/test/test_link_bonding.c#L137
https://github.com/DPDK/dpdk/blob/5b5bb56532fd5dea5d6260c0a0e405c0e32da2a0/app/test/test_link_bonding.c#L181-L182
https://github.com/DPDK/dpdk/blob/5b5bb56532fd5dea5d6260c0a0e405c0e32da2a0/app/test/test_link_bonding.c#L3938-L3948
Testpmd will also set mq_mode to ETH_MQ_RX_NONE when multiple Rx queues are enabled but rss_hf is empty:
https://github.com/DPDK/dpdk/blob/5b5bb56532fd5dea5d6260c0a0e405c0e32da2a0/app/test-pmd/testpmd.c#L2935-L2938
https://github.com/DPDK/dpdk/blob/5b5bb56532fd5dea5d6260c0a0e405c0e32da2a0/app/test-pmd/testpmd.c#L2945-L2948
(the flow_type_rss_offloads reported by virtio-PMD is zero)
My understanding is that, setting mq_mode to ETH_MQ_RX_NONE means no method is enforced on how to route packets to MQs. It looks that ETH_MQ_RX_NONE is the best fit for virtio currently.
Re: [dpdk-dev] [PATCH 3/3] net/virtio: reject unsupported Rx multi queue modes
@Thomas, @Ferruh, please see small question below.
Quoted 59 lines · Tiwei Bie
Quoted 40 lines · Andrew Rybchenko
Quoted 31 lines · Tiwei Bie
Quoted 30 lines · Andrew Rybchenko
Quoted 29 lines · Tiwei Bie
Quoted 19 lines · Andrew Rybchenko
From: Dilshod Urazov <[email protected]>
This driver supports none of DCB, RSS or VMDQ modes, therefore must check and return error if configured incorrectly.
Fixes c1f86306a026 ("virtio: add new driver")Signed-off-by Dilshod Urazov <[email protected]>Signed-off-by Andrew Rybchenko <[email protected]>--- drivers/net/virtio/virtio_ethdev.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/net/virtio/virtio_ethdev.c +0
-0drivers/net/virtio/virtio_ethdev.c virtio_dev_configure(struct rte_eth_dev *dev) · line 2078
Quoted 8 lines
drivers/net/virtio/virtio_ethdev.c +6
-0@@ -2071,6 +2071,13 @@ virtio_dev_configure(struct rte_eth_dev *dev)PMD_INIT_LOG (DEBUG ,"configure" ); req_features =VIRTIO_PMD_DEFAULT_GUEST_FEATURES ; +if (rxmode->mq_mode !=ETH_MQ_RX_NONE ) { +PMD_DRV_LOG (ERR , +"Unsupported Rx multi queue mode %d" , + rxmode->mq_mode); +return -EINVAL ; + }We need similar checks for Tx as well.
Quoted 8 lines
Quoted 5 lines
OK, I'll add.
However, I'm not 100% sure about RSS. Yes, I know that virtio has no RSS configuration support, but it looks possible to have multi queue in vhost-net case.
Yeah, it's possible to have MQ in virtio.
The RSS support in virtio is still WIP.
https://github.com/oasis-tcs/virtio-spec/issues/48Quoted 8 lines
Thanks for the link. So, may be
ETH_MQ_RX_RSSshould be accepted as well, but attempts to configure RSS rejected?
Yes, it is a bit strange to accept RSS with emptyrss_hfetc, but at least it is exactly what net/virtio can do.And one more thought...
It looks like if more than one Rx queue is configured,mq_modemust beETH_MQ_RX_RSSand must not beETH_MQ_RX_NONE.Some apps in DPDK will set
mq_modetoETH_MQ_RX_NONEwhile enabling multiple queue pairs, e.g.:https://github.com/DPDK/dpdk/blob/5b5bb56532fd5dea5d6260c0a0e405c0e32da2a0/app/test/test_link_bonding.c#L137
https://github.com/DPDK/dpdk/blob/5b5bb56532fd5dea5d6260c0a0e405c0e32da2a0/app/test/test_link_bonding.c#L181-L182
https://github.com/DPDK/dpdk/blob/5b5bb56532fd5dea5d6260c0a0e405c0e32da2a0/app/test/test_link_bonding.c#L3938-L3948Testpmd will also set
mq_modetoETH_MQ_RX_NONEwhen multiple Rx queues are enabled butrss_hfis empty:
Quoted 6 lines
https://github.com/DPDK/dpdk/blob/5b5bb56532fd5dea5d6260c0a0e405c0e32da2a0/app/test-pmd/testpmd.c#L2935-L2938
https://github.com/DPDK/dpdk/blob/5b5bb56532fd5dea5d6260c0a0e405c0e32da2a0/app/test-pmd/testpmd.c#L2945-L2948
(theflow_type_rss_offloadsreported by virtio-PMD is zero)My understanding is that, setting
mq_modetoETH_MQ_RX_NONEmeans no method is enforced on how to route packets to MQs.
I'm not sure. It is definitely a place to be improved in ethdev documentation. Thomas, Ferruh, what do you think? Is it really a definition of ETH_MQ_RX_NONE?
Quoted 1 line
It looks that
ETH_MQ_RX_NONEis the best fit for virtio currently.
Anyway I agree and I think it is better to go this way in the patch.
Thanks,
Andrew.
Re: [dpdk-dev] [PATCH 3/3] net/virtio: reject unsupported Rx multi queue modes
09/10/2019 13:24, Andrew Rybchenko:
Quoted 19 lines · Tiwei Bie
Quoted 18 lines · Andrew Rybchenko
Quoted 3 lines
And one more thought...
It looks like if more than one Rx queue is configured,mq_modemust beETH_MQ_RX_RSSand must not beETH_MQ_RX_NONE.Some apps in DPDK will set
mq_modetoETH_MQ_RX_NONEwhile enabling multiple queue pairs, e.g.:https://github.com/DPDK/dpdk/blob/5b5bb56532fd5dea5d6260c0a0e405c0e32da2a0/app/test/test_link_bonding.c#L137
https://github.com/DPDK/dpdk/blob/5b5bb56532fd5dea5d6260c0a0e405c0e32da2a0/app/test/test_link_bonding.c#L181-L182
https://github.com/DPDK/dpdk/blob/5b5bb56532fd5dea5d6260c0a0e405c0e32da2a0/app/test/test_link_bonding.c#L3938-L3948Testpmd will also set
mq_modetoETH_MQ_RX_NONEwhen multiple Rx queues are enabled butrss_hfis empty:https://github.com/DPDK/dpdk/blob/5b5bb56532fd5dea5d6260c0a0e405c0e32da2a0/app/test-pmd/testpmd.c#L2935-L2938
https://github.com/DPDK/dpdk/blob/5b5bb56532fd5dea5d6260c0a0e405c0e32da2a0/app/test-pmd/testpmd.c#L2945-L2948
(theflow_type_rss_offloadsreported by virtio-PMD is zero)
Quoted 6 lines
Quoted 2 lines
My understanding is that, setting
mq_modetoETH_MQ_RX_NONEmeans no method is enforced on how to route packets to MQs.I'm not sure. It is definitely a place to be improved in ethdev documentation. Thomas, Ferruh, what do you think? Is it really a definition of
ETH_MQ_RX_NONE?
I think it means everything go to queue 0.
The comment says no DCB, RSS or VMDQ.
It looks like the "NONE" value has been abused for some custom steering. We have two options:
- document NONE as a possible case of custom steering
- add a new CUSTOM value
Re: [dpdk-dev] [PATCH 3/3] net/virtio: reject unsupported Rx multi queue modes
Quoted 20 lines · Thomas Monjalon
09/10/2019 13:24, Andrew Rybchenko:
Quoted 19 lines · Tiwei Bie
Quoted 18 lines · Andrew Rybchenko
Quoted 3 lines
And one more thought...
It looks like if more than one Rx queue is configured,mq_modemust beETH_MQ_RX_RSSand must not beETH_MQ_RX_NONE.Some apps in DPDK will set
mq_modetoETH_MQ_RX_NONEwhile enabling multiple queue pairs, e.g.:https://github.com/DPDK/dpdk/blob/5b5bb56532fd5dea5d6260c0a0e405c0e32da2a0/app/test/test_link_bonding.c#L137
https://github.com/DPDK/dpdk/blob/5b5bb56532fd5dea5d6260c0a0e405c0e32da2a0/app/test/test_link_bonding.c#L181-L182
https://github.com/DPDK/dpdk/blob/5b5bb56532fd5dea5d6260c0a0e405c0e32da2a0/app/test/test_link_bonding.c#L3938-L3948Testpmd will also set
mq_modetoETH_MQ_RX_NONEwhen multiple Rx queues are enabled butrss_hfis empty:https://github.com/DPDK/dpdk/blob/5b5bb56532fd5dea5d6260c0a0e405c0e32da2a0/app/test-pmd/testpmd.c#L2935-L2938
https://github.com/DPDK/dpdk/blob/5b5bb56532fd5dea5d6260c0a0e405c0e32da2a0/app/test-pmd/testpmd.c#L2945-L2948
(theflow_type_rss_offloadsreported by virtio-PMD is zero)
Quoted 6 lines
Quoted 5 lines
Quoted 2 lines
My understanding is that, setting
mq_modetoETH_MQ_RX_NONEmeans no method is enforced on how to route packets to MQs.I'm not sure. It is definitely a place to be improved in ethdev documentation. Thomas, Ferruh, what do you think? Is it really a definition of
ETH_MQ_RX_NONE?I think it means everything go to queue 0.
I understand it this way as well.
Quoted 5 lines
The comment says no DCB, RSS or VMDQ.
It looks like the "NONE" value has been abused for some custom steering. We have two options:
- document NONE as a possible case of custom steering
- add a new CUSTOM value
I'd prefer to say that ETH_MQ_RX_RSS with rss_hf equal to 0 means unspecified/unknown steering. If application just want to spread traffic across many Rx queues, it is natural choice to say that it want RSS, but do not care about spreading algorithm etc. It allows driver use recommended defaults if rss_hf is controllable, or just spread in virtio case.
Yes, it means that testpmd should be fixed for this specific case to be able to enable RSS with rss_hf equal to 0.
Re: [dpdk-dev] [PATCH 3/3] net/virtio: reject unsupported Rx multi queue modes
Quoted 19 lines · Andrew Rybchenko
Quoted 8 lines · Thomas Monjalon
09/10/2019 13:24, Andrew Rybchenko:
Quoted 6 lines · Tiwei Bie
Quoted 2 lines
My understanding is that, setting
mq_modetoETH_MQ_RX_NONEmeans no method is enforced on how to route packets to MQs.I'm not sure. It is definitely a place to be improved in ethdev documentation. Thomas, Ferruh, what do you think? Is it really a definition of
ETH_MQ_RX_NONE?I think it means everything go to queue 0.
I understand it this way as well.
Quoted 5 lines
The comment says no DCB, RSS or VMDQ.
It looks like the "NONE" value has been abused for some custom steering. We have two options:
- document NONE as a possible case of custom steering
- add a new CUSTOM value
Quoted 6 lines
I'd prefer to say that
ETH_MQ_RX_RSSwithrss_hfequal to 0 means unspecified/unknown steering. If application just want to spread traffic across many Rx queues, it is natural choice to say that it want RSS, but do not care about spreading algorithm etc. It allows driver use recommended defaults ifrss_hfis controllable, or just spread in virtio case.
RSS is about maintaining affinity of a "flow" (as in packets sharing the same l3/l4 tuples) to a specific queue.
Here, we can have packets from a same flow on any queue depending on what happened on the vhost side.
I prefer we describe this behavior as something else than RSS.
Signature · 1 line
David Marchand
Re: [dpdk-dev] [PATCH 3/3] net/virtio: reject unsupported Rx multi queue modes
Quoted 24 lines · David Marchand
Quoted 16 lines · Andrew Rybchenko
Quoted 8 lines · Thomas Monjalon
09/10/2019 13:24, Andrew Rybchenko:
Quoted 6 lines · Tiwei Bie
Quoted 2 lines
My understanding is that, setting
mq_modetoETH_MQ_RX_NONEmeans no method is enforced on how to route packets to MQs.I'm not sure. It is definitely a place to be improved in ethdev documentation. Thomas, Ferruh, what do you think? Is it really a definition of
ETH_MQ_RX_NONE?I think it means everything go to queue 0.
I understand it this way as well.
Quoted 5 lines
The comment says no DCB, RSS or VMDQ.
It looks like the "NONE" value has been abused for some custom steering. We have two options:
- document NONE as a possible case of custom steering
- add a new CUSTOM valueQuoted 6 lines
I'd prefer to say that
ETH_MQ_RX_RSSwithrss_hfequal to 0 means unspecified/unknown steering. If application just want to spread traffic across many Rx queues, it is natural choice to say that it want RSS, but do not care about spreading algorithm etc. It allows driver use recommended defaults ifrss_hfis controllable, or just spread in virtio case.
Quoted 4 lines
RSS is about maintaining affinity of a "flow" (as in packets sharing the same l3/l4 tuples) to a specific queue.
Here, we can have packets from a same flow on any queue depending on what happened on the vhost side.
Interesting. I'd like to know a bit more about it. I didn't know that it is so unstable. Could someone who knows the topic well add a bit more information about it.
Quoted 1 line
I prefer we describe this behavior as something else than RSS.
Re: [dpdk-dev] [PATCH 3/3] net/virtio: reject unsupported Rx multi queue modes
Quoted 25 lines · Andrew Rybchenko
Quoted 24 lines · David Marchand
Quoted 22 lines · Andrew Rybchenko
Quoted 8 lines · Thomas Monjalon
09/10/2019 13:24, Andrew Rybchenko:
Quoted 6 lines · Tiwei Bie
Quoted 2 lines
My understanding is that, setting
mq_modetoETH_MQ_RX_NONEmeans no method is enforced on how to route packets to MQs.I'm not sure. It is definitely a place to be improved in ethdev documentation. Thomas, Ferruh, what do you think? Is it really a definition of
ETH_MQ_RX_NONE?I think it means everything go to queue 0.
I understand it this way as well.
Quoted 5 lines
The comment says no DCB, RSS or VMDQ.
It looks like the "NONE" value has been abused for some custom steering. We have two options:
- document NONE as a possible case of custom steering
- add a new CUSTOM valueI'd prefer to say that
ETH_MQ_RX_RSSwithrss_hfequal to 0 means unspecified/unknown steering. If application just want to spread traffic across many Rx queues, it is natural choice to say that it want RSS, but do not care about spreading algorithm etc. It allows driver use recommended defaults ifrss_hfis controllable, or just spread in virtio case.
Quoted 8 lines
Quoted 4 lines
RSS is about maintaining affinity of a "flow" (as in packets sharing the same l3/l4 tuples) to a specific queue.
Here, we can have packets from a same flow on any queue depending on what happened on the vhost side.Interesting. I'd like to know a bit more about it. I didn't know that it is so unstable. Could someone who knows the topic well add a bit more information about it.
The spec defined automatic steering [1], but it's not very strict for the device. So it depends on the implementation.
[1] https://github.com/oasis-tcs/virtio-spec/commit/f7020384521e5938cdd1351270b32b143f070d00
Hi,
Quoted 18 lines · Andrew Rybchenko
From: Dilshod Urazov <[email protected]>
Deferred start Rx queue is not supported by the driver.
Fixes 0748be2cf9a2 ("ethdev: queue start and stop")Signed-off-by Dilshod Urazov <[email protected]>Signed-off-by Andrew Rybchenko <[email protected]>--- drivers/net/virtio/virtio_rxtx.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/net/virtio/virtio_rxtx.c +0
-0
drivers/net/virtio/virtio_rxtx.c virtio_dev_rx_queue_setup(struct rte_eth_dev *dev, · line 929
Quoted 1 line
drivers/net/virtio/virtio_rxtx.c +0
-0@@ -929,6 +929,11 @@ virtio_dev_rx_queue_setup(struct rte_eth_dev *dev,
const struct rte_eth_rxconf *rx_conf __rte_unused,
^^^^^^^^^^^^
The unused can be removed now
Quoted 11 lines
drivers/net/virtio/virtio_rxtx.c +5
-0PMD_INIT_FUNC_TRACE (); +if (rx_conf->rx_deferred_start) { +PMD_INIT_LOG (ERR ,"Rx deferred start is not supported" ); +return -EINVAL ; + } +if (nb_desc ==0 || nb_desc > vq->vq_nentries) nb_desc = vq->vq_nentries; vq->vq_free_cnt =RTE_MIN (vq->vq_free_cnt, nb_desc);
Hi Kevin,
Quoted 23 lines · Kevin Traynor
Hi,
Quoted 18 lines · Andrew Rybchenko
From: Dilshod Urazov <[email protected]>
Deferred start Rx queue is not supported by the driver.
Fixes 0748be2cf9a2 ("ethdev: queue start and stop")Signed-off-by Dilshod Urazov <[email protected]>Signed-off-by Andrew Rybchenko <[email protected]>--- drivers/net/virtio/virtio_rxtx.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/net/virtio/virtio_rxtx.c +0
-0drivers/net/virtio/virtio_rxtx.c virtio_dev_rx_queue_setup(struct rte_eth_dev *dev, · line 929
Quoted 1 line
drivers/net/virtio/virtio_rxtx.c +0
-0@@ -929,6 +929,11 @@ virtio_dev_rx_queue_setup(struct rte_eth_dev *dev,const struct
rte_eth_rxconf*rx_conf__rte_unused,
Quoted 2 lines
^^^^^^^^^^^^The unused can be removed now
Thanks, will fix in v2.
Quoted 11 lines
Quoted 11 lines
drivers/net/virtio/virtio_rxtx.c +5
-0PMD_INIT_FUNC_TRACE (); +if (rx_conf->rx_deferred_start) { +PMD_INIT_LOG (ERR ,"Rx deferred start is not supported" ); +return -EINVAL ; + } +if (nb_desc ==0 || nb_desc > vq->vq_nentries) nb_desc = vq->vq_nentries; vq->vq_free_cnt =RTE_MIN (vq->vq_free_cnt, nb_desc);
PATCH v2 1/4 net/virtio: reject deferred start Rx queue setup
In reply to Andrew RybchenkoFrom: Dilshod Urazov <[email protected]>
Deferred start Rx queue is not supported by the driver.
--- drivers/net/virtio/virtio_rxtx.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/net/virtio/virtio_rxtx.c +6 -1
@@ -919,7 +919,7 @@ virtio_dev_rx_queue_setup(struct rte_eth_dev *dev,uint16_t queue_idx, uint16_t nb_desc, unsigned int socket_id __rte_unused, - const struct rte_eth_rxconf *rx_conf __rte_unused, + const struct rte_eth_rxconf *rx_conf, struct rte_mempool *mp) { uint16_t vtpci_queue_idx = 2 * queue_idx + VTNET_SQ_RQ_QUEUE_IDX;
@@ -929,6 +929,11 @@ virtio_dev_rx_queue_setup(struct rte_eth_dev *dev,PMD_INIT_FUNC_TRACE (); +if (rx_conf->rx_deferred_start) { +PMD_INIT_LOG (ERR ,"Rx deferred start is not supported" ); +return -EINVAL ; + } +if (nb_desc ==0 || nb_desc > vq->vq_nentries) nb_desc = vq->vq_nentries; vq->vq_free_cnt =RTE_MIN (vq->vq_free_cnt, nb_desc);
Signature · 1 line
2.17.1
PATCH v2 2/4 net/virtio: reject deferred start Tx queue setup
From: Dilshod Urazov <[email protected]>
Deferred start Tx queue is not supported by the driver.
--- drivers/net/virtio/virtio_rxtx.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/net/virtio/virtio_rxtx.c +5 -0
@@ -1057,6 +1057,11 @@ virtio_dev_tx_queue_setup(struct rte_eth_dev *dev,PMD_INIT_FUNC_TRACE (); +if (tx_conf->tx_deferred_start) { +PMD_INIT_LOG (ERR ,"Tx deferred start is not supported" ); +return -EINVAL ; + } +if (nb_desc ==0 || nb_desc > vq->vq_nentries) nb_desc = vq->vq_nentries; vq->vq_free_cnt =RTE_MIN (vq->vq_free_cnt, nb_desc);
Signature · 1 line
2.17.1
Re: [dpdk-dev] [PATCH v2 2/4] net/virtio: reject deferred start Tx queue setup
Quoted 7 lines · Andrew Rybchenko
From: Dilshod Urazov <[email protected]>
Deferred start Tx queue is not supported by the driver.
Fixes 0748be2cf9a2 ("ethdev: queue start and stop")
Quoted 6 lines
Signed-off-by Dilshod Urazov <[email protected]>Signed-off-by Andrew Rybchenko <[email protected]>Reviewed-by Tiwei Bie <[email protected]>--- drivers/net/virtio/virtio_rxtx.c | 5 +++++ 1 file changed, 5 insertions(+)
Thanks,
Maxime
PATCH v2 3/4 net/virtio: reject unsupported Rx multi queue modes
In reply to Andrew RybchenkoFrom: Dilshod Urazov <[email protected]>
This driver supports none of DCB, RSS or VMDQ modes, therefore must check and return error if configured incorrectly.
Virtio can distribute Rx packets across multi-queue, but there is no controls (algorithm, redirection table, hash function) except number of Rx queues and ETH_MQ_RX_NONE is the best fit meaning no method is enforced on how to route packets to MQs.
--- drivers/net/virtio/virtio_ethdev.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/net/virtio/virtio_ethdev.c +7 -0
@@ -2071,6 +2071,13 @@ virtio_dev_configure(struct rte_eth_dev *dev)PMD_INIT_LOG (DEBUG ,"configure" ); req_features =VIRTIO_PMD_DEFAULT_GUEST_FEATURES ; +if (rxmode->mq_mode !=ETH_MQ_RX_NONE ) { +PMD_DRV_LOG (ERR , +"Unsupported Rx multi queue mode %d" , + rxmode->mq_mode); +return -EINVAL ; + } +if (dev->data->dev_conf.intr_conf.rxq) { ret =virtio_init_device (dev, hw->req_guest_features);if (ret <0 )
Signature · 1 line
2.17.1
Re: [dpdk-dev] [PATCH v2 3/4] net/virtio: reject unsupported Rx multi queue modes
Quoted 10 lines · Andrew Rybchenko
From: Dilshod Urazov <[email protected]>
This driver supports none of DCB, RSS or VMDQ modes, therefore must check and return error if configured incorrectly.
Virtio can distribute Rx packets across multi-queue, but there is no controls (algorithm, redirection table, hash function) except number of Rx queues and
ETH_MQ_RX_NONEis the best fit meaning no method is enforced on how to route packets to MQs.
Quoted 8 lines
Fixes c1f86306a026 ("virtio: add new driver")Signed-off-by Dilshod Urazov <[email protected]>Signed-off-by Andrew Rybchenko <[email protected]>--- drivers/net/virtio/virtio_ethdev.c | 7 +++++++ 1 file changed, 7 insertions(+)
Thanks,
Maxime
PATCH v2 4/4 net/virtio: reject unsupported Tx multi queue modes
In reply to Andrew RybchenkoThis driver supports none of DCB or VMDQ modes, therefore must check and return error if configured incorrectly.
--- drivers/net/virtio/virtio_ethdev.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/net/virtio/virtio_ethdev.c +7 -0
@@ -2078,6 +2078,13 @@ virtio_dev_configure(struct rte_eth_dev *dev)return -EINVAL ; } +if (txmode->mq_mode !=ETH_MQ_TX_NONE ) { +PMD_DRV_LOG (ERR , +"Unsupported Tx multi queue mode %d" , + txmode->mq_mode); +return -EINVAL ; + } +if (dev->data->dev_conf.intr_conf.rxq) { ret =virtio_init_device (dev, hw->req_guest_features);if (ret <0 )
Signature · 1 line
2.17.1
Re: [dpdk-dev] [PATCH v2 4/4] net/virtio: reject unsupported Tx multi queue modes
Quoted 10 lines · Andrew Rybchenko
This driver supports none of DCB or VMDQ modes, therefore must check and return error if configured incorrectly.
Fixes c1f86306a026 ("virtio: add new driver")Signed-off-by Andrew Rybchenko <[email protected]>--- drivers/net/virtio/virtio_ethdev.c | 7 +++++++ 1 file changed, 7 insertions(+)
Thanks,
Maxime
Quoted 4 lines · Andrew Rybchenko
From: Dilshod Urazov <[email protected]>
Deferred start Rx queue is not supported by the driver.
Quoted 8 lines
Fixes 0748be2cf9a2 ("ethdev: queue start and stop")Signed-off-by Dilshod Urazov <[email protected]>Signed-off-by Andrew Rybchenko <[email protected]>--- drivers/net/virtio/virtio_rxtx.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
Thanks,
Maxime
Quoted 16 lines · Maxime Coquelin
Quoted 4 lines · Andrew Rybchenko
From: Dilshod Urazov <[email protected]>
Deferred start Rx queue is not supported by the driver.
Quoted 8 lines
Fixes 0748be2cf9a2 ("ethdev: queue start and stop")Signed-off-by Dilshod Urazov <[email protected]>Signed-off-by Andrew Rybchenko <[email protected]>--- drivers/net/virtio/virtio_rxtx.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
Quoted 5 lines
Reviewed-by Maxime Coquelin <[email protected]>Thanks,
Maxime
Series applied to dpdk-next-virtio/master.
Thanks,
Maxime