1. 24 8月, 2016 30 次提交
  2. 23 8月, 2016 10 次提交
    • D
      rxrpc: Use a tracepoint for skb accounting debugging · df844fd4
      David Howells 提交于
      Use a tracepoint to log various skb accounting points to help in debugging
      refcounting errors.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      df844fd4
    • D
      rxrpc: Drop channel number field from rxrpc_call struct · 01a90a45
      David Howells 提交于
      Drop the channel number (channel) field from the rxrpc_call struct to
      reduce the size of the call struct.  The field is redundant: if the call is
      attached to a connection, the channel can be obtained from there by AND'ing
      with RXRPC_CHANNELMASK.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      01a90a45
    • D
      rxrpc: When clearing a socket, clear the call sets in the right order · f36b5e44
      David Howells 提交于
      When clearing a socket, we should clear the securing-in-progress list
      first, then the accept queue and last the main call tree because that's the
      order in which a call progresses.  Not that a call should move from the
      accept queue to the main tree whilst we're shutting down a socket, but it a
      call could possibly move from sequreq to acceptq whilst we're clearing up.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      f36b5e44
    • D
      rxrpc: Tidy up the rxrpc_call struct a bit · dabe5a79
      David Howells 提交于
      Do a little tidying of the rxrpc_call struct:
      
       (1) in_clientflag is no longer compared against the value that's in the
           packet, so keeping it in this form isn't necessary.  Use a flag in
           flags instead and provide a pair of wrapper functions.
      
       (2) We don't read the epoch value, so that can go.
      
       (3) Move what remains of the data that were used for hashing up in the
           struct to be with the channel number.
      
       (4) Get rid of the local pointer.  We can get at this via the socket
           struct and we only use this in the procfs viewer.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      dabe5a79
    • D
      rxrpc: Remove RXRPC_CALL_PROC_BUSY · 26164e77
      David Howells 提交于
      Remove RXRPC_CALL_PROC_BUSY as work queue items are now 100% non-reentrant.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      26164e77
    • D
      Merge branch 'cpsw-mq' · 2d03d439
      David S. Miller 提交于
      Ivan Khoronzhuk says:
      
      ====================
      net: ethernet: ti: cpsw: add cpdma multi-queue support
      
      This series is intended to allow cpsw driver to use cpdma ability of
      h/w shaper to send/receive data with up to 8 tx and 8 rx queues. This
      series doesn't contain interface to configure h/w shaper itself, it
      contains only multi-queue support part and ability to configure number
      of tx/rx queues with ethtool, it also doesn't contain mapping of input
      traffic to rx queues, as it can depend on usage and requires separate
      interface for setup.
      
      Default shaper mode - priority mode. The h/w shaper configuration will
      be added with separate patch series. This series doesn't affect on net
      throughput.
      
      Tested on:
      am572x-idk, 1Gbps link
      am335-boneblack, 100Mbps link.
      
      A simple example for splitting traffic on queues:
      
      $ ethtool -l eth0
      
      $ ethtool -L eth0 rx 8 tx 8
      
      $ tc qdisc add dev eth0 root handle 1: multiq
      
      $ tc filter add dev eth0 parent 1: protocol ip prio 1 u32 \
          match ip dst 172.22.39.12 \
          action skbedit queue_mapping 5
      
      Based on: net-next/master
      V3: https://lkml.org/lkml/2016/8/15/788
      
      Since v3:
      -changed arg to priv in fill_rx_channels in
        net: ethernet: ti: davinci_cpdma: split descs num between all channels
      - added more comments to cpsw_set_channels
      
      Since v2:
      - added new patch to avoid warn while ctrl stop
      
        net: ethernet: ti: cpsw: add ethtool channels support
      - enable ctrl in case at least one interface is running
      
      Since v1:
      - removed cpdam_check_free_desc function
      - remove pm_runtime calls as they are used in begin/complete ethtool calls now
      - removed change of driver version. it can be done later
      - corrected setup of channels for dual_emac mode with ethtool
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2d03d439
    • I
      net: ethernet: ti: cpsw: add ethtool channels support · ce52c744
      Ivan Khoronzhuk 提交于
      These ops allow to control number of channels driver is allowed to
      work with at cpdma level. The maximum number of channels is 8 for
      rx and 8 for tx. In dual_emac mode the h/w channels are shared
      between two interfaces and changing number on one interface changes
      number of channels on another.
      
      How many channels are supported and enabled:
      $ ethtool -l ethX
      
      Change number of channels (up to 8)
      $ ethtool -L ethX rx 6 tx 6
      
      Per-channel statistic:
      $ ethtool -S ethX
      Signed-off-by: NIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
      Reviewed-by: NMugunthan V N <mugunthanvnm@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ce52c744
    • I
      net: ethernet: ti: davinci_cpdma: move cpdma channel struct macroses to internals · 925d65e6
      Ivan Khoronzhuk 提交于
      Keep the driver internals in C file. Currently it's not required for
      drivers to know rx or tx a channel is, except create function.
      So correct "channel create" function, and use all channel struct
      macroses only for internal use.
      Reviewed-by: NMugunthan V N <mugunthanvnm@ti.com>
      Signed-off-by: NIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      925d65e6
    • I
      net: ethernet: ti: cpsw: add multi queue support · e05107e6
      Ivan Khoronzhuk 提交于
      The cpsw h/w supports up to 8 tx and 8 rx channels. This patch adds
      multi-queue support to the driver only, shaper configuration will
      be added with separate patch series. Default shaper mode, as
      before, priority mode, but with corrected priority order, 0 - is
      highest priority, 7 - lowest.
      
      The poll function handles all unprocessed channels, till all of
      them are free, beginning from hi priority channel.
      
      In dual_emac mode the channels are shared between two network devices,
      as it's with single-queue default mode.
      
      The statistic for every channel can be read with:
      $ ethtool -S ethX
      Signed-off-by: NIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
      Reviewed-by: NMugunthan V N <mugunthanvnm@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e05107e6
    • I
      net: ethernet: ti: davinci_cpdma: fix locking while ctrl_stop · 080d5c5a
      Ivan Khoronzhuk 提交于
      The interrupts shouldn't be disabled while receiving skb, but while
      ctrl_stop, the channels are stopped and all remaining packets are
      handled with netif_receive_skb(), it can cause WARN_ONCE when ctrl
      is stopping while not all packets were handled with NAPIs:
      
      lock_irq_save
          cpdma_ctlr_stop
             cpdma_chan_top
                 __cpdma_chan_free
                     cpsw_rx_handler
                         netif_receive_skb
      
      So, split locking while ctrl stop thus interrupts are still
      enabled while skbs handling. It can cause WARN_ONCE in rare
      cases when ctrl is stopping while not all packets were handled
      with NAPIs.
      Reviewed-by: NMugunthan V N <mugunthanvnm@ti.com>
      Signed-off-by: NIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      080d5c5a