From d1f735fe0d6ad5cc277eed593ada03cc740b8112 Mon Sep 17 00:00:00 2001 From: Narayan Reddy Date: Thu, 10 Nov 2022 10:53:34 +0530 Subject: [PATCH] nvethernet: remove explicit addition of vlan prio Issue: skb_vlan_tag_get gives only the VLAN_ID for the earlier kernel versions (K4.9) and hence added a logic to take care of adding the VLAN priority explicitly and hence the VLAN priority getting modified in a newer kernel version where VLAN PRIO is already included Fix: remove the logic of explicit adding of VLAN priority. Bug 3788862 Bug 4088361 Change-Id: I0ac9ebfe21d3e696ac1b0f6ba540c010928f775f Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2806468 (cherry picked from commit 799b17fc35f3bc3ec75ea93452c03bd52ed28527) Signed-off-by: Narayan Reddy Signed-off-by: Revanth Kumar Uppala Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2895043 Tested-by: mobile promotions Reviewed-by: mobile promotions --- drivers/net/ethernet/nvidia/nvethernet/ether_linux.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/nvidia/nvethernet/ether_linux.c b/drivers/net/ethernet/nvidia/nvethernet/ether_linux.c index 87d89dca..cfe519f2 100644 --- a/drivers/net/ethernet/nvidia/nvethernet/ether_linux.c +++ b/drivers/net/ethernet/nvidia/nvethernet/ether_linux.c @@ -3156,7 +3156,6 @@ static int ether_tx_swcx_alloc(struct ether_priv_data *pdata, if (unlikely(skb_vlan_tag_present(skb))) { tx_pkt_cx->vtag_id = skb_vlan_tag_get(skb); - tx_pkt_cx->vtag_id |= (skb->priority << VLAN_PRIO_SHIFT); tx_pkt_cx->flags |= OSI_PKT_CX_VLAN; } @@ -3324,11 +3323,10 @@ static unsigned short ether_select_queue(struct net_device *dev, struct osi_core_priv_data *osi_core = pdata->osi_core; unsigned short txqueue_select = 0; unsigned int i, mtlq; - u16 vlan_tci; unsigned int priority = skb->priority; - if (vlan_get_tag(skb, &vlan_tci) == 0) { - priority = (vlan_tci & VLAN_PRIO_MASK) >> VLAN_PRIO_SHIFT; + if (skb_vlan_tag_present(skb)) { + priority = skb_vlan_tag_get_prio(skb); } for (i = 0; i < osi_core->num_mtl_queues; i++) {