Restore changes for RSS routing improvements made in 314369 that were
reverted in the IFLIB update I made in 315217. Submitted by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
This commit is contained in:
parent
8d27c2000b
commit
883722a43c
@ -426,6 +426,37 @@ bnxt_isc_rxd_available(void *sc, uint16_t rxqid, qidx_t idx, qidx_t budget)
|
||||
return avail;
|
||||
}
|
||||
|
||||
static void
|
||||
bnxt_set_rsstype(if_rxd_info_t ri, uint8_t rss_hash_type)
|
||||
{
|
||||
uint8_t rss_profile_id;
|
||||
|
||||
rss_profile_id = BNXT_GET_RSS_PROFILE_ID(rss_hash_type);
|
||||
switch (rss_profile_id) {
|
||||
case BNXT_RSS_HASH_TYPE_TCPV4:
|
||||
ri->iri_rsstype = M_HASHTYPE_RSS_TCP_IPV4;
|
||||
break;
|
||||
case BNXT_RSS_HASH_TYPE_UDPV4:
|
||||
ri->iri_rsstype = M_HASHTYPE_RSS_UDP_IPV4;
|
||||
break;
|
||||
case BNXT_RSS_HASH_TYPE_IPV4:
|
||||
ri->iri_rsstype = M_HASHTYPE_RSS_IPV4;
|
||||
break;
|
||||
case BNXT_RSS_HASH_TYPE_TCPV6:
|
||||
ri->iri_rsstype = M_HASHTYPE_RSS_TCP_IPV6;
|
||||
break;
|
||||
case BNXT_RSS_HASH_TYPE_UDPV6:
|
||||
ri->iri_rsstype = M_HASHTYPE_RSS_UDP_IPV6;
|
||||
break;
|
||||
case BNXT_RSS_HASH_TYPE_IPV6:
|
||||
ri->iri_rsstype = M_HASHTYPE_RSS_IPV6;
|
||||
break;
|
||||
default:
|
||||
ri->iri_rsstype = M_HASHTYPE_OPAQUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
bnxt_pkt_get_l2(struct bnxt_softc *softc, if_rxd_info_t ri,
|
||||
struct bnxt_cp_ring *cpr, uint16_t flags_type)
|
||||
@ -443,13 +474,7 @@ bnxt_pkt_get_l2(struct bnxt_softc *softc, if_rxd_info_t ri,
|
||||
/* Extract from the first 16-byte BD */
|
||||
if (flags_type & RX_PKT_CMPL_FLAGS_RSS_VALID) {
|
||||
ri->iri_flowid = le32toh(rcp->rss_hash);
|
||||
/*
|
||||
* TODO: Extract something useful from rcp->rss_hash_type
|
||||
* (undocumented)
|
||||
* May be documented in the "LSI ES"
|
||||
* also check the firmware code.
|
||||
*/
|
||||
ri->iri_rsstype = M_HASHTYPE_OPAQUE;
|
||||
bnxt_set_rsstype(ri, rcp->rss_hash_type);
|
||||
}
|
||||
else {
|
||||
ri->iri_rsstype = M_HASHTYPE_NONE;
|
||||
@ -529,13 +554,7 @@ bnxt_pkt_get_tpa(struct bnxt_softc *softc, if_rxd_info_t ri,
|
||||
/* Extract from the first 16-byte BD */
|
||||
if (le16toh(tpas->low.flags_type) & RX_TPA_START_CMPL_FLAGS_RSS_VALID) {
|
||||
ri->iri_flowid = le32toh(tpas->low.rss_hash);
|
||||
/*
|
||||
* TODO: Extract something useful from tpas->low.rss_hash_type
|
||||
* (undocumented)
|
||||
* May be documented in the "LSI ES"
|
||||
* also check the firmware code.
|
||||
*/
|
||||
ri->iri_rsstype = M_HASHTYPE_OPAQUE;
|
||||
bnxt_set_rsstype(ri, tpas->low.rss_hash_type);
|
||||
}
|
||||
else {
|
||||
ri->iri_rsstype = M_HASHTYPE_NONE;
|
||||
|
Loading…
Reference in New Issue
Block a user