Implement RSS queue tagging for em(4) class devices from a copy and massage
of functions from igb(4). This enables 2 queue routing on 82574L class devices again.
This commit is contained in:
parent
5ab1cf33f7
commit
cbf1505df9
@ -62,6 +62,7 @@ static int lem_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri);
|
||||
|
||||
static void lem_receive_checksum(int status, int errors, if_rxd_info_t ri);
|
||||
static void em_receive_checksum(uint32_t status, if_rxd_info_t ri);
|
||||
static int em_determine_rsstype(u32 pkt_info);
|
||||
extern int em_intr(void *arg);
|
||||
|
||||
struct if_txrx em_txrx = {
|
||||
@ -645,6 +646,7 @@ em_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri)
|
||||
union e1000_rx_desc_extended *rxd;
|
||||
|
||||
u16 len;
|
||||
u32 pkt_info;
|
||||
u32 staterr = 0;
|
||||
bool eop;
|
||||
int i, cidx, vtag;
|
||||
@ -655,6 +657,7 @@ em_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri)
|
||||
do {
|
||||
rxd = &rxr->rx_base[cidx];
|
||||
staterr = le32toh(rxd->wb.upper.status_error);
|
||||
pkt_info = le32toh(rxd->wb.lower.mrq);
|
||||
|
||||
/* Error Checking then decrement count */
|
||||
MPASS ((staterr & E1000_RXD_STAT_DD) != 0);
|
||||
@ -690,10 +693,14 @@ em_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri)
|
||||
}
|
||||
|
||||
ri->iri_vtag = vtag;
|
||||
ri->iri_nfrags = i;
|
||||
if (vtag)
|
||||
ri->iri_flags |= M_VLANTAG;
|
||||
|
||||
ri->iri_flowid =
|
||||
le32toh(rxd->wb.lower.hi_dword.rss);
|
||||
ri->iri_rsstype = em_determine_rsstype(pkt_info);
|
||||
|
||||
ri->iri_nfrags = i;
|
||||
return (0);
|
||||
}
|
||||
|
||||
@ -721,6 +728,31 @@ lem_receive_checksum(int status, int errors, if_rxd_info_t ri)
|
||||
}
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
*
|
||||
* Parse the packet type to determine the appropriate hash
|
||||
*
|
||||
******************************************************************/
|
||||
static int
|
||||
em_determine_rsstype(u32 pkt_info)
|
||||
{
|
||||
switch (pkt_info & E1000_RXDADV_RSSTYPE_MASK) {
|
||||
case E1000_RXDADV_RSSTYPE_IPV4_TCP:
|
||||
return M_HASHTYPE_RSS_TCP_IPV4;
|
||||
case E1000_RXDADV_RSSTYPE_IPV4:
|
||||
return M_HASHTYPE_RSS_IPV4;
|
||||
case E1000_RXDADV_RSSTYPE_IPV6_TCP:
|
||||
return M_HASHTYPE_RSS_TCP_IPV6;
|
||||
case E1000_RXDADV_RSSTYPE_IPV6_EX:
|
||||
return M_HASHTYPE_RSS_IPV6_EX;
|
||||
case E1000_RXDADV_RSSTYPE_IPV6:
|
||||
return M_HASHTYPE_RSS_IPV6;
|
||||
case E1000_RXDADV_RSSTYPE_IPV6_TCP_EX:
|
||||
return M_HASHTYPE_RSS_TCP_IPV6_EX;
|
||||
default:
|
||||
return M_HASHTYPE_OPAQUE;
|
||||
}
|
||||
}
|
||||
static void
|
||||
em_receive_checksum(uint32_t status, if_rxd_info_t ri)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user