Changeset 5b825b3 for lib/format_linux.c


Ignore:
Timestamp:
12/14/12 09:41:04 (9 years ago)
Author:
Richard Sanger <rjs51@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
7d6d80e
Parents:
90e8d92
Message:

Should be using TPACKET_ALIGN(TPACKET_HDRLEN) to calculate the size of a frame header.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_linux.c

    r6ba84d9 r5b825b3  
    7878#define MAX_ORDER 10
    7979
    80 /* Cached page size, the page size shoudn't be changing */
     80/* Cached page size, the page size shouldn't be changing */
    8181static int pagesize = 0;
    8282
     
    302302         */
    303303        if (ioctl(fd, SIOCGIFMTU, (caddr_t) &ifr) >= 0)
    304                 max_frame = ifr.ifr_mtu + sizeof(struct tpacket2_hdr);
     304                max_frame = ifr.ifr_mtu + TPACKET_ALIGN(TPACKET_HDRLEN);
    305305        if (max_frame > LIBTRACE_PACKET_BUFSIZE)
    306306                max_frame = LIBTRACE_PACKET_BUFSIZE;
Note: See TracChangeset for help on using the changeset viewer.