* [dpdk-dev] [PATCH] app/testpmd: fix dcb config failure @ 2018-07-24 11:32 Xiaoyun Li 2018-07-24 16:16 ` Iremonger, Bernard 2018-07-31 14:43 ` [dpdk-dev] [PATCH v2] " Konstantin Ananyev 0 siblings, 2 replies; 7+ messages in thread From: Xiaoyun Li @ 2018-07-24 11:32 UTC (permalink / raw) To: wenzhuo.lu, jingjing.wu; +Cc: dev, Xiaoyun Li, stable After adding RSS hash offload check, default rss_hf will fail on devices that do not support all bits. This will lead to dcb config failure. The patch fixes this issue by taking rss_hf as a suggested value and only setting bits that the device supports based on rte_eth_dev_get_info. Fixes: 8863a1fbfc66 ("ethdev: add supported hash function check") Fixes: 1a572499beb6 ("app/testpmd: setup DCB forwarding based on traffic class") Cc: stable@dpdk.org Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com> --- app/test-pmd/testpmd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index f504ca3..d221469 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -2575,6 +2575,9 @@ init_port_dcb_config(portid_t pid, if (retval < 0) return retval; port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_VLAN_FILTER; + rte_eth_dev_info_get(pid, &rte_port->dev_info); + port_conf.rx_adv_conf.rss_conf.rss_hf &= + rte_port->dev_info.flow_type_rss_offloads; /* re-configure the device . */ rte_eth_dev_configure(pid, nb_rxq, nb_rxq, &port_conf); -- 2.7.4 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH] app/testpmd: fix dcb config failure 2018-07-24 11:32 [dpdk-dev] [PATCH] app/testpmd: fix dcb config failure Xiaoyun Li @ 2018-07-24 16:16 ` Iremonger, Bernard 2018-07-26 17:18 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon 2018-07-31 14:43 ` [dpdk-dev] [PATCH v2] " Konstantin Ananyev 1 sibling, 1 reply; 7+ messages in thread From: Iremonger, Bernard @ 2018-07-24 16:16 UTC (permalink / raw) To: Li, Xiaoyun, Lu, Wenzhuo, Wu, Jingjing; +Cc: dev, Li, Xiaoyun, stable > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Xiaoyun Li > Sent: Tuesday, July 24, 2018 12:33 PM > To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Wu, Jingjing > <jingjing.wu@intel.com> > Cc: dev@dpdk.org; Li, Xiaoyun <xiaoyun.li@intel.com>; stable@dpdk.org > Subject: [dpdk-dev] [PATCH] app/testpmd: fix dcb config failure > > After adding RSS hash offload check, default rss_hf will fail on devices that do > not support all bits. This will lead to dcb config failure. The patch fixes this > issue by taking rss_hf as a suggested value and only setting bits that the > device supports based on rte_eth_dev_get_info. > > Fixes: 8863a1fbfc66 ("ethdev: add supported hash function check") > Fixes: 1a572499beb6 ("app/testpmd: setup DCB forwarding based on traffic > class") > Cc: stable@dpdk.org > > Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com> Acked-by: Bernard Iremonger <bernard.iremonger@intel.com> ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [dpdk-stable] [PATCH] app/testpmd: fix dcb config failure 2018-07-24 16:16 ` Iremonger, Bernard @ 2018-07-26 17:18 ` Thomas Monjalon 0 siblings, 0 replies; 7+ messages in thread From: Thomas Monjalon @ 2018-07-26 17:18 UTC (permalink / raw) To: Iremonger, Bernard, Li, Xiaoyun Cc: Lu, Wenzhuo, Wu, Jingjing, dev, ferruh.yigit > > After adding RSS hash offload check, default rss_hf will fail on devices that do > > not support all bits. This will lead to dcb config failure. The patch fixes this > > issue by taking rss_hf as a suggested value and only setting bits that the > > device supports based on rte_eth_dev_get_info. > > > > Fixes: 8863a1fbfc66 ("ethdev: add supported hash function check") > > Fixes: 1a572499beb6 ("app/testpmd: setup DCB forwarding based on traffic > > class") > > Cc: stable@dpdk.org > > > > Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com> > > Acked-by: Bernard Iremonger <bernard.iremonger@intel.com> NACK testpmd is a test application for developpers. It must fail if the PMD cannot support user-requested features. For other applications, there can be a smooth fallback if and only if there are appropriate logs. This is what Ferruh did for examples: http://git.dpdk.org/dpdk/commit/?id=4f5701f28bd ^ permalink raw reply [flat|nested] 7+ messages in thread
* [dpdk-dev] [PATCH v2] app/testpmd: fix dcb config failure 2018-07-24 11:32 [dpdk-dev] [PATCH] app/testpmd: fix dcb config failure Xiaoyun Li 2018-07-24 16:16 ` Iremonger, Bernard @ 2018-07-31 14:43 ` Konstantin Ananyev 2018-08-01 8:46 ` Iremonger, Bernard 2018-08-02 2:31 ` Zhao, MeijuanX 1 sibling, 2 replies; 7+ messages in thread From: Konstantin Ananyev @ 2018-07-31 14:43 UTC (permalink / raw) To: dev, dev; +Cc: Konstantin Ananyev After adding RSS hash offload check, default rss_hf will fail on devices that do not support all bits. This will lead to dcb config failure. The patch fixes this issue by reading current valid rss_conf from the device. Fixes: 8863a1fbfc66 ("ethdev: add supported hash function check") Fixes: 1a572499beb6 ("app/testpmd: setup DCB forwarding based on traffic class") Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com> --- app/test-pmd/testpmd.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index f504ca35a..ee48db2a3 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -2484,12 +2484,14 @@ const uint16_t vlan_tags[] = { }; static int -get_eth_dcb_conf(struct rte_eth_conf *eth_conf, +get_eth_dcb_conf(portid_t pid, struct rte_eth_conf *eth_conf, enum dcb_mode_enable dcb_mode, enum rte_eth_nb_tcs num_tcs, uint8_t pfc_en) { uint8_t i; + int32_t rc; + struct rte_eth_rss_conf rss_conf; /* * Builds up the correct configuration for dcb+vt based on the vlan tags array @@ -2529,6 +2531,10 @@ get_eth_dcb_conf(struct rte_eth_conf *eth_conf, struct rte_eth_dcb_tx_conf *tx_conf = ð_conf->tx_adv_conf.dcb_tx_conf; + rc = rte_eth_dev_rss_hash_conf_get(pid, &rss_conf); + if (rc != 0) + return rc; + rx_conf->nb_tcs = num_tcs; tx_conf->nb_tcs = num_tcs; @@ -2536,8 +2542,9 @@ get_eth_dcb_conf(struct rte_eth_conf *eth_conf, rx_conf->dcb_tc[i] = i % num_tcs; tx_conf->dcb_tc[i] = i % num_tcs; } + eth_conf->rxmode.mq_mode = ETH_MQ_RX_DCB_RSS; - eth_conf->rx_adv_conf.rss_conf.rss_hf = rss_hf; + eth_conf->rx_adv_conf.rss_conf = rss_conf; eth_conf->txmode.mq_mode = ETH_MQ_TX_DCB; } @@ -2571,7 +2578,7 @@ init_port_dcb_config(portid_t pid, port_conf.txmode = rte_port->dev_conf.txmode; /*set configuration of DCB in vt mode and DCB in non-vt mode*/ - retval = get_eth_dcb_conf(&port_conf, dcb_mode, num_tcs, pfc_en); + retval = get_eth_dcb_conf(pid, &port_conf, dcb_mode, num_tcs, pfc_en); if (retval < 0) return retval; port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_VLAN_FILTER; -- 2.13.6 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH v2] app/testpmd: fix dcb config failure 2018-07-31 14:43 ` [dpdk-dev] [PATCH v2] " Konstantin Ananyev @ 2018-08-01 8:46 ` Iremonger, Bernard 2018-08-01 14:32 ` Thomas Monjalon 2018-08-02 2:31 ` Zhao, MeijuanX 1 sibling, 1 reply; 7+ messages in thread From: Iremonger, Bernard @ 2018-08-01 8:46 UTC (permalink / raw) To: Ananyev, Konstantin, dev; +Cc: Ananyev, Konstantin > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Konstantin Ananyev > Sent: Tuesday, July 31, 2018 3:44 PM > To: dev@dpdk.org; dev@dpdk.org > Cc: Ananyev, Konstantin <konstantin.ananyev@intel.com> > Subject: [dpdk-dev] [PATCH v2] app/testpmd: fix dcb config failure > > After adding RSS hash offload check, default rss_hf will fail on devices that do > not support all bits. This will lead to dcb config failure. The patch fixes this issue > by reading current valid rss_conf from the device. > > Fixes: 8863a1fbfc66 ("ethdev: add supported hash function check") > Fixes: 1a572499beb6 ("app/testpmd: setup DCB forwarding based on traffic > class") > > Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Acked-by: Bernard Iremonger <bernard.iremonger@intel.com> ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH v2] app/testpmd: fix dcb config failure 2018-08-01 8:46 ` Iremonger, Bernard @ 2018-08-01 14:32 ` Thomas Monjalon 0 siblings, 0 replies; 7+ messages in thread From: Thomas Monjalon @ 2018-08-01 14:32 UTC (permalink / raw) To: Ananyev, Konstantin; +Cc: dev, Iremonger, Bernard > > After adding RSS hash offload check, default rss_hf will fail on devices that do > > not support all bits. This will lead to dcb config failure. The patch fixes this issue > > by reading current valid rss_conf from the device. > > > > Fixes: 8863a1fbfc66 ("ethdev: add supported hash function check") > > Fixes: 1a572499beb6 ("app/testpmd: setup DCB forwarding based on traffic > > class") > > > > Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com> > > Acked-by: Bernard Iremonger <bernard.iremonger@intel.com> Applied, thanks ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH v2] app/testpmd: fix dcb config failure 2018-07-31 14:43 ` [dpdk-dev] [PATCH v2] " Konstantin Ananyev 2018-08-01 8:46 ` Iremonger, Bernard @ 2018-08-02 2:31 ` Zhao, MeijuanX 1 sibling, 0 replies; 7+ messages in thread From: Zhao, MeijuanX @ 2018-08-02 2:31 UTC (permalink / raw) To: Ananyev, Konstantin, dev, dev; +Cc: Ananyev, Konstantin, Han, YingyaX -----Original Message----- From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Konstantin Ananyev Sent: Tuesday, July 31, 2018 10:44 PM To: dev@dpdk.org; dev@dpdk.org Cc: Ananyev, Konstantin <konstantin.ananyev@intel.com> Subject: [dpdk-dev] [PATCH v2] app/testpmd: fix dcb config failure After adding RSS hash offload check, default rss_hf will fail on devices that do not support all bits. This will lead to dcb config failure. The patch fixes this issue by reading current valid rss_conf from the device. Fixes: 8863a1fbfc66 ("ethdev: add supported hash function check") Fixes: 1a572499beb6 ("app/testpmd: setup DCB forwarding based on traffic class") Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Tested-by: Han, YingyaX <yingyax.han@intel.com> ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-08-02 2:31 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-07-24 11:32 [dpdk-dev] [PATCH] app/testpmd: fix dcb config failure Xiaoyun Li 2018-07-24 16:16 ` Iremonger, Bernard 2018-07-26 17:18 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon 2018-07-31 14:43 ` [dpdk-dev] [PATCH v2] " Konstantin Ananyev 2018-08-01 8:46 ` Iremonger, Bernard 2018-08-01 14:32 ` Thomas Monjalon 2018-08-02 2:31 ` Zhao, MeijuanX
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).