aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/vxge/vxge.c
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2014-12-01 11:45:24 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2014-12-01 11:45:24 +0000
commitc25290420ee7b9f4a875426380d8ad042a561b9c (patch)
treed86e98862d3f751374d30816df77d445c922050e /sys/dev/vxge/vxge.c
parent32dbae66199491ee1459130cd905c1eb6b02095e (diff)
downloadsrc-c25290420ee7b9f4a875426380d8ad042a561b9c.tar.gz
src-c25290420ee7b9f4a875426380d8ad042a561b9c.zip
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. Additional notes: - The SCTP code changes will be committed as a separate patch. - Removal of the "M_FLOWID" flag will also be done separately. - The FreeBSD version has been bumped. MFC after: 1 month Sponsored by: Mellanox Technologies
Notes
Notes: svn path=/head/; revision=275358
Diffstat (limited to 'sys/dev/vxge/vxge.c')
-rw-r--r--sys/dev/vxge/vxge.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/vxge/vxge.c b/sys/dev/vxge/vxge.c
index b89ba6cca51e..9a3cab654f95 100644
--- a/sys/dev/vxge/vxge.c
+++ b/sys/dev/vxge/vxge.c
@@ -660,7 +660,7 @@ vxge_mq_send(ifnet_t ifp, mbuf_t m_head)
if (vdev->config.tx_steering) {
i = vxge_vpath_get(vdev, m_head);
- } else if ((m_head->m_flags & M_FLOWID) != 0) {
+ } else if (M_HASHTYPE_GET(m_head) != M_HASHTYPE_NONE) {
i = m_head->m_pkthdr.flowid % vdev->no_of_vpath;
}
@@ -1070,7 +1070,7 @@ vxge_rx_compl(vxge_hal_vpath_h vpath_handle, vxge_hal_rxd_h rxdh,
vxge_rx_checksum(ext_info, mbuf_up);
#if __FreeBSD_version >= 800000
- mbuf_up->m_flags |= M_FLOWID;
+ M_HASHTYPE_SET(mbuf_up, M_HASHTYPE_OPAQUE);
mbuf_up->m_pkthdr.flowid = vpath->vp_index;
#endif
/* Post-Read sync for buffers */