sync upstream fm10k driver
Subsystems (2)
cover sync upstream fm10k driver
This series contains several fixes and nearly finishes the work of syncing upstream and out-of-tree fm10k drivers.
Jacob Keller (7):
fm10k: drop 1588 support
fm10k: correctly handle LPORT_MAP error
fm10k: do not disable PCI device in fm10k_io_error_detected
fm10k: fix documentation of fm10k_tlv_parse_attr
fm10k: use 8bit notation instead of 10bit notation for diagram
fm10k: use different name than FM10K_VLAN_CLEAR for override bit
fm10k: update comment regarding reserved bits check
Ngai-Mint Kwan (2):
fm10k: Fix multicast mode sync issues
fm10k: Reset multicast mode when deleting lport
drivers/net/ethernet/intel/fm10k/Makefile | 3 +- drivers/net/ethernet/intel/fm10k/fm10k.h | 35 +- drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 30 +- drivers/net/ethernet/intel/fm10k/fm10k_main.c | 22 +- drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 42 +-- drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 143 ++----- drivers/net/ethernet/intel/fm10k/fm10k_pf.c | 119 +----- drivers/net/ethernet/intel/fm10k/fm10k_pf.h | 19 +- drivers/net/ethernet/intel/fm10k/fm10k_ptp.c | 462 ----------------------- drivers/net/ethernet/intel/fm10k/fm10k_tlv.c | 18 +- drivers/net/ethernet/intel/fm10k/fm10k_type.h | 18 +- drivers/net/ethernet/intel/fm10k/fm10k_vf.c | 61 +-- drivers/net/ethernet/intel/fm10k/fm10k_vf.h | 12 +- 13 files changed, 78 insertions(+), 906 deletions(-) delete mode 100644 drivers/net/ethernet/intel/fm10k/fm10k_ptp.c
Signature · 1 line
2.8.0.rc1.177.g5628860
PATCH 1/9 fm10k: drop 1588 support
The 1588 support within fm10k does not work correctly with the current version of the switch management software, and likely never worked correctly to begin with. Remove support for PTP/1588. Update copyright year for all these files while we're touching them.
--- drivers/net/ethernet/intel/fm10k/Makefile | 3 +- drivers/net/ethernet/intel/fm10k/fm10k.h | 34 +- drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 30 +- drivers/net/ethernet/intel/fm10k/fm10k_main.c | 22 +- drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 22 +- drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 110 +----- drivers/net/ethernet/intel/fm10k/fm10k_pf.c | 101 +---- drivers/net/ethernet/intel/fm10k/fm10k_pf.h | 17 +- drivers/net/ethernet/intel/fm10k/fm10k_ptp.c | 462 ----------------------- drivers/net/ethernet/intel/fm10k/fm10k_type.h | 17 +- drivers/net/ethernet/intel/fm10k/fm10k_vf.c | 57 +-- drivers/net/ethernet/intel/fm10k/fm10k_vf.h | 12 +- 12 files changed, 11 insertions(+), 876 deletions(-) delete mode 100644 drivers/net/ethernet/intel/fm10k/fm10k_ptp.c
drivers/net/ethernet/intel/fm10k/Makefile +1 -2
@@ -1,7 +1,7 @@ ################################################################################ # # Intel Ethernet Switch Host Interface Driver -# Copyright(c) 2013 - 2015 Intel Corporation. +# Copyright(c) 2013 - 2016 Intel Corporation. # # This program is free software; you can redistribute it and/or modify it # under the terms and conditions of the GNU General Public License,
@@ -30,7 +30,6 @@ obj-$(CONFIG_FM10K) += fm10k.o fm10k-y := fm10k_main.o \ fm10k_common.o \ fm10k_pci.o \ - fm10k_ptp.o \ fm10k_netdev.o \ fm10k_ethtool.o \ fm10k_pf.o \
drivers/net/ethernet/intel/fm10k/fm10k.h +1 -33
@@ -1,5 +1,5 @@/* Intel Ethernet Switch Host Interface Driver -* Copyright(c) 2013 - 2015 Intel Corporation. +* Copyright(c) 2013 - 2016 Intel Corporation. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License,
@@ -27,9 +27,6 @@#include <linux/rtnetlink.h> #include <linux/if_vlan.h> #include <linux/pci.h> -#include <linux/net_tstamp.h> -#include <linux/clocksource.h> -#include <linux/ptp_clock_kernel.h> #include "fm10k_pf.h" #include "fm10k_vf.h"
@@ -342,22 +339,8 @@ struct fm10k_intfc {#ifdef CONFIG_DEBUG_FS struct dentry *dbg_intfc; -#endif /* CONFIG_DEBUG_FS */ -struct ptp_clock_info ptp_caps; -struct ptp_clock *ptp_clock; -struct sk_buff_head ts_tx_skb_queue; -u32 tx_hwtstamp_timeouts; - -struct hwtstamp_config ts_config; -/* We are unable to actually adjust the clock beyond the frequency -* value. Once the clock is started there is no resetting it. As -* such we maintain a separate offset from the actual hardware clock -* to allow for offset adjustment. -*/ -s64 ptp_adjust; -rwlock_t systime_lock;#ifdef CONFIG_DCB u8 pfc_en;#endif
@@ -546,21 +529,6 @@ static inline void fm10k_dbg_init(void) {}static inline void fm10k_dbg_exit (void ) {}#endif /* CONFIG_DEBUG_FS */ -/* Time Stamping */ -void fm10k_systime_to_hwtstamp (struct fm10k_intfc *interface, -struct skb_shared_hwtstamps *hwtstamp, -u64 systime); -void fm10k_ts_tx_enqueue (struct fm10k_intfc *interface,struct sk_buff *skb); -void fm10k_ts_tx_hwtstamp (struct fm10k_intfc *interface,__le16 dglort, -u64 systime); -void fm10k_ts_reset (struct fm10k_intfc *interface); -void fm10k_ts_init (struct fm10k_intfc *interface); -void fm10k_ts_tx_subtask (struct fm10k_intfc *interface); -void fm10k_ptp_register (struct fm10k_intfc *interface); -void fm10k_ptp_unregister (struct fm10k_intfc *interface); -int fm10k_get_ts_config (struct net_device *netdev,struct ifreq *ifr); -int fm10k_set_ts_config (struct net_device *netdev,struct ifreq *ifr); -/* DCB */ #ifdef CONFIG_DCB void fm10k_dcbnl_set_ops (struct net_device *dev);
drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c +1 -29
@@ -1,5 +1,5 @@/* Intel Ethernet Switch Host Interface Driver -* Copyright(c) 2013 - 2015 Intel Corporation. +* Copyright(c) 2013 - 2016 Intel Corporation. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License,
@@ -77,8 +77,6 @@ static const struct fm10k_stats fm10k_gstrings_global_stats[] = {FM10K_STAT ("mac_rules_avail" , hw.swapi.mac.avail), FM10K_STAT("tx_hang_count", tx_timeout_count), - - FM10K_STAT("tx_hwtstamp_timeouts", tx_hwtstamp_timeouts), }; static const struct fm10k_stats fm10k_gstrings_pf_stats[] = {
@@ -1144,31 +1142,6 @@ static int fm10k_set_channels(struct net_device *dev,return fm10k_setup_tc (dev,netdev_get_num_tc (dev)); } -static int fm10k_get_ts_info (struct net_device *dev, -struct ethtool_ts_info *info) -{ -struct fm10k_intfc *interface =netdev_priv (dev); - - info->so_timestamping = -SOF_TIMESTAMPING_TX_SOFTWARE | -SOF_TIMESTAMPING_RX_SOFTWARE | -SOF_TIMESTAMPING_SOFTWARE | -SOF_TIMESTAMPING_TX_HARDWARE | -SOF_TIMESTAMPING_RX_HARDWARE | -SOF_TIMESTAMPING_RAW_HARDWARE ; - -if (interface->ptp_clock) - info->phc_index =ptp_clock_index (interface->ptp_clock); -else - info->phc_index =-1 ; - - info->tx_types =BIT (HWTSTAMP_TX_OFF ) |BIT (HWTSTAMP_TX_ON ); - - info->rx_filters =BIT (HWTSTAMP_FILTER_NONE ) |BIT (HWTSTAMP_FILTER_ALL ); - -return 0 ; -} -static const struct ethtool_ops fm10k_ethtool_ops = { .get_strings = fm10k_get_strings, .get_sset_count = fm10k_get_sset_count,
@@ -1196,7 +1169,6 @@ static const struct ethtool_ops fm10k_ethtool_ops = { .set_rxfh = fm10k_set_rssh, .get_channels = fm10k_get_channels, .set_channels = fm10k_set_channels, - .get_ts_info = fm10k_get_ts_info, };void fm10k_set_ethtool_ops (struct net_device *dev)
drivers/net/ethernet/intel/fm10k/fm10k_main.c +1 -21
@@ -1,5 +1,5 @@/* Intel Ethernet Switch Host Interface Driver -* Copyright(c) 2013 - 2014 Intel Corporation. +* Copyright(c) 2013 - 2016 Intel Corporation. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License,
@@ -424,19 +424,6 @@ static inline void fm10k_rx_hash(struct fm10k_ring *ring, PKT_HASH_TYPE_L4 : PKT_HASH_TYPE_L3); } -static void fm10k_rx_hwtstamp (struct fm10k_ring *rx_ring, -union fm10k_rx_desc *rx_desc, -struct sk_buff *skb) -{ -struct fm10k_intfc *interface = rx_ring->q_vector->interface; - -FM10K_CB (skb)->tstamp = rx_desc->q.timestamp; - -if (unlikely (interface->flags &FM10K_FLAG_RX_TS_ENABLED )) -fm10k_systime_to_hwtstamp (interface,skb_hwtstamps (skb), -le64_to_cpu (rx_desc->q.timestamp)); -} -static void fm10k_type_trans (struct fm10k_ring *rx_ring,union fm10k_rx_desc __maybe_unused *rx_desc,struct sk_buff *skb)
@@ -486,8 +473,6 @@ static unsigned int fm10k_process_skb_fields(struct fm10k_ring *rx_ring,fm10k_rx_checksum (rx_ring, rx_desc, skb); -fm10k_rx_hwtstamp (rx_ring, rx_desc, skb); -FM10K_CB (skb)->fi.w.vlan = rx_desc->w.vlan;skb_record_rx_queue (skb, rx_ring->queue_index);
@@ -912,11 +897,6 @@ static u8 fm10k_tx_desc_flags(struct sk_buff *skb, u32 tx_flags)/* set type for advanced descriptor with frame checksum insertion */ u32 desc_flags =0 ; -/* set timestamping bits */ -if (unlikely (skb_shinfo (skb)->tx_flags &SKBTX_HW_TSTAMP ) && -likely (skb_shinfo (skb)->tx_flags &SKBTX_IN_PROGRESS )) - desc_flags |=FM10K_TXD_FLAG_TIME ; -/* set checksum offload bits */ desc_flags |=FM10K_SET_FLAG (tx_flags,FM10K_TX_FLAGS_CSUM ,FM10K_TXD_FLAG_CSUM );
drivers/net/ethernet/intel/fm10k/fm10k_netdev.c +1 -21
@@ -1,5 +1,5 @@/* Intel Ethernet Switch Host Interface Driver -* Copyright(c) 2013 - 2015 Intel Corporation. +* Copyright(c) 2013 - 2016 Intel Corporation. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License,
@@ -243,9 +243,6 @@ void fm10k_clean_all_tx_rings(struct fm10k_intfc *interface)for (i =0 ; i < interface->num_tx_queues; i++)fm10k_clean_tx_ring (interface->tx_ring[i]); - -/* remove any stale timestamp buffers and free them */ -skb_queue_purge (&interface->ts_tx_skb_queue); }/**
@@ -660,10 +657,6 @@ static netdev_tx_t fm10k_xmit_frame(struct sk_buff *skb, struct net_device *dev)__skb_put (skb, pad_len); } -/* prepare packet for hardware time stamping */ -if (unlikely (skb_shinfo (skb)->tx_flags &SKBTX_HW_TSTAMP )) -fm10k_ts_tx_enqueue (interface, skb); -if (r_idx >= interface->num_tx_queues) r_idx %= interface->num_tx_queues;
@@ -1213,18 +1206,6 @@ static int __fm10k_setup_tc(struct net_device *dev, u32 handle, __be16 proto,return fm10k_setup_tc (dev, tc->tc); } -static int fm10k_ioctl (struct net_device *netdev,struct ifreq *ifr,int cmd) -{ -switch (cmd) { -case SIOCGHWTSTAMP : -return fm10k_get_ts_config (netdev, ifr); -case SIOCSHWTSTAMP : -return fm10k_set_ts_config (netdev, ifr); -default : -return -EOPNOTSUPP ; - } -} -static void fm10k_assign_l2_accel (struct fm10k_intfc *interface,struct fm10k_l2_accel *l2_accel) {
@@ -1402,7 +1383,6 @@ static const struct net_device_ops fm10k_netdev_ops = { .ndo_get_vf_config = fm10k_ndo_get_vf_config, .ndo_add_vxlan_port = fm10k_add_vxlan_port, .ndo_del_vxlan_port = fm10k_del_vxlan_port, - .ndo_do_ioctl = fm10k_ioctl, .ndo_dfwd_add_station = fm10k_dfwd_add_station, .ndo_dfwd_del_station = fm10k_dfwd_del_station,#ifdef CONFIG_NET_POLL_CONTROLLER
drivers/net/ethernet/intel/fm10k/fm10k_pci.c +1 -109
183 lines not on this page · raw message
drivers/net/ethernet/intel/fm10k/fm10k_pf.c +1 -100
129 lines not on this page · raw message
drivers/net/ethernet/intel/fm10k/fm10k_pf.h +1 -16
@@ -1,5 +1,5 @@/* Intel Ethernet Switch Host Interface Driver -* Copyright(c) 2013 - 2015 Intel Corporation. +* Copyright(c) 2013 - 2016 Intel Corporation. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License,
@@ -42,8 +42,6 @@ enum fm10k_pf_tlv_msg_id_v1 {FM10K_PF_MSG_ID_UPDATE_FLOW =0x503 ,FM10K_PF_MSG_ID_DELETE_FLOW =0x504 , FM10K_PF_MSG_ID_SET_FLOW_STATE = 0x505, -FM10K_PF_MSG_ID_GET_1588_INFO =0x506 , - FM10K_PF_MSG_ID_1588_TIMESTAMP = 0x701, }; enum fm10k_pf_tlv_attr_id_v1 {
@@ -61,7 +59,6 @@ enum fm10k_pf_tlv_attr_id_v1 {FM10K_PF_ATTR_ID_DELETE_FLOW =0x0B ,FM10K_PF_ATTR_ID_PORT =0x0C , FM10K_PF_ATTR_ID_UPDATE_PVID = 0x0D, - FM10K_PF_ATTR_ID_1588_TIMESTAMP = 0x10, };#define FM10K_MSG_LPORT_MAP_GLORT_SHIFT 0
@@ -100,13 +97,6 @@ struct fm10k_swapi_error {struct fm10k_global_table_data ffu; }__aligned(4) __packed; -struct fm10k_swapi_1588_timestamp { -__le64 egress; -__le64 ingress; -__le16 dglort; -__le16 sglort; -}__aligned(4) __packed; -s32 fm10k_msg_lport_map_pf (struct fm10k_hw *,u32 **,struct fm10k_mbx_info *);extern const struct fm10k_tlv_attr fm10k_lport_map_msg_attr[];#define FM10K_PF_MSG_LPORT_MAP_HANDLER (func) \
@@ -122,11 +112,6 @@ extern const struct fm10k_tlv_attr fm10k_err_msg_attr[];#define FM10K_PF_MSG_ERR_HANDLER (msg, func) \ FM10K_MSG_HANDLER(FM10K_PF_MSG_ID_##msg, fm10k_err_msg_attr, func) -extern const struct fm10k_tlv_attr fm10k_1588_timestamp_msg_attr[]; -#define FM10K_PF_MSG_1588_TIMESTAMP_HANDLER (func) \ - FM10K_MSG_HANDLER(FM10K_PF_MSG_ID_1588_TIMESTAMP, \ - fm10k_1588_timestamp_msg_attr, func) -s32 fm10k_iov_msg_msix_pf (struct fm10k_hw *,u32 **,struct fm10k_mbx_info *);s32 fm10k_iov_msg_mac_vlan_pf (struct fm10k_hw *,u32 **,struct fm10k_mbx_info *);
drivers/net/ethernet/intel/fm10k/fm10k_ptp.c deleted +0 -462
462 lines not on this page · raw message
drivers/net/ethernet/intel/fm10k/fm10k_type.h +1 -16
@@ -1,5 +1,5 @@/* Intel Ethernet Switch Host Interface Driver -* Copyright(c) 2013 - 2015 Intel Corporation. +* Copyright(c) 2013 - 2016 Intel Corporation. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License,
@@ -225,11 +225,6 @@ struct fm10k_hw;#define FM10K_STATS_LOOPBACK_DROP 0x3806#define FM10K_STATS_NODESC_DROP 0x3807 -/* Timesync registers */ -#define FM10K_SYSTIME 0x3814 -#define FM10K_SYSTIME_CFG 0x3818 -#define FM10K_SYSTIME_CFG_STEP_MASK 0x0000000F -/* PCIe state registers */ #define FM10K_PHYADDR 0x381C
@@ -381,12 +376,6 @@ struct fm10k_hw;#define FM10K_VFSYSTIME 0x00040#define FM10K_VFITR (_n) ((_n) + 0x00060) -/* Registers contained in BAR 4 for Switch management */ -#define FM10K_SW_SYSTIME_ADJUST 0x0224D -#define FM10K_SW_SYSTIME_ADJUST_MASK 0x3FFFFFFF -#define FM10K_SW_SYSTIME_ADJUST_DIR_POSITIVE 0x80000000 -#define FM10K_SW_SYSTIME_PULSE (_n) ((_n) + 0x02252) -enum fm10k_int_source { fm10k_int_mailbox =0 , fm10k_int_pcie_fault =1 ,
@@ -550,8 +539,6 @@ struct fm10k_mac_ops { struct fm10k_dglort_cfg *);void (*set_dma_mask)(struct fm10k_hw *,u64 );s32 (*get_fault)(struct fm10k_hw *,int ,struct fm10k_fault *); -s32 (*adjust_systime)(struct fm10k_hw *,s32 ppb); -u64 (*read_systime)(struct fm10k_hw *); };enum fm10k_mac_type {
@@ -643,7 +630,6 @@ struct fm10k_iov_ops {s32 (*set_lport)(struct fm10k_hw *,struct fm10k_vf_info *,u16 ,u8 );void (*reset_lport)(struct fm10k_hw *,struct fm10k_vf_info *);void (*update_stats)(struct fm10k_hw *,struct fm10k_hw_stats_q *,u16 ); -s32 (*report_timestamp)(struct fm10k_hw *,struct fm10k_vf_info *,u64 ); };struct fm10k_iov_info {
@@ -667,7 +653,6 @@ struct fm10k_info {struct fm10k_hw {u32 __iomem *hw_addr; -u32 __iomem *sw_addr;void *back;struct fm10k_mac_info mac;struct fm10k_bus_info bus;
drivers/net/ethernet/intel/fm10k/fm10k_vf.c +1 -56
79 lines not on this page · raw message
drivers/net/ethernet/intel/fm10k/fm10k_vf.h +1 -11
@@ -1,5 +1,5 @@/* Intel Ethernet Switch Host Interface Driver -* Copyright(c) 2013 - 2014 Intel Corporation. +* Copyright(c) 2013 - 2016 Intel Corporation. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License,
@@ -29,7 +29,6 @@ enum fm10k_vf_tlv_msg_id {FM10K_VF_MSG_ID_MSIX ,FM10K_VF_MSG_ID_MAC_VLAN ,FM10K_VF_MSG_ID_LPORT_STATE , -FM10K_VF_MSG_ID_1588 , FM10K_VF_MSG_ID_MAX, };
@@ -49,11 +48,6 @@ enum fm10k_tlv_lport_state_attr_id { FM10K_LPORT_STATE_MSG_MAX }; -enum fm10k_tlv_1588_attr_id { -FM10K_1588_MSG_TIMESTAMP , -FM10K_1588_MSG_MAX -}; -#define FM10K_VF_MSG_MSIX_HANDLER (func) \ FM10K_MSG_HANDLER(FM10K_VF_MSG_ID_MSIX, NULL, func)
@@ -70,9 +64,5 @@ extern const struct fm10k_tlv_attr fm10k_lport_state_msg_attr[];FM10K_MSG_HANDLER (FM10K_VF_MSG_ID_LPORT_STATE , \ fm10k_lport_state_msg_attr, func) -extern const struct fm10k_tlv_attr fm10k_1588_msg_attr[]; -#define FM10K_VF_MSG_1588_HANDLER (func) \ - FM10K_MSG_HANDLER(FM10K_VF_MSG_ID_1588, fm10k_1588_msg_attr, func) -extern const struct fm10k_info fm10k_vf_info;#endif /* _FM10K_VF_H */
Signature · 1 line
2.8.0.rc1.177.g5628860
Singh
PATCH 1/9 fm10k: drop 1588 support
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Jacob Keller
Sent: Friday, April 1, 2016 4:18 PM
To: Intel Wired LAN <[email protected]>
Subject: [Intel-wired-lan] [PATCH v1 1/9] fm10k: drop 1588 support
The 1588 support within fm10k does not work correctly with the current version of the switch management software, and likely never worked correctly to begin with. Remove support for PTP/1588. Update copyright year for all these files while we're touching them.
---
PATCH 2/9 fm10k: Fix multicast mode sync issues
In reply to Jacob KellerFrom: Ngai-Mint Kwan <[email protected]>
Multicast mode checking is no longer a requirement to perform unicast and multicast address syncs. Specifically, a device operating in promiscuous and/or all multicast mode is not excluded. The issue occurs when the netdev is pre-configured to either multicast mode and is enabled for the first time. The multicast-group table in the Switch Manager will be missing obvious multicast entries associated to this netdev.
Changes were also made to disallow unicast and multicast syncs with VLAN 0. The Switch Manager considers VLAN 0 to be an invalid entry. Requests with VLAN 0 by the netdev are only generated when the driver is freshly installed and the default VID is not set.
--- drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-)
drivers/net/ethernet/intel/fm10k/fm10k_netdev.c +7 -13
@@ -877,7 +877,7 @@ static int __fm10k_uc_sync(struct net_device *dev,return -EADDRNOTAVAIL ;/* update table with current entries */ -for (vid = hw->mac.default_vid ?fm10k_find_next_vlan (interface,0 ) :0 ; +for (vid = hw->mac.default_vid ?fm10k_find_next_vlan (interface,0 ) :1 ; vid <VLAN_N_VID ; vid =fm10k_find_next_vlan (interface, vid)) { err = hw->mac.ops.update_uc_addr(hw, glort, addr,
@@ -940,7 +940,7 @@ static int __fm10k_mc_sync(struct net_device *dev,u16 vid, glort = interface->glort;/* update table with current entries */ -for (vid = hw->mac.default_vid ?fm10k_find_next_vlan (interface,0 ) :0 ; +for (vid = hw->mac.default_vid ?fm10k_find_next_vlan (interface,0 ) :1 ; vid <VLAN_N_VID ; vid =fm10k_find_next_vlan (interface, vid)) { hw->mac.ops.update_mc_addr (hw, glort, addr, vid, sync);
@@ -995,11 +995,8 @@ static void fm10k_set_rx_mode(struct net_device *dev) }/* synchronize all of the addresses */ -if (xcast_mode !=FM10K_XCAST_MODE_PROMISC ) { -__dev_uc_sync (dev, fm10k_uc_sync, fm10k_uc_unsync); -if (xcast_mode !=FM10K_XCAST_MODE_ALLMULTI ) -__dev_mc_sync (dev, fm10k_mc_sync, fm10k_mc_unsync); - } +__dev_uc_sync (dev, fm10k_uc_sync, fm10k_uc_unsync); +__dev_mc_sync (dev, fm10k_mc_sync, fm10k_mc_unsync);fm10k_mbx_unlock (interface); }
@@ -1037,7 +1034,7 @@ void fm10k_restore_rx_state(struct fm10k_intfc *interface) hw->mac.ops.update_vlan (hw,0 ,0 , true);/* update table with current entries */ -for (vid = hw->mac.default_vid ?fm10k_find_next_vlan (interface,0 ) :0 ; +for (vid = hw->mac.default_vid ?fm10k_find_next_vlan (interface,0 ) :1 ; vid <VLAN_N_VID ; vid =fm10k_find_next_vlan (interface, vid)) { hw->mac.ops.update_vlan (hw, vid,0 , true);
@@ -1049,11 +1046,8 @@ void fm10k_restore_rx_state(struct fm10k_intfc *interface) hw->mac.ops.update_xcast_mode (hw, glort, xcast_mode);/* synchronize all of the addresses */ -if (xcast_mode !=FM10K_XCAST_MODE_PROMISC ) { -__dev_uc_sync (netdev, fm10k_uc_sync, fm10k_uc_unsync); -if (xcast_mode !=FM10K_XCAST_MODE_ALLMULTI ) -__dev_mc_sync (netdev, fm10k_mc_sync, fm10k_mc_unsync); - } +__dev_uc_sync (netdev, fm10k_uc_sync, fm10k_uc_unsync); +__dev_mc_sync (netdev, fm10k_mc_sync, fm10k_mc_unsync);fm10k_mbx_unlock (interface);
Signature · 1 line
2.8.0.rc1.177.g5628860
Singh
PATCH 2/9 fm10k: Fix multicast mode sync issues
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Jacob Keller
Sent: Friday, April 1, 2016 4:18 PM
To: Intel Wired LAN <[email protected]>
Cc: Kwan, Ngai-mint <[email protected]>
Subject: [Intel-wired-lan] [PATCH v1 2/9] fm10k: Fix multicast mode sync issues
From: Ngai-Mint Kwan <[email protected]>
Multicast mode checking is no longer a requirement to perform unicast and multicast address syncs. Specifically, a device operating in promiscuous and/or all multicast mode is not excluded. The issue occurs when the netdev is pre-configured to either multicast mode and is enabled for the first time. The multicast-group table in the Switch Manager will be missing obvious multicast entries associated to this netdev.
Changes were also made to disallow unicast and multicast syncs with VLAN 0. The Switch Manager considers VLAN 0 to be an invalid entry. Requests with VLAN 0 by the netdev are only generated when the driver is freshly installed and the default VID is not set.
---
PATCH 3/9 fm10k: correctly handle LPORT_MAP error
In reply to Jacob KellerCurrently, any error responses from the switch manager after an LPORT_MAP request are silently ignored. At most the mailbox message will be reported as an error. This can result in unexpected behavior when the switch manager has configured a port with zero bandwidth. Add support for reading the fm10k_swapi_error structure from LPORT_MAP responses.
If the message contains the necessary TLV and has a non-zero error code, report link down, clear the dglort_map, and delay the next get_host_state call by a reasonable delay. Also log an error message indicating that the LPORT_MAP request failed.
The delay ensures preventing an interrupt storm on the switch manager, and reduces the number of mailbox messages we send in this scenario drastically.
--- drivers/net/ethernet/intel/fm10k/fm10k.h | 1 + drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 31 +++++++++++++++++++++++++++- drivers/net/ethernet/intel/fm10k/fm10k_pf.c | 2 ++ drivers/net/ethernet/intel/fm10k/fm10k_pf.h | 2 ++ 4 files changed, 35 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/fm10k/fm10k.h +1 -0
@@ -330,6 +330,7 @@ struct fm10k_intfc {unsigned long last_reset;unsigned long link_down_event;bool host_ready; +bool lport_map_failed;u32 reta[FM10K_RETA_SIZE ];u32 rssrk[FM10K_RSSRK_SIZE ];
drivers/net/ethernet/intel/fm10k/fm10k_pci.c +30 -1
@@ -1263,11 +1263,40 @@ static s32 fm10k_lport_map(struct fm10k_hw *hw, u32 **results,u32 dglort_map = hw->mac.dglort_map;s32 err; + interface = container_of(hw, struct fm10k_intfc, hw); + + err =fm10k_msg_err_pf (hw, results, mbx); +if (!err && hw->swapi.status) { +/* force link down for a reasonable delay */ + interface->link_down_event = jiffies + (2 *HZ ); +set_bit (__FM10K_LINK_DOWN, &interface->state); + +/* reset dglort_map back to no config */ + hw->mac.dglort_map =FM10K_DGLORTMAP_NONE ; + +fm10k_service_event_schedule (interface); + +/* prevent overloading kernel message buffer */ +if (interface->lport_map_failed) +return 0 ; + + interface->lport_map_failed = true; + +if (hw->swapi.status ==FM10K_MSG_ERR_PEP_NOT_SCHEDULED ) +dev_warn (&interface->pdev->dev, +"cannot obtain link because the host interface is configured for a PCIe host interface bandwidth of zero\n" ); +dev_warn (&interface->pdev->dev, +"request logical port map failed: %d\n" , + hw->swapi.status); + +return 0 ; + } + err =fm10k_msg_lport_map_pf (hw, results, mbx);if (err)return err; - interface = container_of(hw, struct fm10k_intfc, hw); + interface->lport_map_failed = false;/* we need to reset if port count was just updated */ if (dglort_map != hw->mac.dglort_map)
drivers/net/ethernet/intel/fm10k/fm10k_pf.c +2 -0
@@ -1620,6 +1620,8 @@ out:/* This structure defines the attibutes to be parsed below */ const struct fm10k_tlv_attr fm10k_lport_map_msg_attr[] = { +FM10K_TLV_ATTR_LE_STRUCT (FM10K_PF_ATTR_ID_ERR , +sizeof (struct fm10k_swapi_error )),FM10K_TLV_ATTR_U32 (FM10K_PF_ATTR_ID_LPORT_MAP ),FM10K_TLV_ATTR_LAST };
drivers/net/ethernet/intel/fm10k/fm10k_pf.h +2 -0
@@ -71,6 +71,8 @@ enum fm10k_pf_tlv_attr_id_v1 {#define FM10K_MSG_UPDATE_PVID_PVID_SHIFT 16#define FM10K_MSG_UPDATE_PVID_PVID_SIZE 16 +#define FM10K_MSG_ERR_PEP_NOT_SCHEDULED 280 +/* The following data structures are overlayed directly onto TLV mailbox * messages, and must not break 4 byte alignment. Ensure the structures line * up correctly as per their TLV definition.
Signature · 1 line
2.8.0.rc1.177.g5628860
Singh
PATCH 3/9 fm10k: correctly handle LPORT_MAP error
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Jacob Keller
Sent: Friday, April 1, 2016 4:18 PM
To: Intel Wired LAN <[email protected]>
Subject: [Intel-wired-lan] [PATCH v1 3/9] fm10k: correctly handle LPORT_MAP error
Currently, any error responses from the switch manager after an LPORT_MAP request are silently ignored. At most the mailbox message will be reported as an error. This can result in unexpected behavior when the switch manager has configured a port with zero bandwidth. Add support for reading the fm10k_swapi_error structure from LPORT_MAP responses.
If the message contains the necessary TLV and has a non-zero error code, report link down, clear the dglort_map, and delay the next get_host_state call by a reasonable delay. Also log an error message indicating that the LPORT_MAP request failed.
The delay ensures preventing an interrupt storm on the switch manager, and reduces the number of mailbox messages we send in this scenario drastically.
---
PATCH 4/9 fm10k: do not disable PCI device in fm10k_io_error_detected
In reply to Jacob Kellerfm10k_io_error_detected() does not need to call pci_disable_device(). In the cases where the reset needs to occur, the stack flow will result in calling fm10k_remove() which already disables the PCI device. If we leave the pci_disable_device(), we result in a warning about disabling an already disabled device.
Many PCI drivers do call pci_disable_device() in their .error_detected() routines, but it does not appear to be required. In addition, these drivers have a check "is_pci_enabled()" call in their remove routines, which is how they chose to handle the duplicate device disable.
This seems incorrect, since the PCI device structure is reference counted. It is very possible that the reference count for the PCI device could be greater than 1. In this case, you would remove the PCI device within the error_detected routine, reducing count to 1, then remove it again in the remove function, reducing it to zero. This would result in yet another disable somewhere else failing. Thus, we shouldn't be using is_pci_enabled() to check for this issue. Instead, just remove the extraneous pci_device_disable() found within the error_detected routine.
--- drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 2 -- 1 file changed, 2 deletions(-)
drivers/net/ethernet/intel/fm10k/fm10k_pci.c +0 -2
@@ -2207,8 +2207,6 @@ static pci_ers_result_t fm10k_io_error_detected(struct pci_dev *pdev,rtnl_unlock (); -pci_disable_device (pdev); -/* Request a slot reset. */ return PCI_ERS_RESULT_NEED_RESET ; }
Signature · 1 line
2.8.0.rc1.177.g5628860
Singh
PATCH 4/9 fm10k: do not disable PCI device in fm10k_io_error_detected
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Jacob Keller
Sent: Friday, April 1, 2016 4:18 PM
To: Intel Wired LAN <[email protected]>
Subject: [Intel-wired-lan] [PATCH v1 4/9] fm10k: do not disable PCI device in fm10k_io_error_detected
fm10k_io_error_detected() does not need to call pci_disable_device(). In the cases where the reset needs to occur, the stack flow will result in calling fm10k_remove() which already disables the PCI device. If we leave the pci_disable_device(), we result in a warning about disabling an already disabled device.
Many PCI drivers do call pci_disable_device() in their .error_detected() routines, but it does not appear to be required. In addition, these drivers have a check "is_pci_enabled()" call in their remove routines, which is how they chose to handle the duplicate device disable.
This seems incorrect, since the PCI device structure is reference counted. It is very possible that the reference count for the PCI device could be greater than 1. In this case, you would remove the PCI device within the error_detected routine, reducing count to 1, then remove it again in the remove function, reducing it to zero. This would result in yet another disable somewhere else failing. Thus, we shouldn't be using is_pci_enabled() to check for this issue. Instead, just remove the extraneous pci_device_disable() found within the error_detected routine.
---
PATCH 5/9 fm10k: fix documentation of fm10k_tlv_parse_attr
In reply to Jacob Kellerfm10k_tlv_parse_attr is supposed to return FM10K_NOT_IMPLEMENTED for any TLV who's attribute id lies outside the range of results. It does not do this today. In addition, the documentation does not indicate that other attributes which are not implemented for a given TLV will be silently ignored. Fix this. Clean up the logic so that we don't rely on the fact that FM10K_NOT_IMPLEMENTED is greater than zero, as this can easily cause confusion.
A future extension could look into some way of reporting unknown TLVs in order to make issues more easily discoverable. We can't just return FM10K_NOT_IMPLEMENTED here because we don't want to drop the entire message if it has an unknown TLV.
While here, update the copyright year.
--- drivers/net/ethernet/intel/fm10k/fm10k_tlv.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-)
drivers/net/ethernet/intel/fm10k/fm10k_tlv.c +10 -8
@@ -1,5 +1,5 @@/* Intel Ethernet Switch Host Interface Driver -* Copyright(c) 2013 - 2015 Intel Corporation. +* Copyright(c) 2013 - 2016 Intel Corporation. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License,
@@ -481,7 +481,8 @@ static s32 fm10k_tlv_attr_validate(u32 *attr,* up into an array of pointers stored in results. The function will * return FM10K_ERR_PARAM on any input or message error, * FM10K_NOT_IMPLEMENTED for any attribute that is outside of the array -* and 0 on success. +* and 0 on success. Any attributes not found in tlv_attr will be silently +* ignored. **/ static s32 fm10k_tlv_attr_parse (u32 *attr,u32 **results,const struct fm10k_tlv_attr *tlv_attr)
@@ -518,14 +519,15 @@ static s32 fm10k_tlv_attr_parse(u32 *attr, u32 **results,while (offset < len) { attr_id = *attr &FM10K_TLV_ID_MASK ; -if (attr_id <FM10K_TLV_RESULTS_MAX ) - err =fm10k_tlv_attr_validate (attr, tlv_attr); -else - err =FM10K_NOT_IMPLEMENTED ; +if (attr_id >=FM10K_TLV_RESULTS_MAX ) +return FM10K_NOT_IMPLEMENTED ; -if (err <0 ) + err =fm10k_tlv_attr_validate (attr, tlv_attr); +if (err ==FM10K_NOT_IMPLEMENTED ) + ;/* silently ignore non-implemented attributes */ +else if (err)return err; -if (!err) +else results[attr_id] = attr;/* update offset */
Signature · 1 line
2.8.0.rc1.177.g5628860
Singh
PATCH 5/9 fm10k: fix documentation of fm10k_tlv_parse_attr
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Jacob Keller
Sent: Friday, April 1, 2016 4:18 PM
To: Intel Wired LAN <[email protected]>
Subject: [Intel-wired-lan] [PATCH v1 5/9] fm10k: fix documentation of fm10k_tlv_parse_attr
fm10k_tlv_parse_attr is supposed to return FM10K_NOT_IMPLEMENTED for any TLV who's attribute id lies outside the range of results. It does not do this today. In addition, the documentation does not indicate that other attributes which are not implemented for a given TLV will be silently ignored. Fix this. Clean up the logic so that we don't rely on the fact that FM10K_NOT_IMPLEMENTED is greater than zero, as this can easily cause confusion.
A future extension could look into some way of reporting unknown TLVs in order to make issues more easily discoverable. We can't just return FM10K_NOT_IMPLEMENTED here because we don't want to drop the entire message if it has an unknown TLV.
While here, update the copyright year.
---
PATCH 6/9 fm10k: use 8bit notation instead of 10bit notation for diagram
In reply to Jacob KellerThe diagram represents bit layout of the multi-bit VLAN update message format. Typically these diagrams are drawn using some power of 2 as the base, to more easily grasp where fields split. Although the numbers above can make it somewhat easy to understand which bit you're looking at, it makes the break points not line up. Re-draw the numbers using base 8, and mark the bit values every 8 bits at the top. This should make it more easy to grasp the table quickly.
--- drivers/net/ethernet/intel/fm10k/fm10k_pf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/fm10k/fm10k_pf.c +2 -2
@@ -219,8 +219,8 @@ static s32 fm10k_update_vlan_pf(struct fm10k_hw *hw, u32 vid, u8 vsi, bool set)/* VLAN multi-bit write: * The multi-bit write has several parts to it. -* 3 2 1 0 -* 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 +* 24 16 8 0 +* 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * | RSVD0 | Length |C|RSVD0| VLAN ID | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Signature · 1 line
2.8.0.rc1.177.g5628860
Singh
PATCH 6/9 fm10k: use 8bit notation instead of 10bit notation for diagram
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Jacob Keller
Sent: Friday, April 1, 2016 4:18 PM
To: Intel Wired LAN <[email protected]>
Subject: [Intel-wired-lan] [PATCH v1 6/9] fm10k: use 8bit notation instead of 10bit notation for diagram
The diagram represents bit layout of the multi-bit VLAN update message format. Typically these diagrams are drawn using some power of 2 as the base, to more easily grasp where fields split. Although the numbers above can make it somewhat easy to understand which bit you're looking at, it makes the break points not line up. Re-draw the numbers using base 8, and mark the bit values every 8 bits at the top. This should make it more easy to grasp the table quickly.
---
PATCH 7/9 fm10k: use different name than FM10K_VLAN_CLEAR for override bit
In reply to Jacob KellerUse a new #define FM10K_VLAN_OVERRIDE even though we're using the exact same bit. The reason for this is clarity in the code, otherwise you can read FM10K_VLAN_CLEAR and think it should be removed. Also add a comment explaining why the FM10K_VLAN_OVERRIDE bit is set.
--- drivers/net/ethernet/intel/fm10k/fm10k_pf.c | 8 ++++++-- drivers/net/ethernet/intel/fm10k/fm10k_type.h | 1 + drivers/net/ethernet/intel/fm10k/fm10k_vf.c | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-)
drivers/net/ethernet/intel/fm10k/fm10k_pf.c +6 -2
@@ -864,9 +864,13 @@ static s32 fm10k_iov_assign_default_mac_vlan_pf(struct fm10k_hw *hw,fm10k_write_reg (hw,FM10K_TQMAP (qmap_idx),0 );fm10k_write_reg (hw,FM10K_TXDCTL (vf_q_idx),0 ); -/* determine correct default VLAN ID */ +/* Determine correct default VLAN ID. The FM10K_VLAN_OVERRIDE bit is +* used here to indicate to the VF that it will not have privilege to +* write VLAN_TABLE. All policy is enforced on the PF but this allows +* the VF to correctly report errors to userspace rqeuests. +*/ if (vf_info->pf_vid) - vf_vid = vf_info->pf_vid |FM10K_VLAN_CLEAR ; + vf_vid = vf_info->pf_vid |FM10K_VLAN_OVERRIDE ;else vf_vid = vf_info->sw_vid;
drivers/net/ethernet/intel/fm10k/fm10k_type.h +1 -0
@@ -350,6 +350,7 @@ struct fm10k_hw;#define FM10K_VLAN_TABLE_VSI_MAX 64#define FM10K_VLAN_LENGTH_SHIFT 16#define FM10K_VLAN_CLEAR BIT(15) +#define FM10K_VLAN_OVERRIDE FM10K_VLAN_CLEAR#define FM10K_VLAN_ALL \ ((FM10K_VLAN_TABLE_VID_MAX - 1) << FM10K_VLAN_LENGTH_SHIFT)
drivers/net/ethernet/intel/fm10k/fm10k_vf.c +1 -1
@@ -228,7 +228,7 @@ s32 fm10k_msg_mac_vlan_vf(struct fm10k_hw *hw, u32 **results,ether_addr_copy (hw->mac.perm_addr, perm_addr); hw->mac.default_vid = vid & (FM10K_VLAN_TABLE_VID_MAX -1 ); - hw->mac.vlan_override = !!(vid &FM10K_VLAN_CLEAR ); + hw->mac.vlan_override = !!(vid &FM10K_VLAN_OVERRIDE );return 0 ; }
Signature · 1 line
2.8.0.rc1.177.g5628860
Singh
PATCH 7/9 fm10k: use different name than FM10K_VLAN_CLEAR for override bit
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Jacob Keller
Sent: Friday, April 1, 2016 4:18 PM
To: Intel Wired LAN <[email protected]>
Subject: [Intel-wired-lan] [PATCH v1 7/9] fm10k: use different name than FM10K_VLAN_CLEAR for override bit
Use a new #define FM10K_VLAN_OVERRIDE even though we're using the exact same bit. The reason for this is clarity in the code, otherwise you can read FM10K_VLAN_CLEAR and think it should be removed. Also add a comment explaining why the FM10K_VLAN_OVERRIDE bit is set.
---
PATCH 8/9 fm10k: update comment regarding reserved bits check
In reply to Jacob KellerThe original comment may be read incorrectly as referring to checking the *entire* length is zero. However, it merely checks only the reserved bits of both length and reserved in a small amount of code. Update the comment to indicate this is a clever trick and clearly spell out that it only checks the reserve bits.
--- drivers/net/ethernet/intel/fm10k/fm10k_vf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/fm10k/fm10k_vf.c +1 -1
@@ -188,7 +188,7 @@ static s32 fm10k_update_vlan_vf(struct fm10k_hw *hw, u32 vid, u8 vsi, bool set)if (vsi)return FM10K_ERR_PARAM ; -/* verify upper 4 bits of vid and length are 0 */ +/* clever trick to verify reserved bits in both vid and length */ if ((vid <<16 | vid) >>28 )return FM10K_ERR_PARAM ;
Signature · 1 line
2.8.0.rc1.177.g5628860
Singh
PATCH 8/9 fm10k: update comment regarding reserved bits check
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Jacob Keller
Sent: Friday, April 1, 2016 4:18 PM
To: Intel Wired LAN <[email protected]>
Subject: [Intel-wired-lan] [PATCH v1 8/9] fm10k: update comment regarding reserved bits check
The original comment may be read incorrectly as referring to checking the *entire* length is zero. However, it merely checks only the reserved bits of both length and reserved in a small amount of code. Update the comment to indicate this is a clever trick and clearly spell out that it only checks the reserve bits.
---
PATCH 9/9 fm10k: Reset multicast mode when deleting lport
In reply to Jacob KellerFrom: Ngai-Mint Kwan <[email protected]>
Deleting lport when multicast mode is configured to FM10K_XCAST_MODE_ALLMULTI or FM10K_XCAST_MODE_PROMISC will result in generating orphaned multicast-group entries in the switch manager. Before deleting the lport, reset multicast mode to FM10K_XCAST_MODE_NONE to flush out these multicast-group entries.
--- drivers/net/ethernet/intel/fm10k/fm10k_pf.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/ethernet/intel/fm10k/fm10k_pf.c +4 -0
@@ -488,6 +488,10 @@ static s32 fm10k_update_lport_state_pf(struct fm10k_hw *hw, u16 glort,if (!fm10k_glort_valid_pf (hw, glort))return FM10K_ERR_PARAM ; +/* reset multicast mode if deleting lport */ +if (!enable) +fm10k_update_xcast_mode_pf (hw, glort,FM10K_XCAST_MODE_NONE ); +/* construct the lport message from the 2 pieces of data we have */ lport_msg = ((u32 )count <<16 ) | glort;
Signature · 1 line
2.8.0.rc1.177.g5628860
Singh
PATCH 9/9 fm10k: Reset multicast mode when deleting lport
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Jacob Keller
Sent: Friday, April 1, 2016 4:18 PM
To: Intel Wired LAN <[email protected]>
Cc: Kwan, Ngai-mint <[email protected]>
Subject: [Intel-wired-lan] [PATCH v1 9/9] fm10k: Reset multicast mode when deleting lport
From: Ngai-Mint Kwan <[email protected]>
Deleting lport when multicast mode is configured to FM10K_XCAST_MODE_ALLMULTI or FM10K_XCAST_MODE_PROMISC will result in generating orphaned multicast-group entries in the switch manager. Before deleting the lport, reset multicast mode to FM10K_XCAST_MODE_NONE to flush out these multicast-group entries.
---