ethdev: fix max Rx packet length
[dpdk.git] / drivers / net / ixgbe / ixgbe_pf.c
index 15982af..4ceb5bf 100644 (file)
@@ -15,7 +15,7 @@
 #include <rte_debug.h>
 #include <rte_eal.h>
 #include <rte_ether.h>
-#include <rte_ethdev_driver.h>
+#include <ethdev_driver.h>
 #include <rte_memcpy.h>
 #include <rte_malloc.h>
 #include <rte_random.h>
@@ -70,8 +70,6 @@ int ixgbe_pf_host_init(struct rte_eth_dev *eth_dev)
 {
        struct ixgbe_vf_info **vfinfo =
                IXGBE_DEV_PRIVATE_TO_P_VFDATA(eth_dev->data->dev_private);
-       struct ixgbe_mirror_info *mirror_info =
-       IXGBE_DEV_PRIVATE_TO_PFDATA(eth_dev->data->dev_private);
        struct ixgbe_uta_info *uta_info =
        IXGBE_DEV_PRIVATE_TO_UTA(eth_dev->data->dev_private);
        struct ixgbe_hw *hw =
@@ -103,7 +101,6 @@ int ixgbe_pf_host_init(struct rte_eth_dev *eth_dev)
                return ret;
        }
 
-       memset(mirror_info, 0, sizeof(struct ixgbe_mirror_info));
        memset(uta_info, 0, sizeof(struct ixgbe_uta_info));
        hw->mac.mc_filter_type = 0;
 
@@ -576,8 +573,7 @@ ixgbe_set_vf_lpe(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
                          * if PF has jumbo frames enabled which means legacy
                          * VFs are disabled.
                          */
-                       if (dev->data->dev_conf.rxmode.max_rx_pkt_len >
-                           IXGBE_ETH_MAX_LEN)
+                       if (dev->data->mtu > RTE_ETHER_MTU)
                                break;
                        /* fall through */
                default:
@@ -587,8 +583,7 @@ ixgbe_set_vf_lpe(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
                         * legacy VFs.
                         */
                        if (max_frame > IXGBE_ETH_MAX_LEN ||
-                           dev->data->dev_conf.rxmode.max_rx_pkt_len >
-                           IXGBE_ETH_MAX_LEN)
+                                       dev->data->mtu > RTE_ETHER_MTU)
                                return -1;
                        break;
                }