examples/l3fwd: share queue size variables
[dpdk.git] / drivers / net / ixgbe / ixgbe_ethdev.c
index 3d799d2..2da3f67 100644 (file)
@@ -781,6 +781,20 @@ ixgbe_is_sfp(struct ixgbe_hw *hw)
        case ixgbe_phy_sfp_passive_unknown:
                return 1;
        default:
+               /* x550em devices may be SFP, check media type */
+               switch (hw->mac.type) {
+               case ixgbe_mac_X550EM_x:
+               case ixgbe_mac_X550EM_a:
+                       switch (ixgbe_get_media_type(hw)) {
+                       case ixgbe_media_type_fiber:
+                       case ixgbe_media_type_fiber_qsfp:
+                               return 1;
+                       default:
+                               break;
+                       }
+               default:
+                       break;
+               }
                return 0;
        }
 }
@@ -3038,6 +3052,7 @@ ixgbe_dev_close(struct rte_eth_dev *dev)
 
 #ifdef RTE_LIB_SECURITY
        rte_free(dev->security_ctx);
+       dev->security_ctx = NULL;
 #endif
 
        return ret;