On Wed, Jul 14, 2021 at 01:46:37PM +0800, Kevin Lo wrote:
> Hi,
> 
> The diff below fixes Rx desc RSS type.  This matches what Linux and FreeBSD 
> do.
> ok?

ok jmatthew@

> 
> Index: sys/dev/pci/if_ix.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/pci/if_ix.c,v
> retrieving revision 1.178
> diff -u -p -u -p -r1.178 if_ix.c
> --- sys/dev/pci/if_ix.c       22 Dec 2020 23:25:37 -0000      1.178
> +++ sys/dev/pci/if_ix.c       14 Jul 2021 05:41:08 -0000
> @@ -3071,7 +3071,8 @@ ixgbe_rxeof(struct rx_ring *rxr)
>  
>       i = rxr->next_to_check;
>       while (if_rxr_inuse(&rxr->rx_ring) > 0) {
> -             uint32_t hash, hashtype;
> +             uint32_t hash;
> +             uint16_t hashtype;
>  
>               bus_dmamap_sync(rxr->rxdma.dma_tag, rxr->rxdma.dma_map,
>                   dsize * i, dsize, BUS_DMASYNC_POSTREAD);
> @@ -3101,7 +3102,8 @@ ixgbe_rxeof(struct rx_ring *rxr)
>               vtag = letoh16(rxdesc->wb.upper.vlan);
>               eop = ((staterr & IXGBE_RXD_STAT_EOP) != 0);
>               hash = lemtoh32(&rxdesc->wb.lower.hi_dword.rss);
> -             hashtype = lemtoh32(&rxdesc->wb.lower.lo_dword.data) &
> +             hashtype =
> +                 lemtoh16(&rxdesc->wb.lower.lo_dword.hs_rss.pkt_info) &
>                   IXGBE_RXDADV_RSSTYPE_MASK;
>  
>               if (staterr & IXGBE_RXDADV_ERR_FRAME_ERR_MASK) {
> 

Reply via email to