I'v enabled CSUM for em(4) since Aug 6:th , in GENERIC.
So far, 34 days up and no problems.

em0 at pci0 dev 25 function 0 "Intel 82579LM" rev 0x05: msi 
em1 at pci6 dev 0 function 0 "Intel 82574L" rev 0x00: msi 


//mxb

On 9 sep 2013, at 21:44, Brad Smith <b...@comstyle.com> wrote:

> Since I have been asked to send out these diffs again here is a diff to enable
> the checksum offload support for em(4).
> 
> Looking for any testing.
> 
> 
> Index: if_em.c
> ===================================================================
> RCS file: /home/cvs/src/sys/dev/pci/if_em.c,v
> retrieving revision 1.269
> diff -u -p -r1.269 if_em.c
> --- if_em.c   27 Jan 2013 04:18:02 -0000      1.269
> +++ if_em.c   9 Sep 2013 18:33:45 -0000
> @@ -211,10 +211,8 @@ int  em_rxfill(struct em_softc *);
> void em_rxeof(struct em_softc *);
> void em_receive_checksum(struct em_softc *, struct em_rx_desc *,
>                        struct mbuf *);
> -#ifdef EM_CSUM_OFFLOAD
> void em_transmit_checksum_setup(struct em_softc *, struct mbuf *,
>                               u_int32_t *, u_int32_t *);
> -#endif
> void em_iff(struct em_softc *);
> #ifdef EM_DEBUG
> void em_print_hw_stats(struct em_softc *);
> @@ -1121,14 +1119,10 @@ em_encap(struct em_softc *sc, struct mbu
>       if (map->dm_nsegs > sc->num_tx_desc_avail - 2)
>               goto fail;
> 
> -#ifdef EM_CSUM_OFFLOAD
>       if (sc->hw.mac_type >= em_82543)
>               em_transmit_checksum_setup(sc, m_head, &txd_upper, &txd_lower);
>       else
>               txd_upper = txd_lower = 0;
> -#else
> -     txd_upper = txd_lower = 0;
> -#endif
> 
>       i = sc->next_avail_tx_desc;
>       if (sc->pcix_82544)
> @@ -1853,10 +1847,8 @@ em_setup_interface(struct em_softc *sc)
>               ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING;
> #endif
> 
> -#ifdef EM_CSUM_OFFLOAD
>       if (sc->hw.mac_type >= em_82543)
> -             ifp->if_capabilities |= IFCAP_CSUM_TCPv4|IFCAP_CSUM_UDPv4;
> -#endif
> +             ifp->if_capabilities |= IFCAP_CSUM_TCPv4 | IFCAP_CSUM_UDPv4;
> 
>       /* 
>        * Specify the media types supported by this adapter and register
> @@ -2275,7 +2267,6 @@ em_free_transmit_structures(struct em_so
>               sc->txtag = NULL;
> }
> 
> -#ifdef EM_CSUM_OFFLOAD
> /*********************************************************************
>  *
>  *  The offload context needs to be set when we transfer the first
> @@ -2356,7 +2347,6 @@ em_transmit_checksum_setup(struct em_sof
>       sc->num_tx_desc_avail--;
>       sc->next_avail_tx_desc = curr_txd;
> }
> -#endif /* EM_CSUM_OFFLOAD */
> 
> /**********************************************************************
>  *
> 
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> 


Reply via email to