1. 14 4月, 2012 1 次提交
    • D
      ppp: Fix race condition with queue start/stop · 9a5d2bd9
      David Woodhouse 提交于
      Commit e675f0cc ("ppp: Don't stop and
      restart queue on every TX packet") introduced a race condition which
      could leave the net queue stopped even when the channel is no longer
      busy. By calling netif_stop_queue() from ppp_start_xmit(), based on the
      return value from ppp_xmit_process() but *after* all the locks have been
      dropped, we could potentially do so *after* the channel has actually
      finished transmitting and attempted to re-wake the queue.
      
      Fix this by moving the netif_stop_queue() into ppp_xmit_process() under
      the xmit lock. I hadn't done this previously, because it gets called
      from other places than ppp_start_xmit(). But I now think it's the better
      option. The net queue *should* be stopped if the channel becomes
      congested due to writes from pppd, anyway.
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9a5d2bd9
  2. 04 4月, 2012 1 次提交
    • D
      ppp: Don't stop and restart queue on every TX packet · e675f0cc
      David Woodhouse 提交于
      For every transmitted packet, ppp_start_xmit() will stop the netdev
      queue and then, if appropriate, restart it. This causes the TX softirq
      to run, entirely gratuitously.
      
      This is "only" a waste of CPU time in the normal case, but it's actively
      harmful when the PPP device is a TEQL slave — the wakeup will cause the
      offending device to receive the next TX packet from the TEQL queue, when
      it *should* have gone to the next slave in the list. We end up seeing
      large bursts of packets on just *one* slave device, rather than using
      the full available bandwidth over all slaves.
      
      This patch fixes the problem by *not* unconditionally stopping the queue
      in ppp_start_xmit(). It adds a return value from ppp_xmit_process()
      which indicates whether the queue should be stopped or not.
      
      It *doesn't* remove the call to netif_wake_queue() from
      ppp_xmit_process(), because other code paths (especially from
      ppp_output_wakeup()) need it there and it's messy to push it out to the
      other callers to do it based on the return value. So we leave it in
      place — it's a no-op in the case where the queue wasn't stopped, so it's
      harmless in the TX path.
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e675f0cc
  3. 05 3月, 2012 3 次提交
    • P
      ppp: Replace uses of <linux/if_ppp.h> with <linux/ppp-ioctl.h> · 4b32da2b
      Paul Mackerras 提交于
      Since all that include/linux/if_ppp.h does is #include <linux/ppp-ioctl.h>,
      this replaces the occurrences of #include <linux/if_ppp.h> with
      #include <linux/ppp-ioctl.h>.
      
      It also corrects an error in Documentation/networking/l2tp.txt, where
      it referenced include/linux/if_ppp.h as the source of some definitions
      that are actually now defined in include/linux/if_pppol2tp.h.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4b32da2b
    • P
      ppp: Move ioctl definitions from if_ppp.h to new ppp-ioctl.h · bf7daebb
      Paul Mackerras 提交于
      This moves the definitions of the ioctls, constants and structures
      relating to the ppp_generic interface to userspace out from if_ppp.h
      to a new file, ppp-ioctl.h.  The new file has my copyright since I
      designed and implemented the ppp_generic interface in the late 1990s.
      None of the contents of this file comes from the original if_ppp.h
      published by Carnegie Mellon University.
      
      Of the remainder of if_ppp.h, only the PPP_MTU definition was being
      used, and this replaces the uses of it with PPP_MRU (which is identical).
      Therefore, this replaces the entire file with the single line
      
      #include <linux/ppp-ioctl.h>
      
      which clearly doesn't contain any CMU code.  Thus I have removed the
      CMU copyright notice with its problematic advertising clause, and in
      fact since it's only one trivial line I have not added any other
      copyright notice.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bf7daebb
    • P
      ppp: Change copyright notices from ANU to me · 784db3f0
      Paul Mackerras 提交于
      This changes the copyright notices on the PPP code that I developed
      in the late 1990s from being copyright The Australian National
      University to copyright Paul Mackerras.  I can do this as I have an
      acknowledgement in writing from the Head of the Computer Science
      Department at ANU (where I worked then) that ANU does not claim any
      intellectual property in this code.
      
      While I'm at it, change the copyright notice from BSD-style to
      GNU GPL like the rest of the kernel.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      784db3f0
  4. 25 2月, 2012 1 次提交
    • B
      ppp: fix 'ppp_mp_reconstruct bad seq' errors · 8a49ad6e
      Ben McKeegan 提交于
      This patch fixes a (mostly cosmetic) bug introduced by the patch
      'ppp: Use SKB queue abstraction interfaces in fragment processing'
      found here: http://www.spinics.net/lists/netdev/msg153312.html
      
      The above patch rewrote and moved the code responsible for cleaning
      up discarded fragments but the new code does not catch every case
      where this is necessary.  This results in some discarded fragments
      remaining in the queue, and triggering a 'bad seq' error on the
      subsequent call to ppp_mp_reconstruct.  Fragments are discarded
      whenever other fragments of the same frame have been lost.
      This can generate a lot of unwanted and misleading log messages.
      
      This patch also adds additional detail to the debug logging to
      make it clearer which fragments were lost and which other fragments
      were discarded as a result of losses. (Run pppd with 'kdebug 1'
      option to enable debug logging.)
      Signed-off-by: NBen McKeegan <ben@netservers.co.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8a49ad6e
  5. 14 2月, 2012 1 次提交
  6. 01 2月, 2012 1 次提交
  7. 13 1月, 2012 1 次提交
  8. 08 12月, 2011 1 次提交
  9. 24 11月, 2011 1 次提交
  10. 27 8月, 2011 1 次提交
    • J
      ppp: Move the PPP drivers · 224cf5ad
      Jeff Kirsher 提交于
      Move the PPP drivers into drivers/net/ppp/ and make the
      necessary Kconfig and Makefile changes.
      
      CC: Paul Mackerras <paulus@samba.org>
      CC: Frank Cusack <fcusack@fcusack.com>
      CC: Michal Ostrowski <mostrows@speakeasy.net>
      CC: Michal Ostrowski <mostrows@earthlink.net>
      CC: Dmitry Kozlov <xeb@mail.ru>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      224cf5ad