Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 May 2004 20:57:18 -0700 (PDT)
From:      Bill Paul <wpaul@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/netinet6 ip6_output.c
Message-ID:  <200405140357.i4E3vIwp062907@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
wpaul       2004/05/13 20:57:17 PDT

  FreeBSD src repository

  Modified files:
    sys/netinet6         ip6_output.c 
  Log:
  Fix a bug which I discovered recently while doing IPv6 testing at
  Wind River. In the IPv4 output path, one of the tests in ip_output()
  checks how many slots are actually available in the interface output
  queue before attempting to send a packet. If, for example, we need
  to transmit a packet of 32K bytes over an interface with an MTU of
  1500, we know it's going to take about 21 fragments to do it. If
  there's less than 21 slots left in the output queue, there's no point
  in transmitting anything at all: IP does not do retransmission, so
  sending only some of the fragments would just be a waste of bandwidth.
  (In an extreme case, if you're sending a heavy stream of fragmented
  packets, you might find yourself sending nothing by the first fragment
  of all your packets.) So if ip_output() notices there's not enough
  room in the output queue to send the frame, it just dumps the packet
  and returns ENOBUFS to the app.
  
  It turns out ip6_output() lacks this code. Consequently, this caused
  the netperf UDPIPV6_STREAM test to produce very poor results with large
  write sizes. This commit adds code to check the remaining space in the
  output queue and junk fragmented packets if they're too big to be
  sent, just like with IPv4. (I can't imagine anyone's running an NFS
  server using UDP over IPv6, but if they are, this will likely make them
  a lot happier. :)
  
  Revision  Changes    Path
  1.81      +12 -0     src/sys/netinet6/ip6_output.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200405140357.i4E3vIwp062907>