On 22.10.2021. 11:25, Jan Klemkow wrote:
> Hi,
> 
> this diff add hardware checksum offloading for the receive path of
> ixl(4) interfaces.
> 
> Tested on:
> ixl1 at pci3 dev 0 function 1 "Intel X710 SFP+" rev 0x02: port 1, FW 
> 6.0.48442 API 1.7, msix, 8 queues, address 40:a6:b7:02:38:3d
> 
> OK?
> 

Hi,

I've applied this diff and i can't see anything regarding offload with
ifconfig ixl hwfeatures?

smc24# ifconfig ixl0 hwfeatures
ixl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        hwfeatures=10<VLAN_MTU> hardmtu 9712
        lladdr 3c:fd:fe:04:0d:64
        index 7 priority 0 llprio 3
        media: Ethernet autoselect (10GSFP+Cu full-duplex)
        status: active
        inet 192.168.15.1 netmask 0xffffff00 broadcast 192.168.15.255

smc24# dmesg | grep ixl
ixl0 at pci21 dev 0 function 0 "Intel X710 SFP+" rev 0x01: port 0, FW
8.2.64244 API 1.13, msix, 8 queues, address 3c:fd:fe:04:0d:64
ixl1 at pci21 dev 0 function 1 "Intel X710 SFP+" rev 0x01: port 1, FW
8.2.64244 API 1.13, msix, 8 queues, address 3c:fd:fe:04:0d:66



> Index: dev/pci/if_ixl.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/pci/if_ixl.c,v
> retrieving revision 1.75
> diff -u -p -r1.75 if_ixl.c
> --- dev/pci/if_ixl.c  23 Jul 2021 00:29:14 -0000      1.75
> +++ dev/pci/if_ixl.c  22 Oct 2021 09:20:59 -0000
> @@ -1388,6 +1388,7 @@ static int      ixl_rxeof(struct ixl_softc *,
>  static void  ixl_rxfill(struct ixl_softc *, struct ixl_rx_ring *);
>  static void  ixl_rxrefill(void *);
>  static int   ixl_rxrinfo(struct ixl_softc *, struct if_rxrinfo *);
> +static void  ixl_rx_checksum(struct mbuf *, uint64_t);
>  
>  #if NKSTAT > 0
>  static void  ixl_kstat_attach(struct ixl_softc *);
> @@ -3190,6 +3191,7 @@ ixl_rxeof(struct ixl_softc *sc, struct i
>                                       m->m_pkthdr.csum_flags |= M_FLOWID;
>                               }
>  
> +                             ixl_rx_checksum(m, word);
>                               ml_enqueue(&ml, m);
>                       } else {
>                               ifp->if_ierrors++; /* XXX */
> @@ -3320,6 +3322,23 @@ ixl_rxrinfo(struct ixl_softc *sc, struct
>       free(ifr, M_TEMP, ixl_nqueues(sc) * sizeof(*ifr));
>  
>       return (rv);
> +}
> +
> +static void
> +ixl_rx_checksum(struct mbuf *m, uint64_t word)
> +{
> +     if (!ISSET(word, IXL_RX_DESC_L3L4P))
> +             return;
> +
> +     if (ISSET(word, IXL_RX_DESC_IPE))
> +             return;
> +
> +     m->m_pkthdr.csum_flags |= M_IPV4_CSUM_IN_OK;
> +
> +     if (ISSET(word, IXL_RX_DESC_L4E))
> +             return;
> +
> +     m->m_pkthdr.csum_flags |= M_TCP_CSUM_IN_OK | M_UDP_CSUM_IN_OK;
>  }
>  
>  static int
> 

Reply via email to