Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177107385
D5488.1793810071.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D5488.1793810071.diff
View Options
Index: sys/dev/hyperv/netvsc/hv_net_vsc.h
===================================================================
--- sys/dev/hyperv/netvsc/hv_net_vsc.h
+++ sys/dev/hyperv/netvsc/hv_net_vsc.h
@@ -1000,10 +1000,11 @@
struct hn_rx_ring {
struct ifnet *hn_ifp;
- struct lro_ctrl hn_lro;
+ int hn_rx_idx;
/* Trust csum verification on host side */
int hn_trust_hcsum; /* HN_TRUST_HCSUM_ */
+ struct lro_ctrl hn_lro;
u_long hn_csum_ip;
u_long hn_csum_tcp;
Index: sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
===================================================================
--- sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
+++ sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
@@ -1287,6 +1287,9 @@
m_new->m_flags |= M_VLANTAG;
}
+ m_new->m_pkthdr.flowid = rxr->hn_rx_idx;
+ M_HASHTYPE_SET(m_new, M_HASHTYPE_OPAQUE);
+
/*
* Note: Moved RX completion back to hv_nv_on_receive() so all
* messages (not just data messages) will trigger a response.
@@ -2037,6 +2040,7 @@
if (hn_trust_hostip)
rxr->hn_trust_hcsum |= HN_TRUST_HCSUM_IP;
rxr->hn_ifp = sc->hn_ifp;
+ rxr->hn_rx_idx = i;
/*
* Initialize LRO.
@@ -2567,10 +2571,14 @@
{
struct hn_softc *sc = ifp->if_softc;
struct hn_tx_ring *txr;
- int error;
+ int error, idx = 0;
- /* TODO: vRSS, TX ring selection */
- txr = &sc->hn_tx_ring[0];
+ /*
+ * Select the TX ring based on flowid
+ */
+ if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE)
+ idx = m->m_pkthdr.flowid % sc->hn_tx_ring_cnt;
+ txr = &sc->hn_tx_ring[idx];
error = drbr_enqueue(ifp, txr->hn_mbuf_br, m);
if (error)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 4, 4:34 PM (14 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41442562
Default Alt Text
D5488.1793810071.diff (1 KB)
Attached To
Mode
D5488: hyperv/hn: Utilize mbuf flowid
Attached
Detach File
Event Timeline