Author: sbruno
Date: Wed Jan 11 19:29:33 2017
New Revision: 311931
URL: https://svnweb.freebsd.org/changeset/base/311931

Log:
  Restore v6 offload caps for igb(4) class devices.
  
  Reported by:  tuxen

Modified:
  head/sys/dev/e1000/em_txrx.c
  head/sys/dev/e1000/if_em.h
  head/sys/dev/e1000/igb_txrx.c

Modified: head/sys/dev/e1000/em_txrx.c
==============================================================================
--- head/sys/dev/e1000/em_txrx.c        Wed Jan 11 19:29:28 2017        
(r311930)
+++ head/sys/dev/e1000/em_txrx.c        Wed Jan 11 19:29:33 2017        
(r311931)
@@ -304,7 +304,7 @@ em_isc_txd_encap(void *arg, if_pkt_info_
        if (do_tso) {
                i = em_tso_setup(sc, pi, &txd_upper, &txd_lower);
                tso_desc = TRUE;
-       } else if (csum_flags & CSUM_OFFLOAD) {
+       } else if (csum_flags & EM_CSUM_OFFLOAD) {
                i = em_transmit_checksum_setup(sc, pi, &txd_upper, &txd_lower);
        }
 

Modified: head/sys/dev/e1000/if_em.h
==============================================================================
--- head/sys/dev/e1000/if_em.h  Wed Jan 11 19:29:28 2017        (r311930)
+++ head/sys/dev/e1000/if_em.h  Wed Jan 11 19:29:33 2017        (r311931)
@@ -330,7 +330,8 @@
 #define EM_MSIX_LINK           0x01000000 /* For 82574 use */
 #define ETH_ZLEN               60
 #define ETH_ADDR_LEN           6
-#define CSUM_OFFLOAD           7       /* Offload bits in mbuf flag */
+#define EM_CSUM_OFFLOAD                7       /* Offload bits in mbuf flag */
+#define IGB_CSUM_OFFLOAD       0x0E0F  /* Offload bits in mbuf flag */
 
 #define IGB_PKTTYPE_MASK       0x0000FFF0
 #define IGB_DMCTLX_DCFLUSH_DIS 0x80000000  /* Disable DMA Coalesce Flush */

Modified: head/sys/dev/e1000/igb_txrx.c
==============================================================================
--- head/sys/dev/e1000/igb_txrx.c       Wed Jan 11 19:29:28 2017        
(r311930)
+++ head/sys/dev/e1000/igb_txrx.c       Wed Jan 11 19:29:33 2017        
(r311931)
@@ -171,7 +171,7 @@ igb_tx_ctx_setup(struct tx_ring *txr, if
        */
         if (pi->ipi_mflags & M_VLANTAG) {
                vlan_macip_lens |= (pi->ipi_vtag << E1000_ADVTXD_VLAN_SHIFT);
-       } else if ((pi->ipi_csum_flags & CSUM_OFFLOAD) == 0) {
+       } else if ((pi->ipi_csum_flags & IGB_CSUM_OFFLOAD) == 0) {
                return (0);
        }
        
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to