]> git.droids-corp.org - dpdk.git/commitdiff
net/iavf: store offload flag of Rx queue
authorWenzhuo Lu <wenzhuo.lu@intel.com>
Wed, 14 Apr 2021 07:34:06 +0000 (15:34 +0800)
committerQi Zhang <qi.z.zhang@intel.com>
Wed, 14 Apr 2021 12:35:10 +0000 (14:35 +0200)
Add the offload flag for RX queues to know which offload
features are set.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/iavf/iavf_rxtx.c
drivers/net/iavf/iavf_rxtx.h

index 541b4446e8d5920af34854682dd7b94825e72e4b..bd0b7eea83472094fc0bc4d3c782468216677b5e 100644 (file)
@@ -523,9 +523,12 @@ iavf_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
        uint8_t proto_xtr;
        uint16_t len;
        uint16_t rx_free_thresh;
+       uint64_t offloads;
 
        PMD_INIT_FUNC_TRACE();
 
+       offloads = rx_conf->offloads | dev->data->dev_conf.rxmode.offloads;
+
        if (nb_desc % IAVF_ALIGN_RING_DESC != 0 ||
            nb_desc > IAVF_MAX_RING_DESC ||
            nb_desc < IAVF_MIN_RING_DESC) {
@@ -596,6 +599,7 @@ iavf_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
        rxq->rx_deferred_start = rx_conf->rx_deferred_start;
        rxq->rx_hdr_len = 0;
        rxq->vsi = vsi;
+       rxq->offloads = offloads;
 
        if (dev->data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_KEEP_CRC)
                rxq->crc_len = RTE_ETHER_CRC_LEN;
index 4fbd8470347ac4194eec2dafbf2cdcf8e9da6ae5..f56dd742dae4048feac209a16eb84ed9035c8cb2 100644 (file)
@@ -198,6 +198,7 @@ struct iavf_rx_queue {
                /* flexible descriptor metadata extraction offload flag */
        iavf_rxd_to_pkt_fields_t rxd_to_pkt_fields;
                                /* handle flexible descriptor by RXDID */
+       uint64_t offloads;
 };
 
 struct iavf_tx_entry {