Commit 8f2643bd authored by Haibin Lu's avatar Haibin Lu Committed by mufengyan
Browse files

UNIC: Fix the issue that RPS cannot hash sw irq to multiple cores.

driver inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IAKMX4


CVE: NA

-----------------------------------------------------------

In UBL support mode, the chip supports only the RSS feature
that uses dip as key. If the hash calculated by the hardware is
transmitted to the SKB, the software interrupt for receiving
packets can be hashed to only one core after the kernel RPS
feature is enabled.

This patch ensures that the hash value calculated by the
hardware is not set in the SKB when the driver constructs the
SKB in the case of UBL support. This can significantly improve
the hashing effect of the rps feature.

Fixes: 737ec46e ("UNIC: Adds the process of UNIC driver initializing")
Signed-off-by: default avatarHaibin Lu <luhaibin10@hisilicon.com>
parent a2960a09
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -4685,6 +4685,10 @@ static int hns3_handle_bdinfo(struct hns3_enet_ring *ring, struct sk_buff *skb)

	ring->tqp_vector->rx_group.total_bytes += len;

#ifdef CONFIG_HNS3_UBL
	if (hns3_ubl_supported(hns3_get_handle(netdev)))
		return 0;
#endif
	hns3_set_rx_skb_rss_type(ring, skb, le32_to_cpu(desc->rx.rss_hash),
				 l234info, ol_info);
	return 0;