(no subject)

From: Don Lewis (truckman_at_FreeBSD.org)
Date: 05/18/03

  • Next message: Don Lewis: "fxp patch to disable 82550 IPCBXMIT feature"
    Date: Sat, 17 May 2003 18:10:48 -0700 (PDT)
    To: current@FreeBSD.org
    
    

    Since I'm not the only one who has run into the problem with 82550-based
    fxp cards truncating packets of certain sizes and we're getting close to
    5.1-RELEASE, I thought I should crank out a patch that creates a
    boot-time knob to keep the fxp driver from enabling the new feature in
    these cards that seems to trigger the problem.

    For the record, my card is labeled as:
            Intel (R) Pro/100S Desktop Adapter
    and are the PILA8460C3 flavor. The chip is labeled 82550GY. The
    information returned by "pciconf -l" is:

    fxp0@pci0:10:0: class=0x020000 card=0x00508086 chip=0x12298086 rev=0x0d hdr=0x00

    The other report of this problem that I have data about is

    fxp0@pci7:2:0: class=0x020000 card=0x10508086 chip=0x12298086 rev=0x0d hdr=0x00

    This problem mostly seems to affect NFS, probably because of the packet
    size distribution in NFS versus the packet sizes commonly found when
    using ssh or browsing the web.

    It is possible to test for the presence of this problem in a non-VLAN
    network by doing:
            ping -s 216 somehost
            ping -s 1696 somehost
            ping -s 3176 somehost

    If you are affected by this problem, you won't get a response to a ping,
    and a tcpdump from a host other than the broken one will show that the
    ICMP packets are truncated.

    I elected to make the knob tunable by a kernel environment variable that
    can be set in /boot/loader.conf. I'm open to changing the variable name
    or to making it settable in /boot/device.hints.

    How should this knob be documented so that users who are affected by
    this problem can easily find it?

    Index: sys/dev/fxp/if_fxp.c
    ===================================================================
    RCS file: /home/ncvs/src/sys/dev/fxp/if_fxp.c,v
    retrieving revision 1.178
    diff -u -r1.178 if_fxp.c
    --- sys/dev/fxp/if_fxp.c 30 Apr 2003 04:14:56 -0000 1.178
    +++ sys/dev/fxp/if_fxp.c 18 May 2003 00:10:09 -0000
    @@ -379,7 +379,8 @@
             u_int32_t val;
             u_int16_t data, myea[ETHER_ADDR_LEN / 2];
             int i, rid, m1, m2, prefer_iomap, maxtxseg;
    - int s;
    + int s, ipcbxmit_disable = 0;
    + char tmpstr[32];
     
             sc->dev = dev;
             callout_handle_init(&sc->stat_ch);
    @@ -578,9 +579,19 @@
              * and later chips. Note: we need extended TXCB support
              * too, but that's already enabled by the code above.
              * Be careful to do this only on the right devices.
    + *
    + * At least some 82550 cards probed as "chip=0x12298086 rev=0x0d"
    + * truncate packets that end with an mbuf containing 1 to 3 bytes
    + * when used with this feature enabled in this version of the
    + * driver. The hw.fxp.DEVICENUMBER.ipcbxmit_disable knob allows
    + * this to be disabled at boot time.
              */
     
    - if (sc->revision == FXP_REV_82550 || sc->revision == FXP_REV_82550_C) {
    + snprintf(tmpstr, sizeof(tmpstr), "hw.fxp.%d.ipcbxmit_disable",
    + device_get_unit(dev));
    + TUNABLE_INT_FETCH(tmpstr, &ipcbxmit_disable);
    + if (ipcbxmit_disable == 0 && (sc->revision == FXP_REV_82550 ||
    + sc->revision == FXP_REV_82550_C)) {
                     sc->rfa_size = sizeof (struct fxp_rfa);
                     sc->tx_cmd = FXP_CB_COMMAND_IPCBXMIT;
                     sc->flags |= FXP_FLAG_EXT_RFA;

    _______________________________________________
    freebsd-current@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-current
    To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"


  • Next message: Don Lewis: "fxp patch to disable 82550 IPCBXMIT feature"

    Relevant Pages

    • Re: rl(4) is broken in STABLE
      ... Look at the incoming packets, ... then you need to report this as well. ... should show me what "ifconfig -a" says. ... I don't have one of these cards, so I'm relying on you people to provide ...
      (freebsd-stable)
    • one2many/bonding/loadbalancing/failover/ freebsd 5.3
      ... I have 2 network cards. ... Packets are sent on the 2 cards, if a cable is unplugged, all packets ... ifconfig vr0 up -arp ... ngctl msg vr0: setpromisc 1 ...
      (comp.unix.bsd.freebsd.misc)
    • Re: crypto accelerators
      ... one of trying to encrypt packets to increase throughput. ... So the question is whether these cards, ... I have several Soekris 1401 ... The only place I found it really helpful for ssh connections was on ...
      (freebsd-net)
    • fxp patch to disable 82550 IPCBXMIT feature
      ... fxp cards truncating packets of certain sizes and we're getting close to ... these cards that seems to trigger the problem. ... ICMP packets are truncated. ... I elected to make the knob tunable by a kernel environment variable that ...
      (freebsd-current)
    • Re: VPN woes: telnet OK, ftp put OK, ftp get hangs
      ... The MTU is used to specify the largest packets size. ... Different layer 2 ... protocols support different sizes. ...
      (comp.os.linux.networking)