cxgbe(4): provide the exact RSS hash type instead of a catch-all value
to the upper layers.
This commit is contained in:
parent
68e0df6c99
commit
cd9d558324
@ -1736,6 +1736,12 @@ t4_eth_rx(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m0)
|
||||
#if defined(INET) || defined(INET6)
|
||||
struct lro_ctrl *lro = &rxq->lro;
|
||||
#endif
|
||||
static const int sw_hashtype[4][2] = {
|
||||
{M_HASHTYPE_NONE, M_HASHTYPE_NONE},
|
||||
{M_HASHTYPE_RSS_IPV4, M_HASHTYPE_RSS_IPV6},
|
||||
{M_HASHTYPE_RSS_TCP_IPV4, M_HASHTYPE_RSS_TCP_IPV6},
|
||||
{M_HASHTYPE_RSS_UDP_IPV4, M_HASHTYPE_RSS_UDP_IPV6},
|
||||
};
|
||||
|
||||
KASSERT(m0 != NULL, ("%s: no payload with opcode %02x", __func__,
|
||||
rss->opcode));
|
||||
@ -1745,7 +1751,7 @@ t4_eth_rx(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m0)
|
||||
m0->m_data += fl_pktshift;
|
||||
|
||||
m0->m_pkthdr.rcvif = ifp;
|
||||
M_HASHTYPE_SET(m0, M_HASHTYPE_OPAQUE);
|
||||
M_HASHTYPE_SET(m0, sw_hashtype[rss->hash_type][rss->ipv6]);
|
||||
m0->m_pkthdr.flowid = be32toh(rss->hash_val);
|
||||
|
||||
if (cpl->csum_calc && !cpl->err_vec) {
|
||||
|
Loading…
Reference in New Issue
Block a user