summaryrefslogtreecommitdiffstats
path: root/sys/dev/ixl
diff options
context:
space:
mode:
authorhiren <hiren@FreeBSD.org>2015-04-24 23:26:44 +0000
committerhiren <hiren@FreeBSD.org>2015-04-24 23:26:44 +0000
commitb09afc6f3f088fa610e8e85066b0efc23f29fee1 (patch)
treede613f73923e17e263a2e466febe13b7dc30ceaf /sys/dev/ixl
parent0c3758f009b82212c1c351b8dabdbb5e6b28b85a (diff)
downloadFreeBSD-src-b09afc6f3f088fa610e8e85066b0efc23f29fee1.zip
FreeBSD-src-b09afc6f3f088fa610e8e85066b0efc23f29fee1.tar.gz
MFC r275358 r275483 r276982 - Removing M_FLOWID by hps@
r275358: Start process of removing the use of the deprecated "M_FLOWID" flag from the FreeBSD network code. The flag is still kept around in the "sys/mbuf.h" header file, but does no longer have any users. Instead the "m_pkthdr.rsstype" field in the mbuf structure is now used to decide the meaning of the "m_pkthdr.flowid" field. To modify the "m_pkthdr.rsstype" field please use the existing "M_HASHTYPE_XXX" macros as defined in the "sys/mbuf.h" header file. This patch introduces new behaviour in the transmit direction. Previously network drivers checked if "M_FLOWID" was set in "m_flags" before using the "m_pkthdr.flowid" field. This check has now now been replaced by checking if "M_HASHTYPE_GET(m)" is different from "M_HASHTYPE_NONE". In the future more hashtypes will be added, for example hashtypes for hardware dedicated flows. "M_HASHTYPE_OPAQUE" indicates that the "m_pkthdr.flowid" value is valid and has no particular type. This change removes the need for an "if" statement in TCP transmit code checking for the presence of a valid flowid value. The "if" statement mentioned above is now a direct variable assignment which is then later checked by the respective network drivers like before. r275483: Remove M_FLOWID from SCTP code. r276982: Remove no longer used "M_FLOWID" flag from mbuf.h and update the netisr manpage. Note: The FreeBSD version has been bumped. Reviewed by: hps, tuexen Sponsored by: Limelight Networks
Diffstat (limited to 'sys/dev/ixl')
-rwxr-xr-xsys/dev/ixl/ixl_txrx.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ixl/ixl_txrx.c b/sys/dev/ixl/ixl_txrx.c
index ea43af8..ea44ccb 100755
--- a/sys/dev/ixl/ixl_txrx.c
+++ b/sys/dev/ixl/ixl_txrx.c
@@ -66,8 +66,8 @@ ixl_mq_start(struct ifnet *ifp, struct mbuf *m)
struct tx_ring *txr;
int err, i;
- /* Which queue to use */
- if ((m->m_flags & M_FLOWID) != 0)
+ /* check if flowid is set */
+ if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE)
i = m->m_pkthdr.flowid % vsi->num_queues;
else
i = curcpu % vsi->num_queues;
@@ -1543,7 +1543,7 @@ ixl_rxeof(struct ixl_queue *que, int count)
if ((ifp->if_capenable & IFCAP_RXCSUM) != 0)
ixl_rx_checksum(sendmp, status, error, ptype);
sendmp->m_pkthdr.flowid = que->msix;
- sendmp->m_flags |= M_FLOWID;
+ M_HASHTYPE_SET(sendmp, M_HASHTYPE_OPAQUE);
}
next_desc:
bus_dmamap_sync(rxr->dma.tag, rxr->dma.map,
OpenPOWER on IntegriCloud