mbuf: segsz -> tso_segsz, which is more expressive
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Wed, 1 Aug 2012 02:54:12 +0000 (10:54 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Wed, 1 Aug 2012 02:54:40 +0000 (10:54 +0800)
sys/dev/netif/bnx/if_bnx.c
sys/netinet/tcp_output.c
sys/sys/mbuf.h

index 4af82d9..4cb2baa 100644 (file)
@@ -2822,7 +2822,8 @@ bnx_encap(struct bnx_softc *sc, struct mbuf **m_head0, uint32_t *txidx)
                m_head = *m_head0;
 
 #ifdef BNX_TSO_DEBUG
-               tso_nsegs = (m_head->m_pkthdr.len / m_head->m_pkthdr.segsz) - 1;
+               tso_nsegs = (m_head->m_pkthdr.len /
+                   m_head->m_pkthdr.tso_segsz) - 1;
                if (tso_nsegs > (BNX_TSO_NSTATS - 1))
                        tso_nsegs = BNX_TSO_NSTATS - 1;
                else if (tso_nsegs < 0)
@@ -4310,7 +4311,7 @@ bnx_setup_tso(struct bnx_softc *sc, struct mbuf **mp,
        th = mtodoff(m, struct tcphdr *, hoff + iphlen);
 #endif
 
-       mss = m->m_pkthdr.segsz;
+       mss = m->m_pkthdr.tso_segsz;
        flags = BGE_TXBDFLAG_CPU_PRE_DMA | BGE_TXBDFLAG_CPU_POST_DMA;
 
        ip->ip_len = htons(mss + iphlen + thoff);
index 9946203..d3d6a0f 100644 (file)
@@ -1026,7 +1026,7 @@ after_th:
                        m->m_pkthdr.csum_thlen = sizeof(struct tcphdr) + optlen;
                        if (use_tso) {
                                m->m_pkthdr.csum_flags = CSUM_TSO;
-                               m->m_pkthdr.segsz = segsz;
+                               m->m_pkthdr.tso_segsz = segsz;
                        } else {
                                m->m_pkthdr.csum_flags = CSUM_TCP;
                                m->m_pkthdr.csum_data =
index 95ef050..3300be0 100644 (file)
@@ -168,7 +168,7 @@ struct pkthdr {
                                        /* valid if CSUM UDP|TCP|TSO */
        uint8_t csum_lhlen;             /* link header length */
 
-       uint16_t segsz;                 /* TSO segment size */
+       uint16_t tso_segsz;             /* TSO segment size */
        uint16_t ether_vlantag;         /* ethernet 802.1p+q vlan tag */
 
        uint16_t hash;                  /* packet hash */