aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ice/ice_switch.c
diff options
context:
space:
mode:
authorYashaswini Raghuram Prathivadi Bhayankaram <yashaswini.raghuram.prathivadi.bhayankaram@intel.com>2019-02-26 19:35:15 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2019-03-22 11:19:17 -0400
commit277b3a4547b8afbbecdfc52fe7217f018de26c21 (patch)
tree7e65002ff474bc7d25c2008f6a41d771dd54c11b /drivers/net/ethernet/intel/ice/ice_switch.c
parent5eda8afd6bcc89d4e4aa5d56b5f54276f63158ae (diff)
ice: Enable LAN_EN for the right recipes
In VEB mode, enable LAN_EN bit in the action fields for filter rules corresponding to the right recipes. Signed-off-by: Yashaswini Raghuram Prathivadi Bhayankaram <yashaswini.raghuram.prathivadi.bhayankaram@intel.com> Reviewed-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_switch.c')
-rw-r--r--drivers/net/ethernet/intel/ice/ice_switch.c29
1 files changed, 20 insertions, 9 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_switch.c b/drivers/net/ethernet/intel/ice/ice_switch.c
index 64e9e0cb61ce..48864b59036a 100644
--- a/drivers/net/ethernet/intel/ice/ice_switch.c
+++ b/drivers/net/ethernet/intel/ice/ice_switch.c
@@ -644,20 +644,31 @@ static void ice_fill_sw_info(struct ice_hw *hw, struct ice_fltr_info *fi)
644 fi->fltr_act == ICE_FWD_TO_Q || 644 fi->fltr_act == ICE_FWD_TO_Q ||
645 fi->fltr_act == ICE_FWD_TO_QGRP)) { 645 fi->fltr_act == ICE_FWD_TO_QGRP)) {
646 fi->lb_en = true; 646 fi->lb_en = true;
647 /* Do not set lan_en to TRUE if 647 /* Set lan_en to TRUE if
648 * 1. The switch is a VEB AND 648 * 1. The switch is a VEB AND
649 * 2 649 * 2
650 * 2.1 The lookup is MAC with unicast addr for MAC, OR 650 * 2.1 The lookup is VLAN, OR
651 * 2.2 The lookup is MAC_VLAN with unicast addr for MAC 651 * 2.2 The lookup is default port mode, OR
652 * 2.3 The lookup is MAC with mcast or bcast addr for MAC, OR
653 * 2.4 The lookup is MAC_VLAN with mcast or bcast addr for MAC.
652 * 654 *
653 * In all other cases, the LAN enable has to be set to true. 655 * OR
656 *
657 * The switch is a VEPA.
658 *
659 * In all other cases, the LAN enable has to be set to false.
654 */ 660 */
655 if (!(hw->evb_veb && 661 if (hw->evb_veb) {
656 ((fi->lkup_type == ICE_SW_LKUP_MAC && 662 if (fi->lkup_type == ICE_SW_LKUP_VLAN ||
657 is_unicast_ether_addr(fi->l_data.mac.mac_addr)) || 663 fi->lkup_type == ICE_SW_LKUP_DFLT ||
658 (fi->lkup_type == ICE_SW_LKUP_MAC_VLAN && 664 (fi->lkup_type == ICE_SW_LKUP_MAC &&
659 is_unicast_ether_addr(fi->l_data.mac_vlan.mac_addr))))) 665 !is_unicast_ether_addr(fi->l_data.mac.mac_addr)) ||
666 (fi->lkup_type == ICE_SW_LKUP_MAC_VLAN &&
667 !is_unicast_ether_addr(fi->l_data.mac.mac_addr)))
668 fi->lan_en = true;
669 } else {
660 fi->lan_en = true; 670 fi->lan_en = true;
671 }
661 } 672 }
662} 673}
663 674