net/ice: stop LLDP by default
[dpdk.git] / drivers / net / ice / ice_ethdev.c
index 9d01018..0946b19 100644 (file)
@@ -12,6 +12,7 @@
 
 #include "base/ice_sched.h"
 #include "base/ice_flow.h"
+#include "base/ice_dcb.h"
 #include "ice_ethdev.h"
 #include "ice_rxtx.h"
 
@@ -1428,6 +1429,10 @@ ice_dev_init(struct rte_eth_dev *dev)
        /* Disable double vlan by default */
        ice_vsi_config_double_vlan(vsi, FALSE);
 
+       ret = ice_aq_stop_lldp(hw, TRUE, NULL);
+       if (ret != ICE_SUCCESS)
+               PMD_INIT_LOG(DEBUG, "lldp has already stopped\n");
+
        /* register callback func to eal lib */
        rte_intr_callback_register(intr_handle,
                                   ice_interrupt_handler, dev);
@@ -2206,8 +2211,7 @@ ice_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 {
        struct ice_pf *pf = ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private);
        struct rte_eth_dev_data *dev_data = pf->dev_data;
-       uint32_t frame_size = mtu + ETHER_HDR_LEN
-                             + ETHER_CRC_LEN + ICE_VLAN_TAG_SIZE;
+       uint32_t frame_size = mtu + ICE_ETH_OVERHEAD;
 
        /* check if mtu is within the allowed range */
        if (mtu < ETHER_MIN_MTU || frame_size > ICE_FRAME_SIZE_MAX)