]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-5.1/ice-enable-lan_en-for-the-right-recipes.patch
fixes for 5.1
[thirdparty/kernel/stable-queue.git] / queue-5.1 / ice-enable-lan_en-for-the-right-recipes.patch
1 From 180c8602251ce8467cf542d8ab44b1c2dc3b7107 Mon Sep 17 00:00:00 2001
2 From: Yashaswini Raghuram Prathivadi Bhayankaram
3 <yashaswini.raghuram.prathivadi.bhayankaram@intel.com>
4 Date: Tue, 26 Feb 2019 16:35:15 -0800
5 Subject: ice: Enable LAN_EN for the right recipes
6
7 [ Upstream commit 277b3a4547b8afbbecdfc52fe7217f018de26c21 ]
8
9 In VEB mode, enable LAN_EN bit in the action fields for filter rules
10 corresponding to the right recipes.
11
12 Signed-off-by: Yashaswini Raghuram Prathivadi Bhayankaram <yashaswini.raghuram.prathivadi.bhayankaram@intel.com>
13 Reviewed-by: Bruce Allan <bruce.w.allan@intel.com>
14 Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
15 Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
16 Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
17 Signed-off-by: Sasha Levin <sashal@kernel.org>
18 ---
19 drivers/net/ethernet/intel/ice/ice_switch.c | 29 ++++++++++++++-------
20 1 file changed, 20 insertions(+), 9 deletions(-)
21
22 diff --git a/drivers/net/ethernet/intel/ice/ice_switch.c b/drivers/net/ethernet/intel/ice/ice_switch.c
23 index 09d1c314b68f..e40d5f34d59d 100644
24 --- a/drivers/net/ethernet/intel/ice/ice_switch.c
25 +++ b/drivers/net/ethernet/intel/ice/ice_switch.c
26 @@ -644,20 +644,31 @@ static void ice_fill_sw_info(struct ice_hw *hw, struct ice_fltr_info *fi)
27 fi->fltr_act == ICE_FWD_TO_Q ||
28 fi->fltr_act == ICE_FWD_TO_QGRP)) {
29 fi->lb_en = true;
30 - /* Do not set lan_en to TRUE if
31 + /* Set lan_en to TRUE if
32 * 1. The switch is a VEB AND
33 * 2
34 - * 2.1 The lookup is MAC with unicast addr for MAC, OR
35 - * 2.2 The lookup is MAC_VLAN with unicast addr for MAC
36 + * 2.1 The lookup is VLAN, OR
37 + * 2.2 The lookup is default port mode, OR
38 + * 2.3 The lookup is MAC with mcast or bcast addr for MAC, OR
39 + * 2.4 The lookup is MAC_VLAN with mcast or bcast addr for MAC.
40 *
41 - * In all other cases, the LAN enable has to be set to true.
42 + * OR
43 + *
44 + * The switch is a VEPA.
45 + *
46 + * In all other cases, the LAN enable has to be set to false.
47 */
48 - if (!(hw->evb_veb &&
49 - ((fi->lkup_type == ICE_SW_LKUP_MAC &&
50 - is_unicast_ether_addr(fi->l_data.mac.mac_addr)) ||
51 - (fi->lkup_type == ICE_SW_LKUP_MAC_VLAN &&
52 - is_unicast_ether_addr(fi->l_data.mac_vlan.mac_addr)))))
53 + if (hw->evb_veb) {
54 + if (fi->lkup_type == ICE_SW_LKUP_VLAN ||
55 + fi->lkup_type == ICE_SW_LKUP_DFLT ||
56 + (fi->lkup_type == ICE_SW_LKUP_MAC &&
57 + !is_unicast_ether_addr(fi->l_data.mac.mac_addr)) ||
58 + (fi->lkup_type == ICE_SW_LKUP_MAC_VLAN &&
59 + !is_unicast_ether_addr(fi->l_data.mac.mac_addr)))
60 + fi->lan_en = true;
61 + } else {
62 fi->lan_en = true;
63 + }
64 }
65 }
66
67 --
68 2.20.1
69