[PATCH net] net/rds: Fix 'ib_evt_handler_call' element in 'rds_ib_stat_names'

2019-09-12 Thread Gerd Rausch
All entries in 'rds_ib_stat_names' are stringified versions of the corresponding "struct rds_ib_statistics" element without the "s_"-prefix. Fix entry 'ib_evt_handler_call' to do the same. Fixes: f4f943c958a2 ("RDS: IB: ack more receive completions

[PATCH net-next v2 3/4] net/rds: Add a few missing rds_stat_names entries

2019-08-15 Thread Gerd Rausch
From: Gerd Rausch Date: Thu, 11 Jul 2019 12:15:50 -0700 In a previous commit, fields were added to "struct rds_statistics" but array "rds_stat_names" was not updated accordingly. Please note the inconsistent naming of the string representations that is done in the name of co

[PATCH net-next v2 4/4] rds: check for excessive looping in rds_send_xmit

2019-08-15 Thread Gerd Rausch
From: Andy Grover Date: Thu, 13 Jan 2011 11:40:31 -0800 Original commit from 2011 updated to include a change by Yuval Shaia that adds a new statistic counter "send_stuck_rm" to capture the messages looping exessively in the send path. Signed-off-by: Gerd Rausch --- net/rds/rd

[PATCH net-next v2 2/4] RDS: don't use GFP_ATOMIC for sk_alloc in rds_create

2019-08-15 Thread Gerd Rausch
From: Chris Mason Date: Fri, 3 Feb 2012 11:08:51 -0500 Signed-off-by: Chris Mason Signed-off-by: Bang Nguyen Signed-off-by: Gerd Rausch Signed-off-by: Somasundaram Krishnasamy --- net/rds/af_rds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/rds/af_rds.c b/net/rds

[PATCH net-next v2 1/4] RDS: limit the number of times we loop in rds_send_xmit

2019-08-15 Thread Gerd Rausch
From: Chris Mason Date: Fri, 3 Feb 2012 11:07:54 -0500 This will kick the RDS worker thread if we have been looping too long. Original commit from 2012 updated to include a change by Venkat Venkatsubra that triggers "must_wake" if "rds_ib_recv_refill_one" fails. Signed

[PATCH net-next v2 0/4] net/rds: Fixes from internal Oracle repo

2019-08-15 Thread Gerd Rausch
of times we loop in rds_send_xmit RDS: don't use GFP_ATOMIC for sk_alloc in rds_create Gerd Rausch (1): net/rds: Add a few missing rds_stat_names entries net/rds/af_rds.c | 2 +- net/rds/ib_recv.c | 12 +++- net/rds/rds.h | 2 +- net/rds/send.c| 12 ne

Re: [PATCH net-next 1/5] RDS: Re-add pf/sol access via sysctl

2019-08-14 Thread Gerd Rausch
Hi David, On 14/08/2019 14.31, David Miller wrote: > From: santosh.shilim...@oracle.com > Date: Wed, 14 Aug 2019 11:36:19 -0700 > >> On 8/14/19 11:21 AM, David Miller wrote: >>> From: santosh.shilim...@oracle.com >>> Date: Wed, 14 Aug 2019 11:01:36 -0700 >>> Some of the application software

Re: [PATCH net-next 1/5] RDS: Re-add pf/sol access via sysctl

2019-08-14 Thread Gerd Rausch
Hi Doug, On 14/08/2019 08.56, Doug Ledford wrote: > Good Lord...RDS was taken into the kernel in Feb of 2009, so over 10 > years ago. The patch to put PF_RDS/AF_RDS/SOL_RDS was taken into > include/linux/socket.h Feb 26, 2009. The RDS ports were allocated by > IANA on Feb 27 and May 20, 2009. A

[PATCH net-next 3/5] RDS: don't use GFP_ATOMIC for sk_alloc in rds_create

2019-08-13 Thread Gerd Rausch
From: Chris Mason Date: Fri, 3 Feb 2012 11:08:51 -0500 Signed-off-by: Chris Mason Signed-off-by: Bang Nguyen Signed-off-by: Gerd Rausch Signed-off-by: Somasundaram Krishnasamy --- net/rds/af_rds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/rds/af_rds.c b/net/rds

[PATCH net-next 4/5] net/rds: Add a few missing rds_stat_names entries

2019-08-13 Thread Gerd Rausch
the Oracle internal code-base. s_recv_bytes_added_to_socket -> "recv_bytes_added_to_sock" s_recv_bytes_removed_from_socket -> "recv_bytes_freed_fromsock" Fixes: 192a798f5299 ("RDS: add stat for socket recv memory usage") Signed-off-by: Gerd Rausch --- net/r

[PATCH net-next 5/5] rds: check for excessive looping in rds_send_xmit

2019-08-13 Thread Gerd Rausch
From: Andy Grover Date: Thu, 13 Jan 2011 11:40:31 -0800 Original commit from 2011 updated to include a change by Yuval Shaia that adds a new statistic counter "send_stuck_rm" to capture the messages looping exessively in the send path. Signed-off-by: Gerd Rausch --- net/rds/rd

[PATCH net-next 1/5] RDS: Re-add pf/sol access via sysctl

2019-08-13 Thread Gerd Rausch
From: Andy Grover Date: Tue, 24 Nov 2009 15:35:51 -0800 Although RDS has an official PF_RDS value now, existing software expects to look for rds sysctls to determine it. We need to maintain these for now, for backwards compatibility. Signed-off-by: Andy Grover Signed-off-by: Gerd Rausch

[PATCH net-next 0/5] net/rds: Fixes from internal Oracle repo

2019-08-13 Thread Gerd Rausch
Chris Mason (2): RDS: limit the number of times we loop in rds_send_xmit RDS: don't use GFP_ATOMIC for sk_alloc in rds_create Gerd Rausch (1): net/rds: Add a few missing rds_stat_names entries net/rds/af_rds.c | 2 +- net/rds/ib_recv.c | 12 +++- net/rds/rds.h | 2 +- ne

[PATCH net-next 2/5] RDS: limit the number of times we loop in rds_send_xmit

2019-08-13 Thread Gerd Rausch
From: Chris Mason Date: Fri, 3 Feb 2012 11:07:54 -0500 This will kick the RDS worker thread if we have been looping too long. Original commit from 2012 updated to include a change by Venkat Venkatsubra that triggers "must_wake" if "rds_ib_recv_refill_one" fails. Signed

[PATCH net v3 5/7] net/rds: Set fr_state only to FRMR_IS_FREE if IB_WR_LOCAL_INV had been successful

2019-07-16 Thread Gerd Rausch
Fix a bug where fr_state first goes to FRMR_IS_STALE, because of a failure of operation IB_WR_LOCAL_INV, but then gets set back to "FRMR_IS_FREE" uncoditionally, even though the operation failed. Signed-off-by: Gerd Rausch --- net/rds/ib_frmr.c | 3 ++- 1 file changed, 2 insert

[PATCH net v3 6/7] net/rds: Keep track of and wait for FRWR segments in use upon shutdown

2019-07-16 Thread Gerd Rausch
unt" that keeps track of how many FRWR memory segments are out there marked "FRMR_IS_INUSE" (and also wake_up rds_ib_ring_empty_wait, as they go away). Signed-off-by: Gerd Rausch --- net/rds/ib.h | 1 + net/rds/ib_cm.c | 7 +++ net/rds/ib_frmr.c | 43 +++

[PATCH net v3 7/7] net/rds: Initialize ic->i_fastreg_wrs upon allocation

2019-07-16 Thread Gerd Rausch
r it to go back to "RDS_IB_DEFAULT_FR_WR", which of course will never happen as there are no outstanding work requests. Signed-off-by: Gerd Rausch --- net/rds/ib_cm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c index 1b6fd6c8b12

[PATCH net v3 1/7] net/rds: Give fr_state a chance to transition to FRMR_IS_FREE

2019-07-16 Thread Gerd Rausch
ger with a maximum of 10msec. Then we check again, and only put the memory region onto the drop_list (via "rds_ib_free_frmr") in case the situation remains unchanged. This avoids the problem of memory-regions bouncing between "clean_list" and "d

[PATCH net v3 4/7] net/rds: Fix NULL/ERR_PTR inconsistency

2019-07-16 Thread Gerd Rausch
Make function "rds_ib_try_reuse_ibmr" return NULL in case memory region could not be allocated, since callers simply check if the return value is not NULL. Signed-off-by: Gerd Rausch --- net/rds/ib_rdma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/rds

[PATCH net v3 3/7] net/rds: Wait for the FRMR_IS_FREE (or FRMR_IS_STALE) transition after posting IB_WR_LOCAL_INV

2019-07-16 Thread Gerd Rausch
ng "IB_WR_LOCAL_INV" operation with a teardown ("dma_unmap_sg", "put_page") and de-registration ("ib_dereg_mr") of the corresponding memory region. Signed-off-by: Gerd Rausch --- net/rds/ib_frmr.c | 65 +++

[PATCH net v3 0/7] net/rds: RDMA fixes

2019-07-16 Thread Gerd Rausch
A number of net/rds fixes necessary to make "rds_rdma.ko" pass some basic Oracle internal tests. Gerd Rausch (7): net/rds: Give fr_state a chance to transition to FRMR_IS_FREE net/rds: Get rid of "wait_clean_list_grace" and add locking net/rds: Wait for the FRMR_IS_FR

[PATCH net v3 2/7] net/rds: Get rid of "wait_clean_list_grace" and add locking

2019-07-16 Thread Gerd Rausch
multiple consumers with llist_del_first used in one consumer, * and llist_del_first or llist_del_all used in other consumers, * then a lock is needed. Also, while at it, drop the unused "pool" parameter from "list_to_llist_nodes". Signed-off-by: Gerd Rausch --- net/rds/i

Re: [PATCH net-next v2 0/7] net/rds: RDMA fixes

2019-07-15 Thread Gerd Rausch
Hi David, This was a followup to the patch-series that I had already sent. I'll re-write the Subject-prefix and re-submit it for "net". Sorry for the noise, Gerd On 15/07/2019 19.05, David Miller wrote: > > net-next is closed, and why are you submitting bug fixes for net-next > when 'net' is

[PATCH net-next v2 0/7] net/rds: RDMA fixes

2019-07-15 Thread Gerd Rausch
A number of net/rds fixes necessary to make "rds_rdma.ko" pass some basic Oracle internal tests. Gerd Rausch (7): net/rds: Give fr_state a chance to transition to FRMR_IS_FREE net/rds: Get rid of "wait_clean_list_grace" and add locking net/rds: Wait for the FRMR_IS_FR

Re: [PATCH net-next 3/7] net/rds: Wait for the FRMR_IS_FREE (or FRMR_IS_STALE) transition after posting IB_WR_LOCAL_INV

2019-07-02 Thread Gerd Rausch
On 02/07/2019 09.49, santosh.shilim...@oracle.com wrote: > On 7/1/19 10:11 PM, Gerd Rausch wrote: >> For the registration work-requests there is a benefit to wait a short >> amount of time only (the trade-off described in patch #1 of this series). >> > Actually we should

Re: [PATCH net-next 3/7] net/rds: Wait for the FRMR_IS_FREE (or FRMR_IS_STALE) transition after posting IB_WR_LOCAL_INV

2019-07-02 Thread Gerd Rausch
On 02/07/2019 14.18, santosh.shilim...@oracle.com wrote: > On 7/2/19 2:05 PM, Gerd Rausch wrote: >> What do you call "RDS_GET_MR" semantics? >> > Its a blocking socket call. Meaning after this call return to the > user, the key must be valid. With async registra

Re: [PATCH net-next 3/7] net/rds: Wait for the FRMR_IS_FREE (or FRMR_IS_STALE) transition after posting IB_WR_LOCAL_INV

2019-07-01 Thread Gerd Rausch
Hi Santosh, On 01/07/2019 19.28, santosh.shilim...@oracle.com wrote: >> > Below. All command timeouts are 60 seconds. > > enum { >     MLX4_CMD_TIME_CLASS_A   = 6, >     MLX4_CMD_TIME_CLASS_B   = 6, >     MLX4_CMD_TIME_CLASS_C   = 6, > }; > Thank you for the pointer. >

Re: [PATCH net-next 3/7] net/rds: Wait for the FRMR_IS_FREE (or FRMR_IS_STALE) transition after posting IB_WR_LOCAL_INV

2019-07-01 Thread Gerd Rausch
Hi Santosh, On 01/07/2019 14.00, santosh.shilim...@oracle.com wrote: >> > Look for command timeout in CX3 sources. 60 second is upper bound in > CX3. Its not standard in specs(at least not that I know) though > and may vary from vendor to vendor. > I am not seeing it. Can you point me to the rig

Re: [PATCH net-next 1/7] net/rds: Give fr_state a chance to transition to FRMR_IS_FREE

2019-07-01 Thread Gerd Rausch
Hi Santosh, On 01/07/2019 13.53, santosh.shilim...@oracle.com wrote: > LOCAL_INV/REG etc are all end being HCA commands and the command timeouts are > large. 60 seconds is what CX3 HCA has for example. > Thats the worst case timeout from HCA before marking the command > to be timeout and hence th

Re: [PATCH net-next 3/7] net/rds: Wait for the FRMR_IS_FREE (or FRMR_IS_STALE) transition after posting IB_WR_LOCAL_INV

2019-07-01 Thread Gerd Rausch
Hi Santosh, On 01/07/2019 13.41, santosh.shilim...@oracle.com wrote: >> @@ -144,7 +146,29 @@ static int rds_ib_post_reg_frmr(struct rds_ib_mr *ibmr) >>   if (printk_ratelimit()) >>   pr_warn("RDS/IB: %s returned error(%d)\n", >>   __func__, ret); >> +    got

Re: [PATCH net-next 1/7] net/rds: Give fr_state a chance to transition to FRMR_IS_FREE

2019-07-01 Thread Gerd Rausch
Hi David, On 01/07/2019 11.27, David Miller wrote: > From: Gerd Rausch > Date: Mon, 1 Jul 2019 09:39:44 -0700 > >> +/* Memory regions make it onto the "clean_list" via >> + * "rds_ib_flush_m

[PATCH net-next 6/7] net/rds: Keep track of and wait for FRWR segments in use upon shutdown

2019-07-01 Thread Gerd Rausch
unt" that keeps track of how many FRWR memory segments are out there marked "FRMR_IS_INUSE" (and also wake_up rds_ib_ring_empty_wait, as they go away). Signed-off-by: Gerd Rausch --- net/rds/ib.h | 1 + net/rds/ib_cm.c | 7 +++ net/rds/ib_frmr.c | 45

[PATCH net-next 5/7] net/rds: Set fr_state only to FRMR_IS_FREE if IB_WR_LOCAL_INV had been successful

2019-07-01 Thread Gerd Rausch
Fix a bug where fr_state first goes to FRMR_IS_STALE, because of a failure of operation IB_WR_LOCAL_INV, but then gets set back to "FRMR_IS_FREE" uncoditionally, even though the operation failed. Signed-off-by: Gerd Rausch --- net/rds/ib_frmr.c | 3 ++- 1 file changed, 2 insert

[PATCH net-next 7/7] net/rds: Initialize ic->i_fastreg_wrs upon allocation

2019-07-01 Thread Gerd Rausch
r it to go back to "RDS_IB_DEFAULT_FR_WR", which of course will never happen as there are no outstanding work requests. Signed-off-by: Gerd Rausch --- net/rds/ib_cm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c index 1b6fd6c8b12

[PATCH net-next 2/7] net/rds: Get rid of "wait_clean_list_grace" and add locking

2019-07-01 Thread Gerd Rausch
multiple consumers with llist_del_first used in one consumer, * and llist_del_first or llist_del_all used in other consumers, * then a lock is needed. Also, while at it, drop the unused "pool" parameter from "list_to_llist_nodes". Signed-off-by: Gerd Rausch --- net/rds/i

[PATCH net-next 4/7] net/rds: Fix NULL/ERR_PTR inconsistency

2019-07-01 Thread Gerd Rausch
Make function "rds_ib_try_reuse_ibmr" return NULL in case memory region could not be allocated, since callers simply check if the return value is not NULL. Signed-off-by: Gerd Rausch --- net/rds/ib_rdma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/rds

[PATCH net-next 1/7] net/rds: Give fr_state a chance to transition to FRMR_IS_FREE

2019-07-01 Thread Gerd Rausch
ger with a maximum of 10msec. Then we check again, and only put the memory region onto the drop_list (via "rds_ib_free_frmr") in case the situation remains unchanged. This avoids the problem of memory-regions bouncing between "clean_list" and "d

[PATCH net-next 3/7] net/rds: Wait for the FRMR_IS_FREE (or FRMR_IS_STALE) transition after posting IB_WR_LOCAL_INV

2019-07-01 Thread Gerd Rausch
ng "IB_WR_LOCAL_INV" operation with a teardown ("dma_unmap_sg", "put_page") and de-registration ("ib_dereg_mr") of the corresponding memory region. Signed-off-by: Gerd Rausch --- net/rds/ib_frmr.c | 89 ++-

[PATCH net-next 0/7] net/rds: RDMA fixes

2019-07-01 Thread Gerd Rausch
A number of net/rds fixes necessary to make "rds_rdma.ko" pass some basic Oracle internal tests. Gerd Rausch (7): net/rds: Give fr_state a chance to transition to FRMR_IS_FREE net/rds: Get rid of "wait_clean_list_grace" and add locking net/rds: Wait for the FRMR_IS_FR

Re: [net-next PATCH] net/rds: Return proper "tos" value to user-space

2019-03-08 Thread Gerd Rausch
On 07/03/2019 17.37, santosh.shilim...@oracle.com wrote: >> --- a/net/rds/connection.c >> +++ b/net/rds/connection.c >> @@ -736,6 +736,7 @@ static int rds_conn_info_visitor(struct rds_conn_path >> *cp, void *buffer) >>   cinfo->next_rx_seq = cp->cp_next_rx_seq; >>   cinfo->laddr = conn->c_

Re: [net-next][PATCH 5/5] rds: rdma: update rdma transport for tos

2019-03-05 Thread Gerd Rausch
Hi Santosh, On 05/03/2019 08.41, Santosh Shilimkar wrote: > On 3/5/2019 8:33 AM, Gerd Rausch wrote: >> If there's a mechanism that ensures compatibility with older (pre-4.1) >> versions >> of RDS I am not seeing it. > Thats handled as part of the connection reject h

Re: [net-next][PATCH 5/5] rds: rdma: update rdma transport for tos

2019-03-05 Thread Gerd Rausch
Hi, This patchset breaks compatibility... On 04/02/2019 16.04, Santosh Shilimkar wrote: > --- a/net/rds/ib_cm.c > +++ b/net/rds/ib_cm.c > @@ -868,7 +870,7 @@ int rds_ib_cm_initiate_connect(struct rdma_cm_id *cm_id, > bool isv6) > > /* If the peer doesn't do protocol negotiation, we must