svn commit: r281955 - in stable/10: share/man/man9 sys/dev/bxe sys/dev/cxgb sys/dev/cxgbe sys/dev/e1000 sys/dev/ixgbe sys/dev/ixl sys/dev/mxge sys/dev/netmap sys/dev/oce sys/dev/qlxgbe sys/dev/qlxg...
Hiren Panchasara
hiren at FreeBSD.org
Fri Apr 24 23:26:54 UTC 2015
Author: hiren
Date: Fri Apr 24 23:26:44 2015
New Revision: 281955
URL: https://svnweb.freebsd.org/changeset/base/281955
Log:
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
Modified:
stable/10/share/man/man9/netisr.9
stable/10/sys/dev/bxe/bxe.c
stable/10/sys/dev/cxgb/cxgb_sge.c
stable/10/sys/dev/cxgbe/t4_main.c
stable/10/sys/dev/cxgbe/t4_sge.c
stable/10/sys/dev/e1000/if_igb.c
stable/10/sys/dev/ixgbe/ixgbe.c
stable/10/sys/dev/ixgbe/ixv.c
stable/10/sys/dev/ixl/ixl_txrx.c
stable/10/sys/dev/mxge/if_mxge.c
stable/10/sys/dev/netmap/netmap_freebsd.c
stable/10/sys/dev/oce/oce_if.c
stable/10/sys/dev/qlxgbe/ql_isr.c
stable/10/sys/dev/qlxgbe/ql_os.c
stable/10/sys/dev/qlxge/qls_isr.c
stable/10/sys/dev/qlxge/qls_os.c
stable/10/sys/dev/sfxge/sfxge_rx.c
stable/10/sys/dev/sfxge/sfxge_tx.c
stable/10/sys/dev/virtio/network/if_vtnet.c
stable/10/sys/dev/vmware/vmxnet3/if_vmx.c
stable/10/sys/dev/vxge/vxge.c
stable/10/sys/net/flowtable.c
stable/10/sys/net/ieee8023ad_lacp.c
stable/10/sys/net/if_lagg.c
stable/10/sys/net/if_lagg.h
stable/10/sys/net/netisr.c
stable/10/sys/netinet/in_pcb.h
stable/10/sys/netinet/ip_output.c
stable/10/sys/netinet/sctp_indata.c
stable/10/sys/netinet/sctp_input.c
stable/10/sys/netinet/sctp_output.c
stable/10/sys/netinet/sctp_pcb.c
stable/10/sys/netinet/sctp_structs.h
stable/10/sys/netinet/sctputil.c
stable/10/sys/netinet/tcp_input.c
stable/10/sys/netinet/tcp_syncache.c
stable/10/sys/netinet6/sctp6_usrreq.c
stable/10/sys/ofed/drivers/net/mlx4/en_rx.c
stable/10/sys/ofed/drivers/net/mlx4/en_tx.c
stable/10/sys/sys/mbuf.h
stable/10/sys/sys/param.h
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/share/man/man9/netisr.9
==============================================================================
--- stable/10/share/man/man9/netisr.9 Fri Apr 24 22:18:50 2015 (r281954)
+++ stable/10/share/man/man9/netisr.9 Fri Apr 24 23:26:44 2015 (r281955)
@@ -27,7 +27,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd February 22, 2010
+.Dd January 11, 2015
.Dt NETISR 9
.Os
.Sh NAME
@@ -126,13 +126,13 @@ MIB names, so should not contain whitesp
Protocol handler function that will be invoked on each packet received for
the protocol.
.It Vt netisr_m2flow_t Va nh_m2flow
-Optional protocol function to generate a flow ID and set
-.Dv M_FLOWID
-for packets that do not enter
+Optional protocol function to generate a flow ID and set a valid
+hashtype for packets that enter the
.Nm
with
-.Dv M_FLOWID
-defined.
+.Dv M_HASHTYPE_GET(m)
+equal to
+.Dv M_HASHTYPE_NONE .
Will be used only with
.Dv NETISR_POLICY_FLOW .
.It Vt netisr_m2cpuid_t Va nh_m2cpuid
Modified: stable/10/sys/dev/bxe/bxe.c
==============================================================================
--- stable/10/sys/dev/bxe/bxe.c Fri Apr 24 22:18:50 2015 (r281954)
+++ stable/10/sys/dev/bxe/bxe.c Fri Apr 24 23:26:44 2015 (r281955)
@@ -3230,7 +3230,7 @@ bxe_tpa_stop(struct bxe_softc *
#if __FreeBSD_version >= 800000
/* specify what RSS queue was used for this flow */
m->m_pkthdr.flowid = fp->index;
- m->m_flags |= M_FLOWID;
+ M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE);
#endif
ifp->if_ipackets++;
@@ -3469,7 +3469,7 @@ bxe_rxeof(struct bxe_softc *sc,
#if __FreeBSD_version >= 800000
/* specify what RSS queue was used for this flow */
m->m_pkthdr.flowid = fp->index;
- m->m_flags |= M_FLOWID;
+ M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE);
#endif
next_rx:
@@ -6051,10 +6051,9 @@ bxe_tx_mq_start(struct ifnet *ifp,
fp_index = 0; /* default is the first queue */
- /* change the queue if using flow ID */
- if ((m->m_flags & M_FLOWID) != 0) {
+ /* check if flowid is set */
+ if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE)
fp_index = (m->m_pkthdr.flowid % sc->num_queues);
- }
fp = &sc->fp[fp_index];
Modified: stable/10/sys/dev/cxgb/cxgb_sge.c
==============================================================================
--- stable/10/sys/dev/cxgb/cxgb_sge.c Fri Apr 24 22:18:50 2015 (r281954)
+++ stable/10/sys/dev/cxgb/cxgb_sge.c Fri Apr 24 23:26:44 2015 (r281955)
@@ -1738,8 +1738,9 @@ cxgb_transmit(struct ifnet *ifp, struct
m_freem(m);
return (0);
}
-
- if (m->m_flags & M_FLOWID)
+
+ /* check if flowid is set */
+ if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE)
qidx = (m->m_pkthdr.flowid % pi->nqsets) + pi->first_qset;
qs = &pi->adapter->sge.qs[qidx];
@@ -2904,9 +2905,10 @@ process_responses(adapter_t *adap, struc
eop = get_packet(adap, drop_thresh, qs, mh, r);
if (eop) {
- if (r->rss_hdr.hash_type && !adap->timestamp)
- mh->mh_head->m_flags |= M_FLOWID;
- mh->mh_head->m_pkthdr.flowid = rss_hash;
+ if (r->rss_hdr.hash_type && !adap->timestamp) {
+ M_HASHTYPE_SET(mh->mh_head, M_HASHTYPE_OPAQUE);
+ mh->mh_head->m_pkthdr.flowid = rss_hash;
+ }
}
ethpad = 2;
Modified: stable/10/sys/dev/cxgbe/t4_main.c
==============================================================================
--- stable/10/sys/dev/cxgbe/t4_main.c Fri Apr 24 22:18:50 2015 (r281954)
+++ stable/10/sys/dev/cxgbe/t4_main.c Fri Apr 24 23:26:44 2015 (r281955)
@@ -1392,7 +1392,8 @@ cxgbe_transmit(struct ifnet *ifp, struct
return (ENETDOWN);
}
- if (m->m_flags & M_FLOWID)
+ /* check if flowid is set */
+ if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE)
txq += ((m->m_pkthdr.flowid % (pi->ntxq - pi->rsrv_noflowq))
+ pi->rsrv_noflowq);
br = txq->br;
Modified: stable/10/sys/dev/cxgbe/t4_sge.c
==============================================================================
--- stable/10/sys/dev/cxgbe/t4_sge.c Fri Apr 24 22:18:50 2015 (r281954)
+++ stable/10/sys/dev/cxgbe/t4_sge.c Fri Apr 24 23:26:44 2015 (r281955)
@@ -1742,7 +1742,7 @@ t4_eth_rx(struct sge_iq *iq, const struc
m0->m_data += fl_pktshift;
m0->m_pkthdr.rcvif = ifp;
- m0->m_flags |= M_FLOWID;
+ M_HASHTYPE_SET(m0, M_HASHTYPE_OPAQUE);
m0->m_pkthdr.flowid = be32toh(rss->hash_val);
if (cpl->csum_calc && !cpl->err_vec) {
Modified: stable/10/sys/dev/e1000/if_igb.c
==============================================================================
--- stable/10/sys/dev/e1000/if_igb.c Fri Apr 24 22:18:50 2015 (r281954)
+++ stable/10/sys/dev/e1000/if_igb.c Fri Apr 24 23:26:44 2015 (r281955)
@@ -977,7 +977,7 @@ igb_mq_start(struct ifnet *ifp, struct m
int i, err = 0;
/* Which queue to use */
- if ((m->m_flags & M_FLOWID) != 0)
+ if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE)
i = m->m_pkthdr.flowid % adapter->num_queues;
else
i = curcpu % adapter->num_queues;
@@ -4972,7 +4972,7 @@ igb_rxeof(struct igb_queue *que, int cou
}
#ifndef IGB_LEGACY_TX
rxr->fmp->m_pkthdr.flowid = que->msix;
- rxr->fmp->m_flags |= M_FLOWID;
+ M_HASHTYPE_SET(rxr->fmp, M_HASHTYPE_OPAQUE);
#endif
sendmp = rxr->fmp;
/* Make sure to set M_PKTHDR. */
Modified: stable/10/sys/dev/ixgbe/ixgbe.c
==============================================================================
--- stable/10/sys/dev/ixgbe/ixgbe.c Fri Apr 24 22:18:50 2015 (r281954)
+++ stable/10/sys/dev/ixgbe/ixgbe.c Fri Apr 24 23:26:44 2015 (r281955)
@@ -819,7 +819,7 @@ ixgbe_mq_start(struct ifnet *ifp, struct
int i, err = 0;
/* Which queue to use */
- if ((m->m_flags & M_FLOWID) != 0)
+ if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE)
i = m->m_pkthdr.flowid % adapter->num_queues;
else
i = curcpu % adapter->num_queues;
@@ -4583,7 +4583,7 @@ ixgbe_rxeof(struct ix_queue *que)
ixgbe_rx_checksum(staterr, sendmp, ptype);
#if __FreeBSD_version >= 800000
sendmp->m_pkthdr.flowid = que->msix;
- sendmp->m_flags |= M_FLOWID;
+ M_HASHTYPE_SET(sendmp, M_HASHTYPE_OPAQUE);
#endif
}
next_desc:
Modified: stable/10/sys/dev/ixgbe/ixv.c
==============================================================================
--- stable/10/sys/dev/ixgbe/ixv.c Fri Apr 24 22:18:50 2015 (r281954)
+++ stable/10/sys/dev/ixgbe/ixv.c Fri Apr 24 23:26:44 2015 (r281955)
@@ -580,7 +580,7 @@ ixv_mq_start(struct ifnet *ifp, struct m
int i = 0, err = 0;
/* Which queue to use */
- if ((m->m_flags & M_FLOWID) != 0)
+ if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE)
i = m->m_pkthdr.flowid % adapter->num_queues;
txr = &adapter->tx_rings[i];
@@ -3465,7 +3465,7 @@ ixv_rxeof(struct ix_queue *que, int coun
ixv_rx_checksum(staterr, sendmp, ptype);
#if __FreeBSD_version >= 800000
sendmp->m_pkthdr.flowid = que->msix;
- sendmp->m_flags |= M_FLOWID;
+ M_HASHTYPE_SET(sendmp, M_HASHTYPE_OPAQUE);
#endif
}
next_desc:
Modified: stable/10/sys/dev/ixl/ixl_txrx.c
==============================================================================
--- stable/10/sys/dev/ixl/ixl_txrx.c Fri Apr 24 22:18:50 2015 (r281954)
+++ stable/10/sys/dev/ixl/ixl_txrx.c Fri Apr 24 23:26:44 2015 (r281955)
@@ -66,8 +66,8 @@ ixl_mq_start(struct ifnet *ifp, struct 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 cou
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,
Modified: stable/10/sys/dev/mxge/if_mxge.c
==============================================================================
--- stable/10/sys/dev/mxge/if_mxge.c Fri Apr 24 22:18:50 2015 (r281954)
+++ stable/10/sys/dev/mxge/if_mxge.c Fri Apr 24 23:26:44 2015 (r281955)
@@ -2718,7 +2718,7 @@ mxge_rx_done_big(struct mxge_slice_state
/* flowid only valid if RSS hashing is enabled */
if (sc->num_slices > 1) {
m->m_pkthdr.flowid = (ss - sc->ss);
- m->m_flags |= M_FLOWID;
+ M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE);
}
/* pass the frame up the stack */
(*ifp->if_input)(ifp, m);
@@ -2786,7 +2786,7 @@ mxge_rx_done_small(struct mxge_slice_sta
/* flowid only valid if RSS hashing is enabled */
if (sc->num_slices > 1) {
m->m_pkthdr.flowid = (ss - sc->ss);
- m->m_flags |= M_FLOWID;
+ M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE);
}
/* pass the frame up the stack */
(*ifp->if_input)(ifp, m);
Modified: stable/10/sys/dev/netmap/netmap_freebsd.c
==============================================================================
--- stable/10/sys/dev/netmap/netmap_freebsd.c Fri Apr 24 22:18:50 2015 (r281954)
+++ stable/10/sys/dev/netmap/netmap_freebsd.c Fri Apr 24 23:26:44 2015 (r281955)
@@ -204,7 +204,7 @@ netmap_catch_tx(struct netmap_generic_ad
* of the transmission does not consume resources.
*
* On FreeBSD, and on multiqueue cards, we can force the queue using
- * if ((m->m_flags & M_FLOWID) != 0)
+ * if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE)
* i = m->m_pkthdr.flowid % adapter->num_queues;
* else
* i = curcpu % adapter->num_queues;
@@ -240,7 +240,7 @@ generic_xmit_frame(struct ifnet *ifp, st
m->m_len = m->m_pkthdr.len = len;
// inc refcount. All ours, we could skip the atomic
atomic_fetchadd_int(PNT_MBUF_REFCNT(m), 1);
- m->m_flags |= M_FLOWID;
+ M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE);
m->m_pkthdr.flowid = ring_nr;
m->m_pkthdr.rcvif = ifp; /* used for tx notification */
ret = NA(ifp)->if_transmit(ifp, m);
Modified: stable/10/sys/dev/oce/oce_if.c
==============================================================================
--- stable/10/sys/dev/oce/oce_if.c Fri Apr 24 22:18:50 2015 (r281954)
+++ stable/10/sys/dev/oce/oce_if.c Fri Apr 24 23:26:44 2015 (r281955)
@@ -563,7 +563,7 @@ oce_multiq_start(struct ifnet *ifp, stru
int queue_index = 0;
int status = 0;
- if ((m->m_flags & M_FLOWID) != 0)
+ if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE)
queue_index = m->m_pkthdr.flowid % sc->nwqs;
wq = sc->wq[queue_index];
@@ -1374,7 +1374,7 @@ oce_rx(struct oce_rq *rq, uint32_t rqe_i
m->m_pkthdr.flowid = (rq->queue_index - 1);
else
m->m_pkthdr.flowid = rq->queue_index;
- m->m_flags |= M_FLOWID;
+ M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE);
#endif
/* This deternies if vlan tag is Valid */
if (oce_cqe_vtp_valid(sc, cqe)) {
Modified: stable/10/sys/dev/qlxgbe/ql_isr.c
==============================================================================
--- stable/10/sys/dev/qlxgbe/ql_isr.c Fri Apr 24 22:18:50 2015 (r281954)
+++ stable/10/sys/dev/qlxgbe/ql_isr.c Fri Apr 24 23:26:44 2015 (r281955)
@@ -159,7 +159,7 @@ qla_rx_intr(qla_host_t *ha, qla_sgl_rcv_
ifp->if_ipackets++;
mpf->m_pkthdr.flowid = sgc->rss_hash;
- mpf->m_flags |= M_FLOWID;
+ M_HASHTYPE_SET(mpf, M_HASHTYPE_OPAQUE);
(*ifp->if_input)(ifp, mpf);
@@ -324,7 +324,7 @@ qla_lro_intr(qla_host_t *ha, qla_sgl_lro
mpf->m_pkthdr.csum_data = 0xFFFF;
mpf->m_pkthdr.flowid = sgc->rss_hash;
- mpf->m_flags |= M_FLOWID;
+ M_HASHTYPE_SET(mpf, M_HASHTYPE_OPAQUE);
ifp->if_ipackets++;
Modified: stable/10/sys/dev/qlxgbe/ql_os.c
==============================================================================
--- stable/10/sys/dev/qlxgbe/ql_os.c Fri Apr 24 22:18:50 2015 (r281954)
+++ stable/10/sys/dev/qlxgbe/ql_os.c Fri Apr 24 23:26:44 2015 (r281955)
@@ -1145,7 +1145,8 @@ qla_send(qla_host_t *ha, struct mbuf **m
QL_DPRINT8(ha, (ha->pci_dev, "%s: enter\n", __func__));
- if (m_head->m_flags & M_FLOWID)
+ /* check if flowid is set */
+ if (M_HASHTYPE_GET(m_head) != M_HASHTYPE_NONE)
txr_idx = m_head->m_pkthdr.flowid & (ha->hw.num_tx_rings - 1);
tx_idx = ha->hw.tx_cntxt[txr_idx].txr_next;
Modified: stable/10/sys/dev/qlxge/qls_isr.c
==============================================================================
--- stable/10/sys/dev/qlxge/qls_isr.c Fri Apr 24 22:18:50 2015 (r281954)
+++ stable/10/sys/dev/qlxge/qls_isr.c Fri Apr 24 23:26:44 2015 (r281955)
@@ -190,7 +190,7 @@ qls_rx_comp(qla_host_t *ha, uint32_t rxr
if ((cq_e->flags1 & Q81_RX_FLAGS1_RSS_MATCH_MASK)) {
rxr->rss_int++;
mp->m_pkthdr.flowid = cq_e->rss;
- mp->m_flags |= M_FLOWID;
+ M_HASHTYPE_SET(mp, M_HASHTYPE_OPAQUE);
}
if (cq_e->flags0 & (Q81_RX_FLAGS0_TE |
Q81_RX_FLAGS0_NU | Q81_RX_FLAGS0_IE)) {
Modified: stable/10/sys/dev/qlxge/qls_os.c
==============================================================================
--- stable/10/sys/dev/qlxge/qls_os.c Fri Apr 24 22:18:50 2015 (r281954)
+++ stable/10/sys/dev/qlxge/qls_os.c Fri Apr 24 23:26:44 2015 (r281955)
@@ -1141,7 +1141,8 @@ qls_send(qla_host_t *ha, struct mbuf **m
QL_DPRINT8((ha->pci_dev, "%s: enter\n", __func__));
- if (m_head->m_flags & M_FLOWID)
+ /* check if flowid is set */
+ if (M_HASHTYPE_GET(m_head) != M_HASHTYPE_NONE)
txr_idx = m_head->m_pkthdr.flowid & (ha->num_tx_rings - 1);
tx_idx = ha->tx_ring[txr_idx].txr_next;
Modified: stable/10/sys/dev/sfxge/sfxge_rx.c
==============================================================================
--- stable/10/sys/dev/sfxge/sfxge_rx.c Fri Apr 24 22:18:50 2015 (r281954)
+++ stable/10/sys/dev/sfxge/sfxge_rx.c Fri Apr 24 23:26:44 2015 (r281955)
@@ -334,7 +334,7 @@ sfxge_rx_deliver(struct sfxge_softc *sc,
if (rx_desc->flags & EFX_PKT_TCP) {
m->m_pkthdr.flowid = EFX_RX_HASH_VALUE(EFX_RX_HASHALG_TOEPLITZ,
mtod(m, uint8_t *));
- m->m_flags |= M_FLOWID;
+ M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE);
}
m->m_data += sc->rx_prefix_size;
m->m_len = rx_desc->size - sc->rx_prefix_size;
@@ -385,7 +385,7 @@ sfxge_lro_deliver(struct sfxge_lro_state
}
m->m_pkthdr.flowid = c->conn_hash;
- m->m_flags |= M_FLOWID;
+ M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE);
m->m_pkthdr.csum_flags = csum_flags;
__sfxge_rx_deliver(sc, m);
Modified: stable/10/sys/dev/sfxge/sfxge_tx.c
==============================================================================
--- stable/10/sys/dev/sfxge/sfxge_tx.c Fri Apr 24 22:18:50 2015 (r281954)
+++ stable/10/sys/dev/sfxge/sfxge_tx.c Fri Apr 24 23:26:44 2015 (r281955)
@@ -702,7 +702,8 @@ sfxge_if_transmit(struct ifnet *ifp, str
if (m->m_pkthdr.csum_flags & (CSUM_DELAY_DATA | CSUM_TSO)) {
int index = 0;
- if (m->m_flags & M_FLOWID) {
+ /* check if flowid is set */
+ if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) {
uint32_t hash = m->m_pkthdr.flowid;
index = sc->rx_indir_table[hash % SFXGE_RX_SCALE_MAX];
Modified: stable/10/sys/dev/virtio/network/if_vtnet.c
==============================================================================
--- stable/10/sys/dev/virtio/network/if_vtnet.c Fri Apr 24 22:18:50 2015 (r281954)
+++ stable/10/sys/dev/virtio/network/if_vtnet.c Fri Apr 24 23:26:44 2015 (r281955)
@@ -1703,7 +1703,7 @@ vtnet_rxq_input(struct vtnet_rxq *rxq, s
}
m->m_pkthdr.flowid = rxq->vtnrx_id;
- m->m_flags |= M_FLOWID;
+ M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE);
/*
* BMV: FreeBSD does not have the UNNECESSARY and PARTIAL checksum
@@ -2349,7 +2349,8 @@ vtnet_txq_mq_start(struct ifnet *ifp, st
sc = ifp->if_softc;
npairs = sc->vtnet_act_vq_pairs;
- if (m->m_flags & M_FLOWID)
+ /* check if flowid is set */
+ if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE)
i = m->m_pkthdr.flowid % npairs;
else
i = curcpu % npairs;
Modified: stable/10/sys/dev/vmware/vmxnet3/if_vmx.c
==============================================================================
--- stable/10/sys/dev/vmware/vmxnet3/if_vmx.c Fri Apr 24 22:18:50 2015 (r281954)
+++ stable/10/sys/dev/vmware/vmxnet3/if_vmx.c Fri Apr 24 23:26:44 2015 (r281955)
@@ -2059,7 +2059,7 @@ vmxnet3_rxq_input(struct vmxnet3_rxqueue
}
#else
m->m_pkthdr.flowid = rxq->vxrxq_id;
- m->m_flags |= M_FLOWID;
+ M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE);
#endif
if (!rxcd->no_csum)
@@ -3002,7 +3002,8 @@ vmxnet3_txq_mq_start(struct ifnet *ifp,
sc = ifp->if_softc;
ntxq = sc->vmx_ntxqueues;
- if (m->m_flags & M_FLOWID)
+ /* check if flowid is set */
+ if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE)
i = m->m_pkthdr.flowid % ntxq;
else
i = curcpu % ntxq;
Modified: stable/10/sys/dev/vxge/vxge.c
==============================================================================
--- stable/10/sys/dev/vxge/vxge.c Fri Apr 24 22:18:50 2015 (r281954)
+++ stable/10/sys/dev/vxge/vxge.c Fri Apr 24 23:26:44 2015 (r281955)
@@ -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_han
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 */
Modified: stable/10/sys/net/flowtable.c
==============================================================================
--- stable/10/sys/net/flowtable.c Fri Apr 24 22:18:50 2015 (r281954)
+++ stable/10/sys/net/flowtable.c Fri Apr 24 23:26:44 2015 (r281955)
@@ -688,8 +688,8 @@ flowtable_lookup(sa_family_t sa, struct
if (fle == NULL)
return (EHOSTUNREACH);
- if (!(m->m_flags & M_FLOWID)) {
- m->m_flags |= M_FLOWID;
+ if (M_HASHTYPE_GET(m) == M_HASHTYPE_NONE) {
+ M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE);
m->m_pkthdr.flowid = fle->f_hash;
}
Modified: stable/10/sys/net/ieee8023ad_lacp.c
==============================================================================
--- stable/10/sys/net/ieee8023ad_lacp.c Fri Apr 24 22:18:50 2015 (r281954)
+++ stable/10/sys/net/ieee8023ad_lacp.c Fri Apr 24 23:26:44 2015 (r281955)
@@ -883,7 +883,8 @@ lacp_select_tx_port(struct lagg_softc *s
return (NULL);
}
- if (sc->use_flowid && (m->m_flags & M_FLOWID))
+ if (sc->use_flowid &&
+ M_HASHTYPE_GET(m) != M_HASHTYPE_NONE)
hash = m->m_pkthdr.flowid >> sc->flowid_shift;
else
hash = lagg_hashmbuf(sc, m, lsc->lsc_hashkey);
Modified: stable/10/sys/net/if_lagg.c
==============================================================================
--- stable/10/sys/net/if_lagg.c Fri Apr 24 22:18:50 2015 (r281954)
+++ stable/10/sys/net/if_lagg.c Fri Apr 24 23:26:44 2015 (r281955)
@@ -179,12 +179,12 @@ static int lagg_failover_rx_all = 0; /*
SYSCTL_INT(_net_link_lagg, OID_AUTO, failover_rx_all, CTLFLAG_RW,
&lagg_failover_rx_all, 0,
"Accept input from any interface in a failover lagg");
-static int def_use_flowid = 1; /* Default value for using M_FLOWID */
+static int def_use_flowid = 1; /* Default value for using flowid */
TUNABLE_INT("net.link.lagg.default_use_flowid", &def_use_flowid);
SYSCTL_INT(_net_link_lagg, OID_AUTO, default_use_flowid, CTLFLAG_RW,
&def_use_flowid, 0,
"Default setting for using flow id for load sharing");
-static int def_flowid_shift = 16; /* Default value for using M_FLOWID */
+static int def_flowid_shift = 16; /* Default value for using flow shift */
TUNABLE_INT("net.link.lagg.default_flowid_shift", &def_flowid_shift);
SYSCTL_INT(_net_link_lagg, OID_AUTO, default_flowid_shift, CTLFLAG_RW,
&def_flowid_shift, 0,
@@ -1879,7 +1879,8 @@ lagg_lb_start(struct lagg_softc *sc, str
struct lagg_port *lp = NULL;
uint32_t p = 0;
- if (sc->use_flowid && (m->m_flags & M_FLOWID))
+ if (sc->use_flowid &&
+ M_HASHTYPE_GET(m) != M_HASHTYPE_NONE)
p = m->m_pkthdr.flowid >> sc->flowid_shift;
else
p = lagg_hashmbuf(sc, m, lb->lb_key);
Modified: stable/10/sys/net/if_lagg.h
==============================================================================
--- stable/10/sys/net/if_lagg.h Fri Apr 24 22:18:50 2015 (r281954)
+++ stable/10/sys/net/if_lagg.h Fri Apr 24 23:26:44 2015 (r281955)
@@ -231,8 +231,8 @@ struct lagg_softc {
struct callout sc_callout;
struct sysctl_ctx_list ctx; /* sysctl variables */
struct sysctl_oid *sc_oid; /* sysctl tree oid */
- int use_flowid; /* use M_FLOWID */
- int flowid_shift; /* shift the flowid */
+ int use_flowid; /* enable use of flowid */
+ int flowid_shift; /* set flowid shift*/
};
struct lagg_port {
Modified: stable/10/sys/net/netisr.c
==============================================================================
--- stable/10/sys/net/netisr.c Fri Apr 24 22:18:50 2015 (r281954)
+++ stable/10/sys/net/netisr.c Fri Apr 24 23:26:44 2015 (r281955)
@@ -686,12 +686,13 @@ netisr_select_cpuid(struct netisr_proto
}
if (policy == NETISR_POLICY_FLOW) {
- if (!(m->m_flags & M_FLOWID) && npp->np_m2flow != NULL) {
+ if (M_HASHTYPE_GET(m) == M_HASHTYPE_NONE &&
+ npp->np_m2flow != NULL) {
m = npp->np_m2flow(m, source);
if (m == NULL)
return (NULL);
}
- if (m->m_flags & M_FLOWID) {
+ if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) {
*cpuidp =
netisr_default_flow2cpu(m->m_pkthdr.flowid);
return (m);
Modified: stable/10/sys/netinet/in_pcb.h
==============================================================================
--- stable/10/sys/netinet/in_pcb.h Fri Apr 24 22:18:50 2015 (r281954)
+++ stable/10/sys/netinet/in_pcb.h Fri Apr 24 23:26:44 2015 (r281955)
@@ -525,8 +525,8 @@ short inp_so_options(const struct inpcb
#define INP_ONESBCAST 0x02000000 /* send all-ones broadcast */
#define INP_DROPPED 0x04000000 /* protocol drop flag */
#define INP_SOCKREF 0x08000000 /* strong socket reference */
-#define INP_SW_FLOWID 0x10000000 /* software generated flow id */
-#define INP_HW_FLOWID 0x20000000 /* hardware generated flow id */
+#define INP_RESERVED_0 0x10000000 /* reserved field */
+#define INP_RESERVED_1 0x20000000 /* reserved field */
#define IN6P_RFC2292 0x40000000 /* used RFC2292 API on the socket */
#define IN6P_MTU 0x80000000 /* receive path MTU */
Modified: stable/10/sys/netinet/ip_output.c
==============================================================================
--- stable/10/sys/netinet/ip_output.c Fri Apr 24 22:18:50 2015 (r281954)
+++ stable/10/sys/netinet/ip_output.c Fri Apr 24 23:26:44 2015 (r281955)
@@ -144,9 +144,9 @@ ip_output(struct mbuf *m, struct mbuf *o
if (inp != NULL) {
INP_LOCK_ASSERT(inp);
M_SETFIB(m, inp->inp_inc.inc_fibnum);
- if (inp->inp_flags & (INP_HW_FLOWID|INP_SW_FLOWID)) {
+ if (inp->inp_flowtype != M_HASHTYPE_NONE) {
m->m_pkthdr.flowid = inp->inp_flowid;
- m->m_flags |= M_FLOWID;
+ M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE);
}
}
@@ -796,11 +796,14 @@ smart_frag_failure:
IPSTAT_INC(ips_odropped);
goto done;
}
- /* make sure the flowid is the same for the fragmented mbufs */
+ /*
+ * make sure the flowid and flowtype are the same for the
+ * fragmented mbufs
+ */
M_HASHTYPE_SET(m, M_HASHTYPE_GET(m0));
m->m_pkthdr.flowid = m0->m_pkthdr.flowid;
- /* copy multicast and flowid flags, if any */
- m->m_flags |= (m0->m_flags & (M_MCAST | M_FLOWID));
+ /* copy multicast flags, if any */
+ m->m_flags |= (m0->m_flags & M_MCAST);
/*
* In the first mbuf, leave room for the link header, then
* copy the original IP header including options. The payload
Modified: stable/10/sys/netinet/sctp_indata.c
==============================================================================
--- stable/10/sys/netinet/sctp_indata.c Fri Apr 24 22:18:50 2015 (r281954)
+++ stable/10/sys/netinet/sctp_indata.c Fri Apr 24 23:26:44 2015 (r281955)
@@ -2296,7 +2296,7 @@ sctp_process_data(struct mbuf **mm, int
struct sockaddr *src, struct sockaddr *dst,
struct sctphdr *sh, struct sctp_inpcb *inp,
struct sctp_tcb *stcb, struct sctp_nets *net, uint32_t * high_tsn,
- uint8_t use_mflowid, uint32_t mflowid,
+ uint8_t mflowtype, uint32_t mflowid,
uint32_t vrf_id, uint16_t port)
{
struct sctp_data_chunk *ch, chunk_buf;
@@ -2391,7 +2391,7 @@ sctp_process_data(struct mbuf **mm, int
stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_19;
sctp_abort_association(inp, stcb, m, iphlen,
src, dst, sh, op_err,
- use_mflowid, mflowid,
+ mflowtype, mflowid,
vrf_id, port);
return (2);
}
@@ -2406,7 +2406,7 @@ sctp_process_data(struct mbuf **mm, int
stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_19;
sctp_abort_association(inp, stcb, m, iphlen,
src, dst, sh, op_err,
- use_mflowid, mflowid,
+ mflowtype, mflowid,
vrf_id, port);
return (2);
}
@@ -2475,7 +2475,7 @@ sctp_process_data(struct mbuf **mm, int
m, iphlen,
src, dst,
sh, op_err,
- use_mflowid, mflowid,
+ mflowtype, mflowid,
vrf_id, port);
return (2);
}
Modified: stable/10/sys/netinet/sctp_input.c
==============================================================================
--- stable/10/sys/netinet/sctp_input.c Fri Apr 24 22:18:50 2015 (r281954)
+++ stable/10/sys/netinet/sctp_input.c Fri Apr 24 23:26:44 2015 (r281955)
@@ -86,7 +86,7 @@ sctp_handle_init(struct mbuf *m, int iph
struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh,
struct sctp_init_chunk *cp, struct sctp_inpcb *inp,
struct sctp_tcb *stcb, int *abort_no_unlock,
- uint8_t use_mflowid, uint32_t mflowid,
+ uint8_t mflowtype, uint32_t mflowid,
uint32_t vrf_id, uint16_t port)
{
struct sctp_init *init;
@@ -101,7 +101,7 @@ sctp_handle_init(struct mbuf *m, int iph
if (ntohs(cp->ch.chunk_length) < sizeof(struct sctp_init_chunk)) {
op_err = sctp_generate_cause(SCTP_CAUSE_INVALID_PARAM, "");
sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, op_err,
- use_mflowid, mflowid,
+ mflowtype, mflowid,
vrf_id, port);
if (stcb)
*abort_no_unlock = 1;
@@ -113,7 +113,7 @@ sctp_handle_init(struct mbuf *m, int iph
/* protocol error... send abort */
op_err = sctp_generate_cause(SCTP_CAUSE_INVALID_PARAM, "");
sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, op_err,
- use_mflowid, mflowid,
+ mflowtype, mflowid,
vrf_id, port);
if (stcb)
*abort_no_unlock = 1;
@@ -123,7 +123,7 @@ sctp_handle_init(struct mbuf *m, int iph
/* invalid parameter... send abort */
op_err = sctp_generate_cause(SCTP_CAUSE_INVALID_PARAM, "");
sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, op_err,
- use_mflowid, mflowid,
+ mflowtype, mflowid,
vrf_id, port);
if (stcb)
*abort_no_unlock = 1;
@@ -133,7 +133,7 @@ sctp_handle_init(struct mbuf *m, int iph
/* protocol error... send abort */
op_err = sctp_generate_cause(SCTP_CAUSE_INVALID_PARAM, "");
sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, op_err,
- use_mflowid, mflowid,
+ mflowtype, mflowid,
vrf_id, port);
if (stcb)
*abort_no_unlock = 1;
@@ -143,7 +143,7 @@ sctp_handle_init(struct mbuf *m, int iph
/* protocol error... send abort */
op_err = sctp_generate_cause(SCTP_CAUSE_INVALID_PARAM, "");
sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, op_err,
- use_mflowid, mflowid,
+ mflowtype, mflowid,
vrf_id, port);
if (stcb)
*abort_no_unlock = 1;
@@ -155,7 +155,7 @@ sctp_handle_init(struct mbuf *m, int iph
op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code),
"Problem with AUTH parameters");
sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, op_err,
- use_mflowid, mflowid,
+ mflowtype, mflowid,
vrf_id, port);
if (stcb)
*abort_no_unlock = 1;
@@ -186,7 +186,7 @@ sctp_handle_init(struct mbuf *m, int iph
op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code),
"No listener");
sctp_send_abort(m, iphlen, src, dst, sh, 0, op_err,
- use_mflowid, mflowid,
+ mflowtype, mflowid,
vrf_id, port);
}
goto outnow;
@@ -200,7 +200,7 @@ sctp_handle_init(struct mbuf *m, int iph
SCTPDBG(SCTP_DEBUG_INPUT3, "sctp_handle_init: sending INIT-ACK\n");
sctp_send_initiate_ack(inp, stcb, m, iphlen, offset, src, dst,
sh, cp,
- use_mflowid, mflowid,
+ mflowtype, mflowid,
vrf_id, port,
((stcb == NULL) ? SCTP_HOLDS_LOCK : SCTP_NOT_LOCKED));
}
@@ -434,7 +434,7 @@ sctp_process_init_ack(struct mbuf *m, in
struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh,
struct sctp_init_ack_chunk *cp, struct sctp_tcb *stcb,
struct sctp_nets *net, int *abort_no_unlock,
- uint8_t use_mflowid, uint32_t mflowid,
+ uint8_t mflowtype, uint32_t mflowid,
uint32_t vrf_id)
{
struct sctp_association *asoc;
@@ -474,7 +474,7 @@ sctp_process_init_ack(struct mbuf *m, in
retval);
sctp_abort_association(stcb->sctp_ep, stcb, m, iphlen,
src, dst, sh, op_err,
- use_mflowid, mflowid,
+ mflowtype, mflowid,
vrf_id, net->port);
*abort_no_unlock = 1;
return (-1);
@@ -549,7 +549,7 @@ sctp_process_init_ack(struct mbuf *m, in
}
sctp_abort_association(stcb->sctp_ep, stcb, m, iphlen,
src, dst, sh, op_err,
- use_mflowid, mflowid,
+ mflowtype, mflowid,
vrf_id, net->port);
*abort_no_unlock = 1;
}
@@ -1284,7 +1284,7 @@ sctp_handle_init_ack(struct mbuf *m, int
struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh,
struct sctp_init_ack_chunk *cp, struct sctp_tcb *stcb,
struct sctp_nets *net, int *abort_no_unlock,
- uint8_t use_mflowid, uint32_t mflowid,
+ uint8_t mflowtype, uint32_t mflowid,
uint32_t vrf_id)
{
struct sctp_init_ack *init_ack;
@@ -1303,7 +1303,7 @@ sctp_handle_init_ack(struct mbuf *m, int
op_err = sctp_generate_cause(SCTP_CAUSE_INVALID_PARAM, "");
sctp_abort_association(stcb->sctp_ep, stcb, m, iphlen,
src, dst, sh, op_err,
- use_mflowid, mflowid,
+ mflowtype, mflowid,
vrf_id, net->port);
*abort_no_unlock = 1;
return (-1);
@@ -1315,7 +1315,7 @@ sctp_handle_init_ack(struct mbuf *m, int
op_err = sctp_generate_cause(SCTP_CAUSE_INVALID_PARAM, "");
sctp_abort_association(stcb->sctp_ep, stcb, m, iphlen,
src, dst, sh, op_err,
- use_mflowid, mflowid,
+ mflowtype, mflowid,
vrf_id, net->port);
*abort_no_unlock = 1;
return (-1);
@@ -1325,7 +1325,7 @@ sctp_handle_init_ack(struct mbuf *m, int
op_err = sctp_generate_cause(SCTP_CAUSE_INVALID_PARAM, "");
sctp_abort_association(stcb->sctp_ep, stcb, m, iphlen,
src, dst, sh, op_err,
- use_mflowid, mflowid,
+ mflowtype, mflowid,
vrf_id, net->port);
*abort_no_unlock = 1;
return (-1);
@@ -1335,7 +1335,7 @@ sctp_handle_init_ack(struct mbuf *m, int
op_err = sctp_generate_cause(SCTP_CAUSE_INVALID_PARAM, "");
sctp_abort_association(stcb->sctp_ep, stcb, m, iphlen,
src, dst, sh, op_err,
- use_mflowid, mflowid,
+ mflowtype, mflowid,
vrf_id, net->port);
*abort_no_unlock = 1;
return (-1);
@@ -1345,7 +1345,7 @@ sctp_handle_init_ack(struct mbuf *m, int
op_err = sctp_generate_cause(SCTP_CAUSE_INVALID_PARAM, "");
sctp_abort_association(stcb->sctp_ep, stcb, m, iphlen,
src, dst, sh, op_err,
- use_mflowid, mflowid,
+ mflowtype, mflowid,
vrf_id, net->port);
*abort_no_unlock = 1;
return (-1);
@@ -1370,7 +1370,7 @@ sctp_handle_init_ack(struct mbuf *m, int
}
if (sctp_process_init_ack(m, iphlen, offset, src, dst, sh, cp, stcb,
net, abort_no_unlock,
- use_mflowid, mflowid,
+ mflowtype, mflowid,
vrf_id) < 0) {
/* error in parsing parameters */
return (-1);
@@ -1427,7 +1427,7 @@ sctp_process_cookie_new(struct mbuf *m,
struct sctp_inpcb *inp, struct sctp_nets **netp,
struct sockaddr *init_src, int *notification,
int auth_skipped, uint32_t auth_offset, uint32_t auth_len,
- uint8_t use_mflowid, uint32_t mflowid,
+ uint8_t mflowtype, uint32_t mflowid,
uint32_t vrf_id, uint16_t port);
@@ -1444,7 +1444,7 @@ sctp_process_cookie_existing(struct mbuf
struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_nets **netp,
struct sockaddr *init_src, int *notification,
int auth_skipped, uint32_t auth_offset, uint32_t auth_len,
- uint8_t use_mflowid, uint32_t mflowid,
+ uint8_t mflowtype, uint32_t mflowid,
uint32_t vrf_id, uint16_t port)
{
struct sctp_association *asoc;
@@ -1477,7 +1477,7 @@ sctp_process_cookie_existing(struct mbuf
sctp_send_shutdown_ack(stcb, stcb->asoc.primary_destination);
op_err = sctp_generate_cause(SCTP_CAUSE_COOKIE_IN_SHUTDOWN, "");
sctp_send_operr_to(src, dst, sh, cookie->peers_vtag, op_err,
- use_mflowid, mflowid,
+ mflowtype, mflowid,
vrf_id, net->port);
if (how_indx < sizeof(asoc->cookie_how))
asoc->cookie_how[how_indx] = 2;
@@ -1684,7 +1684,7 @@ sctp_process_cookie_existing(struct mbuf
*/
op_err = sctp_generate_cause(SCTP_CAUSE_NAT_COLLIDING_STATE, "");
sctp_send_abort(m, iphlen, src, dst, sh, 0, op_err,
- use_mflowid, mflowid,
+ mflowtype, mflowid,
vrf_id, port);
return (NULL);
}
@@ -1856,7 +1856,7 @@ sctp_process_cookie_existing(struct mbuf
sh, cookie, cookie_len,
inp, netp, init_src, notification,
auth_skipped, auth_offset, auth_len,
- use_mflowid, mflowid,
+ mflowtype, mflowid,
vrf_id, port));
}
/*
@@ -2012,7 +2012,7 @@ sctp_process_cookie_new(struct mbuf *m,
struct sctp_inpcb *inp, struct sctp_nets **netp,
struct sockaddr *init_src, int *notification,
int auth_skipped, uint32_t auth_offset, uint32_t auth_len,
- uint8_t use_mflowid, uint32_t mflowid,
+ uint8_t mflowtype, uint32_t mflowid,
uint32_t vrf_id, uint16_t port)
{
struct sctp_tcb *stcb;
@@ -2098,7 +2098,7 @@ sctp_process_cookie_new(struct mbuf *m,
op_err = sctp_generate_cause(SCTP_CAUSE_OUT_OF_RESC, "");
sctp_abort_association(inp, (struct sctp_tcb *)NULL, m, iphlen,
src, dst, sh, op_err,
- use_mflowid, mflowid,
+ mflowtype, mflowid,
vrf_id, port);
return (NULL);
}
@@ -2126,7 +2126,7 @@ sctp_process_cookie_new(struct mbuf *m,
op_err = sctp_generate_cause(SCTP_CAUSE_OUT_OF_RESC, "");
sctp_abort_association(inp, (struct sctp_tcb *)NULL, m, iphlen,
src, dst, sh, op_err,
- use_mflowid, mflowid,
+ mflowtype, mflowid,
vrf_id, port);
#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING)
SCTP_TCB_UNLOCK(stcb);
@@ -2373,7 +2373,7 @@ sctp_handle_cookie_echo(struct mbuf *m,
struct sctp_inpcb **inp_p, struct sctp_tcb **stcb, struct sctp_nets **netp,
int auth_skipped, uint32_t auth_offset, uint32_t auth_len,
struct sctp_tcb **locked_tcb,
- uint8_t use_mflowid, uint32_t mflowid,
+ uint8_t mflowtype, uint32_t mflowid,
uint32_t vrf_id, uint16_t port)
{
struct sctp_state_cookie *cookie;
@@ -2560,7 +2560,7 @@ sctp_handle_cookie_echo(struct mbuf *m,
tim = now.tv_usec - cookie->time_entered.tv_usec;
scm->time_usec = htonl(tim);
sctp_send_operr_to(src, dst, sh, cookie->peers_vtag, op_err,
- use_mflowid, mflowid,
+ mflowtype, mflowid,
vrf_id, port);
return (NULL);
}
@@ -2650,7 +2650,7 @@ sctp_handle_cookie_echo(struct mbuf *m,
cookie, cookie_len, *inp_p,
netp, to, ¬ification,
auth_skipped, auth_offset, auth_len,
- use_mflowid, mflowid,
+ mflowtype, mflowid,
vrf_id, port);
} else {
/* this is abnormal... cookie-echo on existing TCB */
@@ -2659,7 +2659,7 @@ sctp_handle_cookie_echo(struct mbuf *m,
src, dst, sh,
cookie, cookie_len, *inp_p, *stcb, netp, to,
¬ification, auth_skipped, auth_offset, auth_len,
- use_mflowid, mflowid,
+ mflowtype, mflowid,
vrf_id, port);
}
@@ -2667,11 +2667,8 @@ sctp_handle_cookie_echo(struct mbuf *m,
/* still no TCB... must be bad cookie-echo */
return (NULL);
}
- if ((*netp != NULL) && (use_mflowid != 0)) {
- (*netp)->flowid = mflowid;
-#ifdef INVARIANTS
- (*netp)->flowidset = 1;
-#endif
+ if ((*netp != NULL) && (mflowtype != M_HASHTYPE_NONE)) {
+ (*netp)->flowtype = mflowtype;
}
/*
* Ok, we built an association so confirm the address we sent the
@@ -2742,7 +2739,7 @@ sctp_handle_cookie_echo(struct mbuf *m,
op_err = sctp_generate_cause(SCTP_CAUSE_OUT_OF_RESC, "");
sctp_abort_association(*inp_p, NULL, m, iphlen,
src, dst, sh, op_err,
- use_mflowid, mflowid,
+ mflowtype, mflowid,
vrf_id, port);
#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING)
pcb_so = SCTP_INP_SO(*inp_p);
@@ -4394,7 +4391,7 @@ __attribute__((noinline))
struct sockaddr *src, struct sockaddr *dst,
struct sctphdr *sh, struct sctp_chunkhdr *ch, struct sctp_inpcb *inp,
struct sctp_tcb *stcb, struct sctp_nets **netp, int *fwd_tsn_seen,
- uint8_t use_mflowid, uint32_t mflowid,
+ uint8_t mflowtype, uint32_t mflowid,
uint32_t vrf_id, uint16_t port)
{
struct sctp_association *asoc;
@@ -4558,7 +4555,7 @@ __attribute__((noinline))
msg);
/* no association, so it's out of the blue... */
sctp_handle_ootb(m, iphlen, *offset, src, dst, sh, inp, op_err,
- use_mflowid, mflowid,
+ mflowtype, mflowid,
vrf_id, port);
*offset = length;
if (locked_tcb) {
@@ -4602,7 +4599,7 @@ __attribute__((noinline))
msg);
sctp_handle_ootb(m, iphlen, *offset, src, dst,
sh, inp, op_err,
- use_mflowid, mflowid,
+ mflowtype, mflowid,
vrf_id, port);
return (NULL);
}
@@ -4747,7 +4744,7 @@ process_control_chunks:
"INIT not the only chunk");
sctp_abort_association(inp, stcb, m, iphlen,
src, dst, sh, op_err,
- use_mflowid, mflowid,
+ mflowtype, mflowid,
vrf_id, port);
*offset = length;
return (NULL);
@@ -4757,7 +4754,7 @@ process_control_chunks:
op_err = sctp_generate_cause(SCTP_CAUSE_OUT_OF_RESC, "");
sctp_abort_association(inp, stcb, m, iphlen,
src, dst, sh, op_err,
- use_mflowid, mflowid,
+ mflowtype, mflowid,
vrf_id, port);
*offset = length;
return (NULL);
@@ -4765,7 +4762,7 @@ process_control_chunks:
sctp_handle_init(m, iphlen, *offset, src, dst, sh,
(struct sctp_init_chunk *)ch, inp,
stcb, &abort_no_unlock,
- use_mflowid, mflowid,
+ mflowtype, mflowid,
vrf_id, port);
*offset = length;
if ((!abort_no_unlock) && (locked_tcb)) {
@@ -4819,7 +4816,7 @@ process_control_chunks:
(struct sctp_init_ack_chunk *)ch,
stcb, *netp,
&abort_no_unlock,
- use_mflowid, mflowid,
+ mflowtype, mflowid,
vrf_id);
} else {
ret = -1;
@@ -5124,7 +5121,7 @@ process_control_chunks:
op_err = sctp_generate_cause(SCTP_CAUSE_OUT_OF_RESC, "");
sctp_abort_association(inp, stcb, m, iphlen,
src, dst, sh, op_err,
- use_mflowid, mflowid,
+ mflowtype, mflowid,
vrf_id, port);
}
*offset = length;
@@ -5159,7 +5156,7 @@ process_control_chunks:
auth_offset,
auth_len,
&locked_tcb,
- use_mflowid,
+ mflowtype,
mflowid,
vrf_id,
port);
@@ -5613,7 +5610,7 @@ sctp_common_input_processing(struct mbuf
uint8_t compute_crc,
#endif
uint8_t ecn_bits,
- uint8_t use_mflowid, uint32_t mflowid,
+ uint8_t mflowtype, uint32_t mflowid,
uint32_t vrf_id, uint16_t port)
{
uint32_t high_tsn;
@@ -5652,11 +5649,8 @@ sctp_common_input_processing(struct mbuf
net->port = port;
}
#endif
- if ((net != NULL) && (use_mflowid != 0)) {
- net->flowid = mflowid;
-#ifdef INVARIANTS
- net->flowidset = 1;
-#endif
+ if ((net != NULL) && (mflowtype != M_HASHTYPE_NONE)) {
+ net->flowtype = mflowtype;
}
if ((inp != NULL) && (stcb != NULL)) {
sctp_send_packet_dropped(stcb, net, m, length, iphlen, 1);
@@ -5685,11 +5679,8 @@ sctp_common_input_processing(struct mbuf
net->port = port;
}
#endif
- if ((net != NULL) && (use_mflowid != 0)) {
- net->flowid = mflowid;
-#ifdef INVARIANTS
- net->flowidset = 1;
-#endif
+ if ((net != NULL) && (mflowtype != M_HASHTYPE_NONE)) {
+ net->flowtype = mflowtype;
}
if (inp == NULL) {
SCTP_STAT_INCR(sctps_noport);
@@ -5698,7 +5689,7 @@ sctp_common_input_processing(struct mbuf
}
if (ch->chunk_type == SCTP_SHUTDOWN_ACK) {
sctp_send_shutdown_complete2(src, dst, sh,
- use_mflowid, mflowid,
+ mflowtype, mflowid,
vrf_id, port);
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-stable-10
mailing list