Changeset ed254d5 in rtems-libbsd for linux


Ignore:
Timestamp:
May 18, 2017, 6:13:07 AM (2 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5283630d2c9d40deb0183696d278e02644fe4326, bc2ba9a9cdc7381c2a4f2ae6ee303be636f31368
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

File:
1 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
Note: See TracChangeset for help on using the changeset viewer.