[v2] net/hns3: fix Rx/Tx queue offload capability
Checks
Commit Message
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Currently, offload capabilities are only enabled for all Rx/Tx queues
in hns3 PF/VF PMD driver, and offload capability only applied in a Rx/Tx
queue is not supported. So this patch moves 'DEV_TX_OFFLOAD_MBUF_FAST_FREE'
from tx_queue_offload_capa to tx_offload_capa.
Fixes: 1f5ca0b460cd67 ("net/hns3: support some device operations")
Fixes: a5475d61fa34b8 ("net/hns3: support VF")
Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
v1 -> v2: move DEV_TX_OFFLOAD_MBUF_FAST_FREE from tx_queue_offload
to tx_offload_capa in .dev_info_get ops implementation
function.
---
drivers/net/hns3/hns3_ethdev.c | 3 +--
drivers/net/hns3/hns3_ethdev_vf.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
Comments
On 9/8/2020 1:28 PM, Wei Hu (Xavier) wrote:
> From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
>
> Currently, offload capabilities are only enabled for all Rx/Tx queues
> in hns3 PF/VF PMD driver, and offload capability only applied in a Rx/Tx
> queue is not supported. So this patch moves 'DEV_TX_OFFLOAD_MBUF_FAST_FREE'
> from tx_queue_offload_capa to tx_offload_capa.
>
> Fixes: 1f5ca0b460cd67 ("net/hns3: support some device operations")
> Fixes: a5475d61fa34b8 ("net/hns3: support VF")
> Cc: stable@dpdk.org
>
> Signed-off-by: Huisong Li <lihuisong@huawei.com>
> Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Applied to dpdk-next-net/main, thanks.
@@ -2478,7 +2478,6 @@ hns3_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
DEV_RX_OFFLOAD_JUMBO_FRAME |
DEV_RX_OFFLOAD_RSS_HASH |
DEV_RX_OFFLOAD_TCP_LRO);
- info->tx_queue_offload_capa = DEV_TX_OFFLOAD_MBUF_FAST_FREE;
info->tx_offload_capa = (DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM |
DEV_TX_OFFLOAD_IPV4_CKSUM |
DEV_TX_OFFLOAD_TCP_CKSUM |
@@ -2489,7 +2488,7 @@ hns3_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
DEV_TX_OFFLOAD_VXLAN_TNL_TSO |
DEV_TX_OFFLOAD_GRE_TNL_TSO |
DEV_TX_OFFLOAD_GENEVE_TNL_TSO |
- info->tx_queue_offload_capa |
+ DEV_TX_OFFLOAD_MBUF_FAST_FREE |
hns3_txvlan_cap_get(hw));
info->rx_desc_lim = (struct rte_eth_desc_lim) {
@@ -942,7 +942,6 @@ hns3vf_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
DEV_RX_OFFLOAD_JUMBO_FRAME |
DEV_RX_OFFLOAD_RSS_HASH |
DEV_RX_OFFLOAD_TCP_LRO);
- info->tx_queue_offload_capa = DEV_TX_OFFLOAD_MBUF_FAST_FREE;
info->tx_offload_capa = (DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM |
DEV_TX_OFFLOAD_IPV4_CKSUM |
DEV_TX_OFFLOAD_TCP_CKSUM |
@@ -953,7 +952,7 @@ hns3vf_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
DEV_TX_OFFLOAD_VXLAN_TNL_TSO |
DEV_TX_OFFLOAD_GRE_TNL_TSO |
DEV_TX_OFFLOAD_GENEVE_TNL_TSO |
- info->tx_queue_offload_capa |
+ DEV_TX_OFFLOAD_MBUF_FAST_FREE |
hns3_txvlan_cap_get(hw));
info->rx_desc_lim = (struct rte_eth_desc_lim) {