1. 01 10月, 2014 23 次提交
  2. 30 9月, 2014 17 次提交
    • D
      Merge branch 'am335x' · 213d6138
      David S. Miller 提交于
      Markus Pargmann says:
      
      ====================
      net: cpsw: Support for am335x chip MACIDs
      
      This series adds support to the cpsw driver to read the MACIDs of the am335x
      chip and use them as fallback. These addresses are only used if there are no
      mac addresses in the devicetree, for example set by a bootloader.
      ====================
      Acked-by: NMugunthan V N <mugunthanvnm@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      213d6138
    • M
      arm: dts: am33xx, Add syscon phandle to cpsw node · fa5f4adf
      Markus Pargmann 提交于
      There are 2 MACIDs stored in the control module of the am33xx. These are
      read by the cpsw driver if no valid MACID was found in the devicetree.
      Signed-off-by: NMarkus Pargmann <mpa@pengutronix.de>
      Reviewed-by: NWolfram Sang <wsa@the-dreams.de>
      Acked-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fa5f4adf
    • M
    • M
      net: cpsw: Add am33xx MACID readout · 0ba517b1
      Markus Pargmann 提交于
      This patch adds a function to get the MACIDs from the am33xx SoC
      control module registers which hold unique vendor MACIDs. This is only
      used if of_get_mac_address() fails to get a valid mac address.
      Signed-off-by: NMarkus Pargmann <mpa@pengutronix.de>
      Reviewed-by: NWolfram Sang <wsa@the-dreams.de>
      Tested-by: NSteven Rostedt <rostedt@goodmis.org>
      Acked-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0ba517b1
    • M
      net: cpsw: Replace pr_err by dev_err · 56fdb2e0
      Markus Pargmann 提交于
      Use dev_err instead of pr_err.
      Signed-off-by: NMarkus Pargmann <mpa@pengutronix.de>
      Reviewed-by: NWolfram Sang <wsa@the-dreams.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      56fdb2e0
    • M
      net: cpsw: header, Add missing include · bd07d34f
      Markus Pargmann 提交于
      "MII_BUS_ID_SIZE" is defined in linux/phy.h which is not included in the
      cpsw.h file.
      Signed-off-by: NMarkus Pargmann <mpa@pengutronix.de>
      Reviewed-by: NWolfram Sang <wsa@the-dreams.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bd07d34f
    • M
      net: cpsw: Add missing return value · 4d507dff
      Markus Pargmann 提交于
      ret is set 0 at this point, so jumping to that error label would result
      in a return value of 0. Set ret to -ENOMEM to return a proper error
      value.
      Signed-off-by: NMarkus Pargmann <mpa@pengutronix.de>
      Reviewed-by: NWolfram Sang <wsa@the-dreams.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4d507dff
    • M
      DT doc: net: cpsw mac-address is optional · e4a9839b
      Markus Pargmann 提交于
      mac-address is an optional property. If no mac-address is set, a random
      mac-address will be generated.
      Signed-off-by: NMarkus Pargmann <mpa@pengutronix.de>
      Reviewed-by: NWolfram Sang <wsa@the-dreams.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e4a9839b
    • A
      bonding: make global bonding stats more reliable · 5f0c5f73
      Andy Gospodarek 提交于
      As the code stands today, bonding stats are based simply on the stats
      from the member interfaces.  If a member was to be removed from a bond,
      the stats would instantly drop.  This would be confusing to an admin
      would would suddonly see interface stats drop while traffic is still
      flowing.
      
      In addition to preventing the stats drops mentioned above, new members
      will now be added to the bond and only traffic received after the member
      was added to the bond will be counted as part of bonding stats.  Bonding
      counters will also be updated when any slaves are dropped to make sure
      the reported stats are reliable.
      
      v2: Changes suggested by Nik to properly allocate/free stats memory.
      v3: Properly destroy workqueue and fix netlink configuration path.
      v4: Moved cached stats into bonding and slave structs as there does not
      seem to be a complexity/performance benefit to using alloc'd memory vs
      in-struct memory.
      Signed-off-by: NAndy Gospodarek <gospo@cumulusnetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5f0c5f73
    • J
      net: sched: enable per cpu qstats · b0ab6f92
      John Fastabend 提交于
      After previous patches to simplify qstats the qstats can be
      made per cpu with a packed union in Qdisc struct.
      Signed-off-by: NJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b0ab6f92
    • J
      net: sched: restrict use of qstats qlen · 64015853
      John Fastabend 提交于
      This removes the use of qstats->qlen variable from the classifiers
      and makes it an explicit argument to gnet_stats_copy_queue().
      
      The qlen represents the qdisc queue length and is packed into
      the qstats at the last moment before passnig to user space. By
      handling it explicitely we avoid, in the percpu stats case, having
      to figure out which per_cpu variable to put it in.
      
      It would probably be best to remove it from qstats completely
      but qstats is a user space ABI and can't be broken. A future
      patch could make an internal only qstats structure that would
      avoid having to allocate an additional u32 variable on the
      Qdisc struct. This would make the qstats struct 128bits instead
      of 128+32.
      Signed-off-by: NJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      64015853
    • J
      net: sched: implement qstat helper routines · 25331d6c
      John Fastabend 提交于
      This adds helpers to manipulate qstats logic and replaces locations
      that touch the counters directly. This simplifies future patches
      to push qstats onto per cpu counters.
      Signed-off-by: NJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      25331d6c
    • J
      net: sched: make bstats per cpu and estimator RCU safe · 22e0f8b9
      John Fastabend 提交于
      In order to run qdisc's without locking statistics and estimators
      need to be handled correctly.
      
      To resolve bstats make the statistics per cpu. And because this is
      only needed for qdiscs that are running without locks which is not
      the case for most qdiscs in the near future only create percpu
      stats when qdiscs set the TCQ_F_CPUSTATS flag.
      
      Next because estimators use the bstats to calculate packets per
      second and bytes per second the estimator code paths are updated
      to use the per cpu statistics.
      Signed-off-by: NJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      22e0f8b9
    • M
      macvlan: add source mode · 79cf79ab
      Michael Braun 提交于
      This patch adds a new mode of operation to macvlan, called "source".
      It allows one to set a list of allowed mac address, which is used
      to match against source mac address from received frames on underlying
      interface.
      This enables creating mac based VLAN associations, instead of standard
      port or tag based. The feature is useful to deploy 802.1x mac based
      behavior, where drivers of underlying interfaces doesn't allows that.
      
      Configuration is done through the netlink interface using e.g.:
       ip link add link eth0 name macvlan0 type macvlan mode source
       ip link add link eth0 name macvlan1 type macvlan mode source
       ip link set link dev macvlan0 type macvlan macaddr add 00:11:11:11:11:11
       ip link set link dev macvlan0 type macvlan macaddr add 00:22:22:22:22:22
       ip link set link dev macvlan0 type macvlan macaddr add 00:33:33:33:33:33
       ip link set link dev macvlan1 type macvlan macaddr add 00:33:33:33:33:33
       ip link set link dev macvlan1 type macvlan macaddr add 00:44:44:44:44:44
      
      This allows clients with MAC addresses 00:11:11:11:11:11,
      00:22:22:22:22:22 to be part of only VLAN associated with macvlan0
      interface. Clients with MAC addresses 00:44:44:44:44:44 with only VLAN
      associated with macvlan1 interface. And client with MAC address
      00:33:33:33:33:33 to be associated with both VLANs.
      
      Based on work of Stefan Gula <steweg@gmail.com>
      
      v8: last version of Stefan Gula for Kernel 3.2.1
      v9: rework onto linux-next 2014-03-12 by Michael Braun
          add MACADDR_SET command, enable to configure mac for source mode
          while creating interface
      v10:
        - reduce indention level
        - rename source_list to source_entry
        - use aligned 64bit ether address
        - use hash_64 instead of addr[5]
      v11:
        - rebase for 3.14 / linux-next 20.04.2014
      v12
        - rebase for linux-next 2014-09-25
      Signed-off-by: NMichael Braun <michael-dev@fami-braun.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      79cf79ab
    • D
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next · 85224844
      David S. Miller 提交于
      Pablo Neira Ayuso says:
      
      ====================
      pull request: netfilter/ipvs updates for net-next
      
      The following patchset contains Netfilter/IPVS updates for net-next,
      most relevantly they are:
      
      1) Four patches to make the new nf_tables masquerading support
         independent of the x_tables infrastructure. This also resolves a
         compilation breakage if the masquerade target is disabled but the
         nf_tables masq expression is enabled.
      
      2) ipset updates via Jozsef Kadlecsik. This includes the addition of the
         skbinfo extension that allows you to store packet metainformation in the
         elements. This can be used to fetch and restore this to the packets through
         the iptables SET target, patches from Anton Danilov.
      
      3) Add the hash:mac set type to ipset, from Jozsef Kadlecsick.
      
      4) Add simple weighted fail-over scheduler via Simon Horman. This provides
         a fail-over IPVS scheduler (unlike existing load balancing schedulers).
         Connections are directed to the appropriate server based solely on
         highest weight value and server availability, patch from Kenny Mathis.
      
      5) Support IPv6 real servers in IPv4 virtual-services and vice versa.
         Simon Horman informs that the motivation for this is to allow more
         flexibility in the choice of IP version offered by both virtual-servers
         and real-servers as they no longer need to match: An IPv4 connection
         from an end-user may be forwarded to a real-server using IPv6 and
         vice versa. No ip_vs_sync support yet though. Patches from Alex Gartrell
         and Julian Anastasov.
      
      6) Add global generation ID to the nf_tables ruleset. When dumping from
         several different object lists, we need a way to identify that an update
         has ocurred so userspace knows that it needs to refresh its lists. This
         also includes a new command to obtain the 32-bits generation ID. The
         less significant 16-bits of this ID is also exposed through res_id field
         in the nfnetlink header to quickly detect the interference and retry when
         there is no risk of ID wraparound.
      
      7) Move br_netfilter out of the bridge core. The br_netfilter code is
         built in the bridge core by default. This causes problems of different
         kind to people that don't want this: Jesper reported performance drop due
         to the inconditional hook registration and I remember to have read complains
         on netdev from people regarding the unexpected behaviour of our bridging
         stack when br_netfilter is enabled (fragmentation handling, layer 3 and
         upper inspection). People that still need this should easily undo the
         damage by modprobing the new br_netfilter module.
      
      8) Dump the set policy nf_tables that allows set parameterization. So
         userspace can keep user-defined preferences when saving the ruleset.
         From Arturo Borrero.
      
      9) Use __seq_open_private() helper function to reduce boiler plate code
         in x_tables, From Rob Jones.
      
      10) Safer default behaviour in case that you forget to load the protocol
         tracker. Daniel Borkmann and Florian Westphal detected that if your
         ruleset is stateful, you allow traffic to at least one single SCTP port
         and the SCTP protocol tracker is not loaded, then any SCTP traffic may
         be pass through unfiltered. After this patch, the connection tracking
         classifies SCTP/DCCP/UDPlite/GRE packets as invalid if your kernel has
         been compiled with support for these modules.
      ====================
      
      Trivially resolved conflict in include/linux/skbuff.h, Eric moved some
      netfilter skbuff members around, and the netfilter tree adjusted the
      ifdef guards for the bridging info pointer.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      85224844
    • F
      tcp: change TCP_ECN prefixes to lower case · 735d3831
      Florian Westphal 提交于
      Suggested by Stephen. Also drop inline keyword and let compiler decide.
      
      gcc 4.7.3 decides to no longer inline tcp_ecn_check_ce, so split it up.
      The actual evaluation is not inlined anymore while the ECN_OK test is.
      Suggested-by: NStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: NDaniel Borkmann <dborkman@redhat.com>
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      735d3831
    • F
      tcp: move TCP_ECN_create_request out of header · d82bd122
      Florian Westphal 提交于
      After Octavian Purdilas tcp ipv4/ipv6 unification work this helper only
      has a single callsite.
      
      While at it, convert name to lowercase, suggested by Stephen.
      Suggested-by: NStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: NDaniel Borkmann <dborkman@redhat.com>
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d82bd122