1. 12 Nov, 2014 2 commits
    • Pablo Neira Ayuso's avatar
      netfilter: nft_redir: fix sparse warnings · baf4750d
      Pablo Neira Ayuso authored
      >> net/netfilter/nft_redir.c:39:26: sparse: incorrect type in assignment (different base types)
         net/netfilter/nft_redir.c:39:26:    expected unsigned int [unsigned] [usertype] nla_be32
         net/netfilter/nft_redir.c:39:26:    got restricted __be32
      >> net/netfilter/nft_redir.c:40:40: sparse: cast to restricted __be32
      >> net/netfilter/nft_redir.c:40:40: sparse: cast to restricted __be32
      >> net/netfilter/nft_redir.c:40:40: sparse: cast to restricted __be32
      >> net/netfilter/nft_redir.c:40:40: sparse: cast to restricted __be32
      >> net/netfilter/nft_redir.c:40:40: sparse: cast to restricted __be32
      >> net/netfilter/nft_redir.c:40:40: sparse: cast to restricted __be32
      >> net/netfilter/nft_redir.c:46:34: sparse: incorrect type in assignment (different base types)
         net/netfilter/nft_redir.c:46:34:    expected unsigned int [unsigned] [usertype] nla_be32
         net/netfilter/nft_redir.c:46:34:    got restricted __be32
      >> net/netfilter/nft_redir.c:47:48: sparse: cast to restricted __be32
      >> net/netfilter/nft_redir.c:47:48: sparse: cast to restricted __be32
      >> net/netfilter/nft_redir.c:47:48: sparse: cast to restricted __be32
      >> net/netfilter/nft_redir.c:47:48: sparse: cast to restricted __be32
      >> net/netfilter/nft_redir.c:47:48: sparse: cast to restricted __be32
      >> net/netfilter/nft_redir.c:47:48: sparse: cast to restricted __be32
      
      Fixes: e9105f1b ("netfilter: nf_tables: add new expression nft_redir")
      Reported-by: default avatarkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      baf4750d
    • Pablo Neira Ayuso's avatar
      netfilter: fix unmet dependencies in NETFILTER_XT_TARGET_REDIRECT · f6c6339d
      Pablo Neira Ayuso authored
      warning: (NETFILTER_XT_TARGET_REDIRECT) selects NF_NAT_REDIRECT_IPV4 which has unmet direct dependencies (NET && INET && NETFILTER && NF_NAT_IPV4)
      
      warning: (NETFILTER_XT_TARGET_REDIRECT) selects NF_NAT_REDIRECT_IPV6 which has unmet direct dependencies (NET && INET && IPV6 && NETFILTER && NF_NAT_IPV6)
      
      Fixes: 8b13eddf ("netfilter: refactor NAT redirect IPv4 to use it from nf_tables")
      Fixes: 9de920ed ("netfilter: refactor NAT redirect IPv6 code to use it from nf_tables")
      Reported-by: default avatarkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      f6c6339d
  2. 09 Nov, 2014 1 commit
  3. 04 Nov, 2014 1 commit
  4. 30 Oct, 2014 4 commits
  5. 28 Oct, 2014 1 commit
  6. 27 Oct, 2014 17 commits
  7. 25 Oct, 2014 4 commits
    • David S. Miller's avatar
      Merge branch 'sunvnet-napi' · 9286ae01
      David S. Miller authored
      Sowmini Varadhan says:
      
      ====================
      sunvnet: NAPIfy sunvnet
      
      This patchset converts the sunvnet driver to use the NAPI framework.
      Changes since v4 to Patch1:
        vnet_event accumulates LDC_EVENT_* bits into rx_event.
        vnet_event_napi() unrolls send_events() logic to process all rx_event bits.
      Changes since v5:
        Patch 1: use net_device.h definition for NAPI_POLL_WEIGHT.
        Drop sparclinux changes (patch3) per David Miller feedback
      
      Patch 1 in the series addresses the packet-receive path- all
      the vnet_event() processing is moved into NAPI context.
      This patch is dependant on the sparc-next commit:
        "sparc64: Add vio_set_intr() to enable/disable Rx interrupts"
        (sparc commit id ca605b7d)
      
      Patch 2 uses RCU to fix race conditions between vnet_port_remove and
      paths that access/modify port-related state, such as vnet_start_xmit.
      
      Patch 3 leverages from the NAPIfied Rx path,
      dropping superfluous usage of the irqsave/irqrestores on the vio.lock
      where possible.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9286ae01
    • Sowmini Varadhan's avatar
      sunvnet: Remove irqsave/irqrestore on vio.lock · 13b13dd9
      Sowmini Varadhan authored
      After the  NAPIfication of sunvnet, we no longer need to
      synchronize by doing irqsave/restore on vio.lock in the
      I/O fastpath.
      
      NAPI ->poll() is non-reentrant, so all RX processing occurs
      strictly in a serialized environment. TX reclaim is done in NAPI
      context, so the netif_tx_lock can be used to serialize
      critical sections between Tx and Rx paths.
      Signed-off-by: default avatarSowmini Varadhan <sowmini.varadhan@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      13b13dd9
    • Sowmini Varadhan's avatar
      sunvnet: Use RCU to synchronize port usage with vnet_port_remove() · 2a968dd8
      Sowmini Varadhan authored
      A vnet_port_remove could be triggered as a result of an ldm-unbind
      operation by the peer, module unload, or other changes to the
      inter-vnet-link configuration.  When this is concurrent with
      vnet_start_xmit(), there are several race sequences possible,
      such as
      
      thread 1                                    thread 2
      vnet_start_xmit
      -> tx_port_find
         spin_lock_irqsave(&vp->lock..)
         ret = __tx_port_find(..)
         spin_lock_irqrestore(&vp->lock..)
                                                 vio_remove -> ..
                                                     ->vnet_port_remove
                                                 spin_lock_irqsave(&vp->lock..)
                                                 cleanup
                                                 spin_lock_irqrestore(&vp->lock..)
                                                 kfree(port)
      /* attempt to use ret will bomb */
      
      This patch adds RCU locking for port access so that vnet_port_remove
      will correctly clean up port-related state.
      Signed-off-by: default avatarSowmini Varadhan <sowmini.varadhan@oracle.com>
      Acked-by: default avatarDwight Engen <dwight.engen@oracle.com>
      Acked-by: default avatarBob Picco <bob.picco@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2a968dd8
    • Sowmini Varadhan's avatar
      sunvnet: NAPIfy sunvnet · 69088822
      Sowmini Varadhan authored
      Move Rx packet procssing to the NAPI poll callback.
      Disable VIO interrupt and unconditioanlly go into NAPI
      context from vnet_event.
      
      Note that we want to minimize the number of LDC
      STOP/START messages sent. Specifically, do not send a STOP
      message if vnet_walk_rx does not read all the available descriptors
      because of the NAPI budget limitation. Instead, note the end index
      as part of port state, and resume from this index when the
      next poll callback is triggered.
      Signed-off-by: default avatarSowmini Varadhan <sowmini.varadhan@oracle.com>
      Acked-by: default avatarRaghuram Kothakota <raghuram.kothakota@oracle.com>
      Acked-by: default avatarDwight Engen <dwight.engen@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      69088822
  8. 24 Oct, 2014 10 commits