[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 36/50] igb: Use UDP for RSS hash
|
From: |
Jason Wang |
|
Subject: |
[PULL 36/50] igb: Use UDP for RSS hash |
|
Date: |
Tue, 23 May 2023 15:32:24 +0800 |
From: Akihiko Odaki <akihiko.odaki@daynix.com>
e1000e does not support using UDP for RSS hash, but igb does.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Sriram Yagnaraman <sriram.yagnaraman@est.tech>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
hw/net/igb_core.c | 16 ++++++++++++++++
hw/net/igb_regs.h | 3 +++
2 files changed, 19 insertions(+)
diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c
index 6d55b43..41a2e5b 100644
--- a/hw/net/igb_core.c
+++ b/hw/net/igb_core.c
@@ -287,6 +287,11 @@ igb_rss_get_hash_type(IGBCore *core, struct NetRxPkt *pkt)
return E1000_MRQ_RSS_TYPE_IPV4TCP;
}
+ if (l4hdr_proto == ETH_L4_HDR_PROTO_UDP &&
+ (core->mac[MRQC] & E1000_MRQC_RSS_FIELD_IPV4_UDP)) {
+ return E1000_MRQ_RSS_TYPE_IPV4UDP;
+ }
+
if (E1000_MRQC_EN_IPV4(core->mac[MRQC])) {
return E1000_MRQ_RSS_TYPE_IPV4;
}
@@ -322,6 +327,11 @@ igb_rss_get_hash_type(IGBCore *core, struct NetRxPkt *pkt)
return E1000_MRQ_RSS_TYPE_IPV6TCPEX;
}
+ if (l4hdr_proto == ETH_L4_HDR_PROTO_UDP &&
+ (core->mac[MRQC] & E1000_MRQC_RSS_FIELD_IPV6_UDP)) {
+ return E1000_MRQ_RSS_TYPE_IPV6UDP;
+ }
+
if (E1000_MRQC_EN_IPV6EX(core->mac[MRQC])) {
return E1000_MRQ_RSS_TYPE_IPV6EX;
}
@@ -360,6 +370,12 @@ igb_rss_calc_hash(IGBCore *core, struct NetRxPkt *pkt,
E1000E_RSSInfo *info)
case E1000_MRQ_RSS_TYPE_IPV6EX:
type = NetPktRssIpV6Ex;
break;
+ case E1000_MRQ_RSS_TYPE_IPV4UDP:
+ type = NetPktRssIpV4Udp;
+ break;
+ case E1000_MRQ_RSS_TYPE_IPV6UDP:
+ type = NetPktRssIpV6Udp;
+ break;
default:
assert(false);
return 0;
diff --git a/hw/net/igb_regs.h b/hw/net/igb_regs.h
index eb995d8..e6ac26d 100644
--- a/hw/net/igb_regs.h
+++ b/hw/net/igb_regs.h
@@ -659,6 +659,9 @@ union e1000_adv_rx_desc {
#define E1000_RSS_QUEUE(reta, hash) (E1000_RETA_VAL(reta, hash) & 0x0F)
+#define E1000_MRQ_RSS_TYPE_IPV4UDP 7
+#define E1000_MRQ_RSS_TYPE_IPV6UDP 8
+
#define E1000_STATUS_IOV_MODE 0x00040000
#define E1000_STATUS_NUM_VFS_SHIFT 14
--
2.7.4
- [PULL 30/50] igb: Rename a variable in igb_receive_internal(), (continued)
- [PULL 30/50] igb: Rename a variable in igb_receive_internal(), Jason Wang, 2023/05/23
- [PULL 33/50] hw/net/net_rx_pkt: Enforce alignment for eth_header, Jason Wang, 2023/05/23
- [PULL 40/50] igb: Filter with the second VLAN tag for extended VLAN, Jason Wang, 2023/05/23
- [PULL 34/50] tests/qtest/libqos/igb: Set GPIE.Multiple_MSIX, Jason Wang, 2023/05/23
- [PULL 35/50] igb: Implement MSI-X single vector mode, Jason Wang, 2023/05/23
- [PULL 44/50] e1000e: Notify only new interrupts, Jason Wang, 2023/05/23
- [PULL 37/50] igb: Implement Rx SCTP CSO, Jason Wang, 2023/05/23
- [PULL 41/50] igb: Implement igb-specific oversize check, Jason Wang, 2023/05/23
- [PULL 43/50] igb: Implement Tx timestamp, Jason Wang, 2023/05/23
- [PULL 42/50] igb: Implement Rx PTP2 timestamp, Jason Wang, 2023/05/23
- [PULL 36/50] igb: Use UDP for RSS hash,
Jason Wang <=
- [PULL 38/50] igb: Implement Tx SCTP CSO, Jason Wang, 2023/05/23
- [PULL 39/50] igb: Strip the second VLAN tag for extended VLAN, Jason Wang, 2023/05/23
- [PULL 46/50] igb: Clear-on-read ICR when ICR.INTA is set, Jason Wang, 2023/05/23
- [PULL 50/50] rtl8139: fix large_send_mss divide-by-zero, Jason Wang, 2023/05/23
- [PULL 45/50] igb: Notify only new interrupts, Jason Wang, 2023/05/23
- [PULL 32/50] net/eth: Always add VLAN tag, Jason Wang, 2023/05/23
- [PULL 47/50] vmxnet3: Do not depend on PC, Jason Wang, 2023/05/23
- [PULL 48/50] MAINTAINERS: Add a reviewer for network packet abstractions, Jason Wang, 2023/05/23
- [PULL 49/50] docs/system/devices/igb: Note igb is tested for DPDK, Jason Wang, 2023/05/23
- Re: [PULL 00/50] Net patches, Richard Henderson, 2023/05/23