1. 15 12月, 2020 7 次提交
  2. 13 12月, 2020 1 次提交
  3. 12 12月, 2020 29 次提交
  4. 11 12月, 2020 3 次提交
    • T
      ppp: add PPPIOCBRIDGECHAN and PPPIOCUNBRIDGECHAN ioctls · 4cf476ce
      Tom Parkin 提交于
      This new ioctl pair allows two ppp channels to be bridged together:
      frames arriving in one channel are transmitted in the other channel
      and vice versa.
      
      The practical use for this is primarily to support the L2TP Access
      Concentrator use-case.  The end-user session is presented as a ppp
      channel (typically PPPoE, although it could be e.g. PPPoA, or even PPP
      over a serial link) and is switched into a PPPoL2TP session for
      transmission to the LNS.  At the LNS the PPP session is terminated in
      the ISP's network.
      
      When a PPP channel is bridged to another it takes a reference on the
      other's struct ppp_file.  This reference is dropped when the channels
      are unbridged, which can occur either explicitly on userspace calling
      the PPPIOCUNBRIDGECHAN ioctl, or implicitly when either channel in the
      bridge is unregistered.
      
      In order to implement the channel bridge, struct channel is extended
      with a new field, 'bridge', which points to the other struct channel
      making up the bridge.
      
      This pointer is RCU protected to avoid adding another lock to the data
      path.
      
      To guard against concurrent writes to the pointer, the existing struct
      channel lock 'upl' coverage is extended rather than adding a new lock.
      
      The 'upl' lock is used to protect the existing unit pointer.  Since the
      bridge effectively replaces the unit (they're mutually exclusive for a
      channel) it makes coding easier to use the same lock to cover them
      both.
      Signed-off-by: NTom Parkin <tparkin@katalix.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4cf476ce
    • W
      Revert "macb: support the two tx descriptors on at91rm9200" · 1d608d2e
      Willy Tarreau 提交于
      This reverts commit 0a4e9ce1.
      
      The code was developed and tested on an MSC313E SoC, which seems to be
      half-way between the AT91RM9200 and the AT91SAM9260 in that it supports
      both the 2-descriptors mode and a Tx ring.
      
      It turns out that after the code was merged I could notice that the
      controller would sometimes lock up, and only when dealing with sustained
      bidirectional transfers, in which case it would report a Tx overrun
      condition right after having reported being ready, and will stop sending
      even after the status is cleared (a down/up cycle fixes it though).
      
      After adding lots of traces I couldn't spot a sequence pattern allowing
      to predict that this situation would happen. The chip comes with no
      documentation and other bits are often reported with no conclusive
      pattern either.
      
      It is possible that my change is wrong just like it is possible that
      the controller on the chip is bogus or at least unpredictable based on
      existing docs from other chips. I do not have an RM9200 at hand to test
      at the moment and a few tests run on a more recent 9G20 indicate that
      this code path cannot be used there to test the code on a 3rd platform.
      
      Since the MSC313E works fine in the single-descriptor mode, and that
      people using the old RM9200 very likely favor stability over performance,
      better revert this patch until we can test it on the original platform
      this part of the driver was written for. Note that the reverted patch
      was actually tested on MSC313E.
      
      Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
      Cc: Claudiu Beznea <claudiu.beznea@microchip.com>
      Cc: Daniel Palmer <daniel@0x0f.com>
      Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
      Link: https://lore.kernel.org/netdev/20201206092041.GA10646@1wt.eu/Signed-off-by: NWilly Tarreau <w@1wt.eu>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1d608d2e
    • S
      net: qualcomm: rmnet: Update rmnet device MTU based on real device · b7f5eb6b
      Subash Abhinov Kasiviswanathan 提交于
      Packets sent by rmnet to the real device have variable MAP header
      lengths based on the data format configured. This patch adds checks
      to ensure that the real device MTU is sufficient to transmit the MAP
      packet comprising of the MAP header and the IP packet. This check
      is enforced when rmnet devices are created and updated and during
      MTU updates of both the rmnet and real device.
      
      Additionally, rmnet devices now have a default MTU configured which
      accounts for the real device MTU and the headroom based on the data
      format.
      Signed-off-by: NSean Tranchetti <stranche@codeaurora.org>
      Signed-off-by: NSubash Abhinov Kasiviswanathan <subashab@codeaurora.org>
      Tested-by: NLoic Poulain <loic.poulain@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b7f5eb6b