Add the offload flag for RX queues to know which offload
features are set.

Signed-off-by: Wenzhuo Lu <wenzhuo...@intel.com>
---
 drivers/net/iavf/iavf_rxtx.c | 4 ++++
 drivers/net/iavf/iavf_rxtx.h | 1 +
 2 files changed, 5 insertions(+)

diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index 541b444..bd0b7ee 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -523,9 +523,12 @@
        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 @@
        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;
diff --git a/drivers/net/iavf/iavf_rxtx.h b/drivers/net/iavf/iavf_rxtx.h
index 4fbd847..f56dd74 100644
--- a/drivers/net/iavf/iavf_rxtx.h
+++ b/drivers/net/iavf/iavf_rxtx.h
@@ -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 {
-- 
1.9.3

Reply via email to