Changeset 54fb9f0 in rtems-libbsd


Ignore:
Timestamp:
Jun 19, 2015, 7:35:06 AM (4 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.11, 5283630d2c9d40deb0183696d278e02644fe4326, freebsd-9.3, bc2ba9a9cdc7381c2a4f2ae6ee303be636f31368
Children:
82830ce
Parents:
59bc7c1
Message:

Return the default TX and RX hardware checksum for the Cadence driver to off.

The hardware support does not seem to work with qemu. The support can be
enabled with ifconfig or via ioctl on real hardware to get the
performance boost.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • freebsd/sys/dev/cadence/if_cgem.c

    r59bc7c1 r54fb9f0  
    330330
    331331        net_cfg &= ~(CGEM_NET_CFG_MULTI_HASH_EN |
    332                      CGEM_NET_CFG_NO_BCAST | 
     332                     CGEM_NET_CFG_NO_BCAST |
    333333                     CGEM_NET_CFG_COPY_ALL);
    334334
     
    463463                              (void *)sc->txring,
    464464                              CGEM_NUM_TX_DESCS*sizeof(struct cgem_tx_desc),
    465                               cgem_getaddr, &sc->txring_physaddr, 
     465                              cgem_getaddr, &sc->txring_physaddr,
    466466                              BUS_DMA_NOWAIT);
    467467        if (err)
     
    515515#ifndef __rtems__
    516516                /* Load map and plug in physical address. */
    517                 if (bus_dmamap_load_mbuf_sg(sc->mbuf_dma_tag, 
     517                if (bus_dmamap_load_mbuf_sg(sc->mbuf_dma_tag,
    518518                              sc->rxring_m_dmamap[sc->rxring_hd_ptr], m,
    519519                              segs, &nsegs, BUS_DMA_NOWAIT)) {
     
    543543                } else
    544544                        sc->rxring[sc->rxring_hd_ptr++].addr = segs[0].ds_addr;
    545                        
     545
    546546                sc->rxring_queued++;
    547547        }
     
    11301130        WR4(sc, CGEM_RX_QBAR, (uint32_t) sc->rxring_physaddr);
    11311131        WR4(sc, CGEM_TX_QBAR, (uint32_t) sc->txring_physaddr);
    1132        
     1132
    11331133        /* Enable rx and tx. */
    11341134        sc->net_ctl_shadow |= (CGEM_NET_CTRL_TX_EN | CGEM_NET_CTRL_RX_EN);
     
    13241324                        }
    13251325                }
    1326                 if ((ifp->if_capenable & (IFCAP_RXCSUM | IFCAP_TXCSUM)) == 
     1326                if ((ifp->if_capenable & (IFCAP_RXCSUM | IFCAP_TXCSUM)) ==
    13271327                    (IFCAP_RXCSUM | IFCAP_TXCSUM))
    13281328                        ifp->if_capenable |= IFCAP_VLAN_HWCSUM;
     
    14241424        struct cgem_softc *sc = device_get_softc(dev);
    14251425        int tries;
    1426        
     1426
    14271427        WR4(sc, CGEM_PHY_MAINT,
    14281428            CGEM_PHY_MAINT_CLAUSE_22 | CGEM_PHY_MAINT_MUST_10 |
     
    17791779        ifp->if_capabilities |= IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6 |
    17801780                IFCAP_VLAN_MTU | IFCAP_VLAN_HWCSUM;
    1781 #ifndef __rtems__
    17821781        /* Disable hardware checksumming by default. */
    17831782        ifp->if_hwassist = 0;
    17841783        ifp->if_capenable = ifp->if_capabilities &
    17851784                ~(IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6 | IFCAP_VLAN_HWCSUM);
    1786 #else /* __rtems__ */
    1787         ifp->if_hwassist = CGEM_CKSUM_ASSIST;
    1788         ifp->if_capenable = ifp->if_capabilities;
    1789 #endif /* __rtems__ */
    17901785        ifp->if_snd.ifq_drv_maxlen = CGEM_NUM_TX_DESCS;
    17911786        IFQ_SET_MAXLEN(&ifp->if_snd, ifp->if_snd.ifq_drv_maxlen);
  • libbsd.txt

    r59bc7c1 r54fb9f0  
    10761076E1000 IGB               _bsd_igb_pcimodule_sys_init     Links
    10771077E1000 EM                _bsd_em_pcimodule_sys_init      Links
    1078 ----
    1079 
     1078Cadence                 ?                               Links, works.
     1079----
    10801080
    10811081Symbols (A)
    10821082         pci_get_vpd_ident
     1083
     1084=== Cadence ===
     1085
     1086The cadence driver works on the Xilinx Zynq platform. The hardware checksum
     1087support works on real hardware but does not seem to be supported on qemu
     1088therefore the default state is disabled and it can be enabled from the shell
     1089with:
     1090
     1091  # ifconfig cgem0 rxcsum txcsum
     1092
     1093or with an ioctl call to the network interface driver with SIOCSIFCAP and the
     1094mask IFCAP_TXCSUM and IFCAP_RXCSUM set.
    10831095
    10841096== Problems to report to FreeBSD ==
Note: See TracChangeset for help on using the changeset viewer.