1. 06 1月, 2016 16 次提交
    • I
      mlxsw: pci: Adjust value of CPU egress traffic class · f0138e25
      Ido Schimmel 提交于
      During initialization, when creating the send descriptor queues (SDQs),
      we specify the CPU egress traffic class of each SDQ. The maximum number
      of classes of this type is different in the two ASICs supported by this
      PCI driver.
      
      New firmware versions check this value is set correctly, which causes
      errors on the Spectrum ASIC, as its max exposed egress traffic class is
      lower than 7.
      
      Solve this by setting this field to 3, which is an acceptable value for
      both ASICs.
      
      Note that we currently do not expose the QoS capabilities of the ASICs,
      so setting this to an hardcoded value is OK for now.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f0138e25
    • D
      Merge tag 'wireless-drivers-next-for-davem-2016-01-05' of... · 56b87180
      David S. Miller 提交于
      Merge tag 'wireless-drivers-next-for-davem-2016-01-05' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next
      
      Kalle Valo says:
      
      ====================
      brcfmac
      
      * fix IBSS which got broken over time
      * new USB id for bcm43242 dongle
      * arp offload configuration through inet notifier
      
      ath9k
      
      * add random number generator support (CONFIG_ATH9K_HWRNG)
      
      iwlwifi
      
      * Make scan parameters low latency aware
      * Fix in the NL80211_FEATURE_FULL_AP_CLIENT_STATE state case
      * Fix enable injection mode (Chaya Rachel)
      * Various cleanups (Dan / Julia / myself)
      * Allow to stay more time on popular channels (David Spinadel)
      * Bug fixes for D0i3 (Eliad / Luca)
      * Fixes for GO uAPSD (myself)
      * Start of TSO support (myself)
      * Rate control bug fixes (Eyal / Gregory)
      * Start the work on 9000 devices (Johannes / Sara / Oren)
      * Start the work on a new Tx queue allocation model (Liad)
      * Debug infrastructure enhancements (Golan)
      
      mwifiex
      
      * add a debugfs file for chip reset
      * advertise SMS4 cipher suite
      * increase ap and station interface limit to 3
      * enable MSI support on newer pcie devices (8897 onwards)
      
      rtlwifi
      
      * fix lots of module parameter usage
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      56b87180
    • A
      net: hns: avoid uninitialized variable warning: · be78a690
      Arnd Bergmann 提交于
      gcc fails to see that the use of the 'last_offset' variable
      in hns_nic_reuse_page() is used correctly and issues a bogus
      warning:
      
      drivers/net/ethernet/hisilicon/hns/hns_enet.c: In function 'hns_nic_reuse_page':
      drivers/net/ethernet/hisilicon/hns/hns_enet.c:541:6: warning: 'last_offset' may be used uninitialized in this function [-Wmaybe-uninitialized]
      
      This simplifies the function to make it more obvious what is
      going on to both readers and compilers, which makes the warning
      go away.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      be78a690
    • F
      inet: kill unused skb_free op · a72a5e2d
      Florian Westphal 提交于
      The only user was removed in commit
      029f7f3b ("netfilter: ipv6: nf_defrag: avoid/free clone operations").
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a72a5e2d
    • X
      include/uapi/linux/sockios.h: mark SIOCRTMSG unused · 2fbf5758
      xypron.glpk@gmx.de 提交于
      IOCTL SIOCRTMSG does nothing but return EINVAL.
      
      So comment it as unused.
      
      SIOCRTMSG is only used in:
      * net/ipv4/af_inet.c
      * include/uapi/linux/sockios.h
      
      inet_ioctl calls ip_rt_ioctl.
      ip_rt_ioctl only handles SIOCADDRT and SIOCDELRT and returns -EINVAL
      otherwise.
      Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2fbf5758
    • D
      Merge branch 'mlx5e-tstamp' · 1633bf11
      David S. Miller 提交于
      Saeed Mahameed says:
      
      ====================
      Introduce mlx5 ethernet timestamping
      
      This patch series introduces the support for ConnectX-4 timestamping
      and the PTP kernel interface.
      
      Changes from V2:
      net/mlx5_core: Introduce access function to read internal_timer
      	- Remove one line function
      	- Change function name
      
      net/mlx5e: Add HW timestamping (TS) support:
      	- Data path performance optimization (caching tstamp struct in rq,sq)
      	- Change read/write_lock_irqsave to read/write_lock
      	- Move ioctl functions to en_clock file
      	- Changed overflow start algorithm according to comments from Richard
      	- Move timestamp init/cleanup to open/close ndos.
      
      In details:
      
      1st patch prevents the driver from modifying skb->data and SKB CB in
      device xmit function.
      
      2nd patch adds the needed low level helpers for:
      	- Fetching the hardware clock (hardware internal timer)
      	- Parsing CQEs timestamps
      	- Device frequency capability
      
      3rd patch adds new en_clock.c file that handles all needed timestamping
      operations:
      	- Internal clock structure initialization and other helper functions
      	- Added the needed ioctl for setting/getting the current timestamping
      	  configuration.
      	- used this configuration in RX/TX data path to fill the SKB with
      	  the timestamp.
      
      4th patch Introduces PTP (PHC) support.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1633bf11
    • E
      net/mlx5e: Add PTP Hardware Clock (PHC) support · 3d8c38af
      Eran Ben Elisha 提交于
      Add a PHC support to the mlx5_en driver. Use reader/writer spinlocks to
      protect the timecounter since every packet received needs to call
      timecounter_cycle2time() when timestamping is enabled.  This can become
      a performance bottleneck with RSS and multiple receive queues if normal
      spinlocks are used.
      
      The driver has been tested with both Documentation/ptp/testptp and the
      linuxptp project (http://linuxptp.sourceforge.net/) on a Mellanox
      ConnectX-4 card.
      Signed-off-by: NEran Ben Elisha <eranbe@mellanox.com>
      Cc: Richard Cochran <richardcochran@gmail.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      Acked-by: NRichard Cochran <richardcochran@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3d8c38af
    • E
      net/mlx5e: Add HW timestamping (TS) support · ef9814de
      Eran Ben Elisha 提交于
      Add support for enable/disable HW timestamping for incoming and/or
      outgoing packets. To enable/disable HW timestamping appropriate
      ioctl should be used. Currently HWTSTAMP_FILTER_ALL/NONE and
      HWTSAMP_TX_ON/OFF only are supported. Make all relevant changes in
      RX/TX flows to consider TS request and plant HW timestamps into
      relevant structures.
      
      Add internal clock for converting hardware timestamp to nanoseconds. In
      addition, add a service task to catch internal clock overflow, to make
      sure timestamping is accurate.
      Signed-off-by: NEran Ben Elisha <eranbe@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      Acked-by: NRichard Cochran <richardcochran@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ef9814de
    • E
      net/mlx5_core: Introduce access function to read internal timer · b0844444
      Eran Ben Elisha 提交于
      A preparation step which adds support for reading the hardware
      internal timer and the hardware timestamping from the CQE.
      In addition, advertize device_frequency_khz HCA capability.
      Signed-off-by: NEran Ben Elisha <eranbe@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b0844444
    • A
      net/mlx5e: Do not modify the TX SKB · 34802a42
      Achiad Shochat 提交于
      If the SKB is cloned, or has an elevated users count, someone else
      can be looking at it at the same time.
      Signed-off-by: NAchiad Shochat <achiad@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      34802a42
    • D
      Merge branch 'sctp-transport-rhashtable' · 33c15297
      David S. Miller 提交于
      Xin Long says:
      
      ====================
      sctp: use transport hashtable to replace association's with rhashtable
      
      for telecom center, the usual case is that a server is connected by thousands
      of clients. but if the server with only one enpoint(udp style) use the same
      sport and dport to communicate with every clients, and every assoc in server
      will be hashed in the same chain of global assoc hashtable due to currently we
      choose dport and sport as the hash key.
      
      when a packet is received, sctp_rcv try to find the assoc with sport and dport,
      since that chain is too long to find it fast, it make the performance turn to
      very low, some test data is as follow:
      
      in server:
      $./ss [start a udp style server there]
      in client:
      $./cc [start 2500 sockets to connect server with same port and different ip,
             and use one of them to send data to server]
      
      ===== test on net-next
      -- perf top
      server:
        55.73%  [kernel]             [k] sctp_assoc_is_match
         6.80%  [kernel]             [k] sctp_assoc_lookup_paddr
         4.81%  [kernel]             [k] sctp_v4_cmp_addr
         3.12%  [kernel]             [k] _raw_spin_unlock_irqrestore
         1.94%  [kernel]             [k] sctp_cmp_addr_exact
      
      client:
        46.01%  [kernel]                    [k] sctp_endpoint_lookup_assoc
         5.55%  libc-2.17.so                [.] __libc_calloc
         5.39%  libc-2.17.so                [.] _int_free
         3.92%  libc-2.17.so                [.] _int_malloc
         3.23%  [kernel]                    [k] __memset
      
      -- spent time
      time is 487s, send pkt is 10000000
      
      we need to change the way to calculate the hash key, to use lport +
      rport + paddr as the hash key can avoid this issue.
      
      besides, this patchset will use transport hashtable to replace
      association hashtable to lookup with rhashtable api. get transport
      first then get association by t->asoc. and also it will make tcp
      style work better.
      
      ===== test with this patchset:
      -- perf top
      server:
        15.98%  [kernel]                 [k] _raw_spin_unlock_irqrestore
         9.92%  [kernel]                 [k] __pv_queued_spin_lock_slowpath
         7.22%  [kernel]                 [k] copy_user_generic_string
         2.38%  libpthread-2.17.so       [.] __recvmsg_nocancel
         1.88%  [kernel]                 [k] sctp_recvmsg
      
      client:
        11.90%  [kernel]                   [k] sctp_hash_cmp
         8.52%  [kernel]                   [k] rht_deferred_worker
         4.94%  [kernel]                   [k] __pv_queued_spin_lock_slowpath
         3.95%  [kernel]                   [k] sctp_bind_addr_match
         2.49%  [kernel]                   [k] __memset
      
      -- spent time
      time is 22s, send pkt is 10000000
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      33c15297
    • X
      sctp: remove the local_bh_disable/enable in sctp_endpoint_lookup_assoc · c79c0666
      Xin Long 提交于
      sctp_endpoint_lookup_assoc is called in the protection of sock lock
      there is no need to call local_bh_disable in this function. so remove
      them.
      Signed-off-by: NXin Long <lucien.xin@gmail.com>
      Signed-off-by: NMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c79c0666
    • X
      sctp: drop the old assoc hashtable of sctp · b5eff712
      Xin Long 提交于
      transport hashtable will replace the association hashtable,
      so association hashtable is not used in sctp any more, so
      drop the codes about that.
      Signed-off-by: NXin Long <lucien.xin@gmail.com>
      Signed-off-by: NMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b5eff712
    • X
      sctp: apply rhashtable api to sctp procfs · 39f66a7d
      Xin Long 提交于
      Traversal the transport rhashtable, get the association only once through
      the condition assoc->peer.primary_path != transport.
      Signed-off-by: NXin Long <lucien.xin@gmail.com>
      Signed-off-by: NMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      39f66a7d
    • X
      sctp: apply rhashtable api to send/recv path · 4f008781
      Xin Long 提交于
      apply lookup apis to two functions, for __sctp_endpoint_lookup_assoc
      and __sctp_lookup_association, it's invoked in the protection of sock
      lock, it will be safe, but sctp_lookup_association need to call
      rcu_read_lock() and to detect the t->dead to protect it.
      Signed-off-by: NXin Long <lucien.xin@gmail.com>
      Signed-off-by: NMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4f008781
    • X
      sctp: add the rhashtable apis for sctp global transport hashtable · d6c0256a
      Xin Long 提交于
      tranport hashtbale will replace the association hashtable to do the
      lookup for transport, and then get association by t->assoc, rhashtable
      apis will be used because of it's resizable, scalable and using rcu.
      
      lport + rport + paddr will be the base hashkey to locate the chain,
      with net to protect one netns from another, then plus the laddr to
      compare to get the target.
      
      this patch will provider the lookup functions:
      - sctp_epaddr_lookup_transport
      - sctp_addrs_lookup_transport
      
      hash/unhash functions:
      - sctp_hash_transport
      - sctp_unhash_transport
      
      init/destroy functions:
      - sctp_transport_hashtable_init
      - sctp_transport_hashtable_destroy
      Signed-off-by: NXin Long <lucien.xin@gmail.com>
      Signed-off-by: NMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d6c0256a
  2. 05 1月, 2016 24 次提交