[qca-nss-drv]: Set queue mapping on virtual interface

Packets from host to NSS in host mode need to have
skb->queue_mapping set

Change-Id: I0e3b1c603276c90cfc04857040d65d944d7cb19c
Signed-off-by: Prathyusha Guduri <gprathyu@codeaurora.org>
diff --git a/nss_core.c b/nss_core.c
index 7687d3c..69bbff7 100644
--- a/nss_core.c
+++ b/nss_core.c
@@ -585,7 +585,8 @@
  */
 static inline void nss_core_handle_virt_if_pkt(struct nss_ctx_instance *nss_ctx,
 						unsigned int interface_num,
-						struct sk_buff *nbuf)
+						struct sk_buff *nbuf,
+						uint16_t qid)
 {
 	struct nss_top_instance *nss_top = nss_ctx->nss_top;
 	struct nss_subsystem_dataplane_register *subsys_dp_reg = &nss_ctx->subsys_dp_register[interface_num];
@@ -593,6 +594,8 @@
 
 	uint32_t xmit_ret;
 
+	uint16_t queue_offset = qid - NSS_IF_N2H_DATA_QUEUE_0;
+
 	NSS_PKT_STATS_INCREMENT(nss_ctx, &nss_top->stats_drv[NSS_STATS_DRV_RX_VIRTUAL]);
 
 	/*
@@ -636,6 +639,10 @@
 		return;
 	}
 
+	if (queue_offset < ndev->real_num_tx_queues) {
+		skb_set_queue_mapping(nbuf, queue_offset);
+	}
+
 	/*
 	 * Send the packet to virtual interface
 	 * NOTE: Invoking this will BYPASS any assigned QDisc - this is OKAY
@@ -802,7 +809,7 @@
 		nss_core_handle_bounced_pkt(nss_ctx, reg, nbuf);
 		break;
 	case N2H_BUFFER_PACKET_VIRTUAL:
-		nss_core_handle_virt_if_pkt(nss_ctx, interface_num, nbuf);
+		nss_core_handle_virt_if_pkt(nss_ctx, interface_num, nbuf, qid);
 		break;
 
 	case N2H_BUFFER_PACKET: