1. Nov 20, 2014
  2. Nov 17, 2014
  3. Nov 13, 2014
    • Pablo Neira Ayuso's avatar
      netfilter: nfnetlink_log: remove unnecessary error messages · 82251615
      Pablo Neira Ayuso authored
      
      
      In case of OOM, there's nothing userspace can do.
      
      If there's no room to put the payload in __build_packet_message(),
      jump to nla_put_failure which already performs the corresponding
      error reporting.
      
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      82251615
    • Florian Westphal's avatar
      netfilter: fix various sparse warnings · 56768644
      Florian Westphal authored
      
      
      net/bridge/br_netfilter.c:870:6: symbol 'br_netfilter_enable' was not declared. Should it be static?
        no; add include
      net/ipv4/netfilter/nft_reject_ipv4.c:22:6: symbol 'nft_reject_ipv4_eval' was not declared. Should it be static?
        yes
      net/ipv6/netfilter/nf_reject_ipv6.c:16:6: symbol 'nf_send_reset6' was not declared. Should it be static?
        no; add include
      net/ipv6/netfilter/nft_reject_ipv6.c:22:6: symbol 'nft_reject_ipv6_eval' was not declared. Should it be static?
        yes
      net/netfilter/core.c:33:32: symbol 'nf_ipv6_ops' was not declared. Should it be static?
        no; add include
      net/netfilter/xt_DSCP.c:40:57: cast truncates bits from constant value (ffffff03 becomes 3)
      net/netfilter/xt_DSCP.c:57:59: cast truncates bits from constant value (ffffff03 becomes 3)
        add __force, 3 is what we want.
      net/ipv4/netfilter/nf_log_arp.c:77:6: symbol 'nf_log_arp_packet' was not declared. Should it be static?
        yes
      net/ipv4/netfilter/nf_reject_ipv4.c:17:6: symbol 'nf_send_reset' was not declared. Should it be static?
        no; add include
      
      Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      56768644
  4. Nov 12, 2014
    • 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
  5. Nov 09, 2014
  6. Nov 05, 2014
  7. Oct 31, 2014
  8. Oct 30, 2014
  9. Oct 28, 2014
  10. Oct 27, 2014
  11. Oct 26, 2014
    • 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
  12. Oct 25, 2014
    • David S. Miller's avatar
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next · 132fb579
      David S. Miller authored
      
      
      Jeff Kirsher says:
      
      ====================
      Intel Wired LAN Driver Updates 2014-10-23
      
      This series contains updates to i40e and i40evf.
      
      Jesse modifies the i40e driver to only notify the firmware on link up/down
      and qualified module events.  Also simplified the job of managing link
      state by using the admin queue receive event for link events as a signal
      to tell the driver to update link state.
      
      Jeff (me) cleans up the inconsistent use of tabs for indentation in the admin
      queue command header file.
      
      Neerav converts the use of udelay() to usleep_range().
      
      Anjali fixes a bug where receive would stop after some stress by adding
      a sleep and restart as well as moving the setting of flow control because
      it should be done at a PF level and not a VSI level.
      
      Mitch adds code to handle link events when updating the PF switch, which
      allows link information to be properly provided to VFS in all cases.
      
      Catherine adds driver support for 10GBaseT and bumps driver version.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      132fb579
    • Fabian Frederick's avatar
    • Fabian Frederick's avatar
      lapb: move EXPORT_SYMBOL after functions. · 75da1469
      Fabian Frederick authored
      
      
      See Documentation/CodingStyle Chapter 6
      
      Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      75da1469
    • David S. Miller's avatar
      Merge branch 'berlin_ethernet' · 5f3619f2
      David S. Miller authored
      Sebastian Hesselbarth says:
      
      ====================
      Marvell PXA168 libphy handling and Berlin Ethernet
      
      This patch series deals with a removing a IP feature that can be found
      on all currently supported Marvell Ethernet IP (pxa168_eth, mv643xx_eth,
      mvneta). The MAC IP allows to automatically perform PHY auto-negotiation
      without software interaction.
      
      However, this feature (a) fundamentally clashes with the way libphy works
      and (b) is unable to deal with quirky PHYs that require special treatment.
      In this series, pxa168_eth driver is rewritten to completely disable that
      feature and properly deal with libphy provided PHYs.
      
      As usual, a branch on top of v3.18-rc1 can be found at
      
      git://git.infradead.org/users/hesselba/linux-berlin.git
      
       devel/bg2-bg2cd-eth-v2
      
      Patches 1-5 should go through David's net tree, I'll pick up the DT patches
      6-9.
      
      There have been some changes,
      compared to the RFT
      - added phy-connection-type property to BG2Q PHY DT node
      - bail out from pxa168_eth_adjust_link when there is no change in
        PHY parameters. Also, add a call to phy_print_status.
      compared to v1
      - move phy-connection-type to ethernet node instead of PHY node
      
      Patch 1 adds support for Marvell 88E3016 FastEthernet PHY that is also
      integrated in Marvell Berlin BG2/BG2CD SoCs.
      
      Patch 2 allows to pass phy_interface_t on pxa168_eth platform_data that
      is only used by mach-mmp/gplug. From the board setup, I guessed gplug's
      PHY is connected via RMII. The patch still isn't even compile tested.
      
      Patches 3-5 prepare proper libphy handling and finally remove all in-driver
      PHY mangling related to the feature explained above.
      
      Patches 6-9 add corresponding ethernet DT nodes to BG2, BG2CD, add a
      phy-connection-type property to BG2Q and enable ethernet on BG2-based Sony
      NSZ-GS7. I have tested all this on GS7 successfully with ip=dhcp on 100M FD.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5f3619f2
    • Sebastian Hesselbarth's avatar
      net: pxa168_eth: Remove in-driver PHY mangling · 9ff32fe1
      Sebastian Hesselbarth authored
      
      
      With properly using libphy PHYs now, remove the in-driver PHY
      mangling.
      
      Tested-by: default avatarAntoine Ténart <antoine.tenart@free-electrons.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9ff32fe1