ethdev: add new offload flag to keep CRC
[dpdk.git] / drivers / net / i40e / i40e_ethdev_vf.c
index 96438a4..5ee0e36 100644 (file)
@@ -1536,7 +1536,7 @@ i40evf_dev_configure(struct rte_eth_dev *dev)
        /* For non-DPDK PF drivers, VF has no ability to disable HW
         * CRC strip, and is implicitly enabled by the PF.
         */
-       if (!(conf->rxmode.offloads & DEV_RX_OFFLOAD_CRC_STRIP)) {
+       if (rte_eth_dev_must_keep_crc(conf->rxmode.offloads)) {
                vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
                if ((vf->version_major == VIRTCHNL_VERSION_MAJOR) &&
                    (vf->version_minor <= VIRTCHNL_VERSION_MINOR)) {
@@ -2182,7 +2182,6 @@ i40evf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 {
        struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
 
-       memset(dev_info, 0, sizeof(*dev_info));
        dev_info->max_rx_queues = vf->vsi_res->num_queue_pairs;
        dev_info->max_tx_queues = vf->vsi_res->num_queue_pairs;
        dev_info->min_rx_bufsize = I40E_BUF_SIZE_MIN;
@@ -2200,8 +2199,10 @@ i40evf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
                DEV_RX_OFFLOAD_TCP_CKSUM |
                DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
                DEV_RX_OFFLOAD_CRC_STRIP |
+               DEV_RX_OFFLOAD_KEEP_CRC |
                DEV_RX_OFFLOAD_SCATTER |
-               DEV_RX_OFFLOAD_JUMBO_FRAME;
+               DEV_RX_OFFLOAD_JUMBO_FRAME |
+               DEV_RX_OFFLOAD_VLAN_FILTER;
 
        dev_info->tx_queue_offload_capa = 0;
        dev_info->tx_offload_capa =