hyperv/hn: remember the channel pointer in struct hn_rx_ring

This will be used by the coming NIC SR-IOV patch.

Reviewed by:	sephe
Approved by:	sephe (mentor)
MFC after:	2 weeks
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8909
This commit is contained in:
dexuan 2017-01-24 09:09:53 +00:00
parent 7a203dab19
commit efde53fa0c
2 changed files with 3 additions and 0 deletions

View File

@ -4323,6 +4323,7 @@ hn_chan_attach(struct hn_softc *sc, struct vmbus_channel *chan)
KASSERT((rxr->hn_rx_flags & HN_RX_FLAG_ATTACHED) == 0,
("RX ring %d already attached", idx));
rxr->hn_rx_flags |= HN_RX_FLAG_ATTACHED;
rxr->hn_chan = chan;
if (bootverbose) {
if_printf(sc->hn_ifp, "link RX ring %d to chan%u\n",

View File

@ -85,6 +85,8 @@ struct hn_rx_ring {
void *hn_br; /* TX/RX bufring */
struct hyperv_dma hn_br_dma;
struct vmbus_channel *hn_chan;
} __aligned(CACHE_LINE_SIZE);
#define HN_TRUST_HCSUM_IP 0x0001