Changeset ed254d5 in rtems-libbsd


Ignore:
Timestamp:
May 18, 2017, 6:13:07 AM (2 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
647dd08ae2aa69b935c2847ea450fb824322ecae, c6261f97870562d4c797cfb1ff1ba0affb85a916
Children:
96da40c
Parents:
3471177
git-author:
Sebastian Huber <sebastian.huber@…> (05/18/17 06:13:07)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/23/17 07:24:05)
Message:

dpaa: Use receive checksum offload

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • linux/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c

    r3471177 red254d5  
    22732273        struct ifnet *ifp = net_dev->ifp;
    22742274
    2275         if (unlikely(fd->status & FM_FD_STAT_TX_ERRORS) != 0) {
     2275        if (unlikely(be32_to_cpu(fd->status) & FM_FD_STAT_TX_ERRORS) != 0) {
    22762276                if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
    22772277        }
     
    24282428{
    24292429        struct dpaa_bp *dpaa_bp;
     2430        u32 fd_status;
    24302431        enum qm_fd_format fd_format;
    24312432        struct mbuf *m;
    24322433        struct ifnet *ifp;
    24332434
     2435        fd_status = be32_to_cpu(fd->status);
    24342436        ifp = net_dev->ifp;
    24352437
    2436         if (unlikely(fd->status & FM_FD_STAT_RX_ERRORS) != 0) {
     2438        if (unlikely(fd_status & FM_FD_STAT_RX_ERRORS) != 0) {
    24372439                if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
    24382440                dpaa_fd_release(net_dev, fd);
     
    24482450                BSD_ASSERT(fd_format == qm_fd_sg);
    24492451                m = sg_fd_to_mbuf(dpaa_bp, fd, ifp, count_ptr);
     2452        }
     2453
     2454        if ((be32_to_cpu(fd->status) & FM_FD_STAT_L4CV) != 0) {
     2455                m->m_pkthdr.csum_flags |= CSUM_IP_CHECKED | CSUM_IP_VALID |
     2456                    CSUM_DATA_VALID | CSUM_PSEUDO_HDR;
     2457                m->m_pkthdr.csum_data = 0xffff;
    24502458        }
    24512459
  • rtemsbsd/sys/powerpc/drivers/net/ethernet/freescale/dpaa/if_fmanmac.c

    r3471177 red254d5  
    434434        if_initname(ifp, &sc->name[0], sc->mac_dev.data.mac_hw_id);
    435435        ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
    436         ifp->if_capabilities = IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6 |
     436        ifp->if_capabilities = IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6 |
    437437            IFCAP_VLAN_MTU | IFCAP_JUMBO_MTU;
    438438        ifp->if_capenable = ifp->if_capabilities;
Note: See TracChangeset for help on using the changeset viewer.