1. 02 5月, 2017 4 次提交
  2. 29 4月, 2017 1 次提交
  3. 22 4月, 2017 1 次提交
    • M
      IB/cma: Send MRA for reply messages · 61c0ddbe
      Moni Shoua 提交于
      Current implementation of RDMA_CM sends MRA (Message Receipt
      Acknowledgment) only for request messages but not for response messages.
      
      As a result, a slow active side of the connection may send a ready-to-use
      message to the passive side in a delay that is too long for the passive
      side to wait for.
      
      This patch adds a call to ib_send_cm_mra() upon receiving a response
      message and by this tells the other side to modify the service timeout
      to a bigger value, 16 times than before. As in the request case, MRA
      for reply will be sent only if a duplicate response has arrived.
      Signed-off-by: NMoni Shoua <monis@mellanox.com>
      Reviewed-by: NMatan Barak <matan@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leon@kernel.org>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      61c0ddbe
  4. 23 2月, 2017 1 次提交
  5. 15 2月, 2017 2 次提交
  6. 07 2月, 2017 1 次提交
  7. 28 1月, 2017 3 次提交
  8. 25 1月, 2017 2 次提交
  9. 13 1月, 2017 2 次提交
  10. 15 12月, 2016 3 次提交
  11. 18 11月, 2016 1 次提交
    • A
      netns: make struct pernet_operations::id unsigned int · c7d03a00
      Alexey Dobriyan 提交于
      Make struct pernet_operations::id unsigned.
      
      There are 2 reasons to do so:
      
      1)
      This field is really an index into an zero based array and
      thus is unsigned entity. Using negative value is out-of-bound
      access by definition.
      
      2)
      On x86_64 unsigned 32-bit data which are mixed with pointers
      via array indexing or offsets added or subtracted to pointers
      are preffered to signed 32-bit data.
      
      "int" being used as an array index needs to be sign-extended
      to 64-bit before being used.
      
      	void f(long *p, int i)
      	{
      		g(p[i]);
      	}
      
        roughly translates to
      
      	movsx	rsi, esi
      	mov	rdi, [rsi+...]
      	call 	g
      
      MOVSX is 3 byte instruction which isn't necessary if the variable is
      unsigned because x86_64 is zero extending by default.
      
      Now, there is net_generic() function which, you guessed it right, uses
      "int" as an array index:
      
      	static inline void *net_generic(const struct net *net, int id)
      	{
      		...
      		ptr = ng->ptr[id - 1];
      		...
      	}
      
      And this function is used a lot, so those sign extensions add up.
      
      Patch snipes ~1730 bytes on allyesconfig kernel (without all junk
      messing with code generation):
      
      	add/remove: 0/0 grow/shrink: 70/598 up/down: 396/-2126 (-1730)
      
      Unfortunately some functions actually grow bigger.
      This is a semmingly random artefact of code generation with register
      allocator being used differently. gcc decides that some variable
      needs to live in new r8+ registers and every access now requires REX
      prefix. Or it is shifted into r12, so [r12+0] addressing mode has to be
      used which is longer than [r8]
      
      However, overall balance is in negative direction:
      
      	add/remove: 0/0 grow/shrink: 70/598 up/down: 396/-2126 (-1730)
      	function                                     old     new   delta
      	nfsd4_lock                                  3886    3959     +73
      	tipc_link_build_proto_msg                   1096    1140     +44
      	mac80211_hwsim_new_radio                    2776    2808     +32
      	tipc_mon_rcv                                1032    1058     +26
      	svcauth_gss_legacy_init                     1413    1429     +16
      	tipc_bcbase_select_primary                   379     392     +13
      	nfsd4_exchange_id                           1247    1260     +13
      	nfsd4_setclientid_confirm                    782     793     +11
      		...
      	put_client_renew_locked                      494     480     -14
      	ip_set_sockfn_get                            730     716     -14
      	geneve_sock_add                              829     813     -16
      	nfsd4_sequence_done                          721     703     -18
      	nlmclnt_lookup_host                          708     686     -22
      	nfsd4_lockt                                 1085    1063     -22
      	nfs_get_client                              1077    1050     -27
      	tcf_bpf_init                                1106    1076     -30
      	nfsd4_encode_fattr                          5997    5930     -67
      	Total: Before=154856051, After=154854321, chg -0.00%
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c7d03a00
  12. 17 11月, 2016 1 次提交
    • L
      IB/core: Set routable RoCE gid type for ipv4/ipv6 networks · aeb76df4
      Leon Romanovsky 提交于
      On Thu, Oct 27, 2016 at 04:36:28PM +0300, Leon Romanovsky wrote:
      > From: Mark Bloch <markb@mellanox.com>
      >
      > If the underlying netowrk type is ipv4 or ipv6 and the device supports
      > routable RoCE, prefer it so the traffic could cross subnets.
      >
      > Signed-off-by: Mark Bloch <markb@mellanox.com>
      > Signed-off-by: Maor Gottlieb <maorg@mellanox.com>
      > Signed-off-by: Leon Romanovsky <leon@kernel.org>
      > ---
      
      Hi Doug,
      
      Please take the following v1 of this patch where I fixed spelling error
      from "netowrk" to be "network".
      
      Thanks.
      
      >From 09f96ba3e9b4442cfb44dca04c6726e55525c9c3 Mon Sep 17 00:00:00 2001
      From: Mark Bloch <markb@mellanox.com>
      Date: Sun, 11 Sep 2016 06:25:10 +0000
      Subject: [PATCH rdma-rc v1 3/6] IB/core: Set routable RoCE gid type for ipv4/ipv6
       networks
      
      If the underlying network type is ipv4 or ipv6 and the device supports
      routable RoCE, prefer it so the traffic could cross subnets.
      Signed-off-by: NMark Bloch <markb@mellanox.com>
      Signed-off-by: NMaor Gottlieb <maorg@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leon@kernel.org>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      aeb76df4
  13. 12 11月, 2016 1 次提交
  14. 08 10月, 2016 1 次提交
  15. 23 8月, 2016 1 次提交
  16. 04 8月, 2016 1 次提交
    • A
      IB/core: Support for CMA multicast join flags · ab15c95a
      Alex Vesker 提交于
      Added UCMA and CMA support for multicast join flags. Flags are
      passed using UCMA CM join command previously reserved fields.
      Currently supporting two join flags indicating two different
      multicast JoinStates:
      
      1. Full Member:
         The initiator creates the Multicast group(MCG) if it wasn't
         previously created, can send Multicast messages to the group
         and receive messages from the MCG.
      
      2. Send Only Full Member:
         The initiator creates the Multicast group(MCG) if it wasn't
         previously created, can send Multicast messages to the group
         but doesn't receive any messages from the MCG.
      
         IB: Send Only Full Member requires a query of ClassPortInfo
             to determine if SM/SA supports this option. If SM/SA
             doesn't support Send-Only there will be no join request
             sent and an error will be returned.
      
         ETH: When Send Only Full Member is requested no IGMP join
      	will be sent.
      Signed-off-by: NAlex Vesker <valex@mellanox.com>
      Reviewed by: Hal Rosenstock <hal@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leon@kernel.org>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      ab15c95a
  17. 23 6月, 2016 1 次提交
  18. 18 6月, 2016 1 次提交
    • B
      IB/cma: Make the code easier to verify · 37e07cda
      Bart Van Assche 提交于
      Static source code analysis tools like smatch cannot handle functions
      that lock or not lock a mutex depending on the value of the arguments.
      Hence inline the function cma_disable_callback(). Additionally, this
      patch realizes a small performance optimization by reducing the number of
      mutex_lock() and mutex_unlock() calls in the modified functions. With
      this patch applied smatch no longer complains about source file cma.c.
      Without this patch smatch reports the following for this source file:
      
      drivers/infiniband/core/cma.c:1959: cma_req_handler() warn: inconsistent returns 'mutex:&listen_id->handler_mutex'.
        Locked on:   line 1880
                     line 1959
        Unlocked on: line 1941
      drivers/infiniband/core/cma.c:2112: iw_conn_req_handler() warn: inconsistent returns 'mutex:&listen_id->handler_mutex'.
        Locked on:   line 2048
        Unlocked on: line 2112
      Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Cc: Sean Hefty <sean.hefty@intel.com>
      Cc: Steve Wise <swise@opengridcomputing.com>
      Cc: Leon Romanovsky <leonro@mellanox.com>
      Acked-by: NSean Hefty <sean.hefty@intel.com>
      Reviewed-by: NSteve Wise <swise@opengridcomputing.com>
      Reviewed-by: NLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      37e07cda
  19. 14 5月, 2016 1 次提交
  20. 13 5月, 2016 1 次提交
  21. 03 3月, 2016 1 次提交
  22. 02 3月, 2016 1 次提交
    • H
      IB/cma: Print warning on different inner and header P_Keys · 84424a7f
      Haggai Eran 提交于
      Commit 4c21b5bc ("IB/cma: Add net_dev and private data checks to RDMA
      CM") added checks for incoming RDMA CM requests that they can be matched to
      a netdev based on the P_Key in the BTH of the request. This behavior was
      reverted in commit ab3964ad ("IB/cma: Use inner P_Key to determine
      netdev"), since the mlx5 and ipath drivers didn't send the correct value
      in the BTH P_Key.
      
      Since the ipath driver was removed, and the mlx5 driver can now send GSI
      packets on different P_Keys, we could revert the patch to let the rdma_cm
      module look on the BTH P_Key when deciding to what netdev a packet belongs.
      However, that still breaks compatibility with the older drivers.
      
      Change the behavior to print a warning when receiving a request that has a
      different BTH P_Key and inner payload P_Key. In the future, after users
      have seen the warnings and upgraded their setups, remove the warning and
      block these requests.
      Signed-off-by: NHaggai Eran <haggaie@mellanox.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      84424a7f
  23. 20 1月, 2016 2 次提交
  24. 23 12月, 2015 6 次提交