Re: [PATCH 1/1] Revert "rds: ib: add error handle"

2018-04-24 Thread Håkon Bugge
> On 24 Apr 2018, at 05:27, santosh.shilim...@oracle.com wrote: > > On 4/23/18 6:39 PM, Zhu Yanjun wrote: >> This reverts commit 3b12f73a5c2977153f28a224392fd4729b50d1dc. >> After long time discussion and investigations, it seems that there >> is no mem leak. So this patch is reverted. >> Signed

Re: [PATCH] rds: ib: Fix missing call to rds_ib_dev_put in rds_ib_setup_qp

2018-04-25 Thread Håkon Bugge
c29 ("rds: ib: add error handle") > > Signed-off-by: Dag Moxnes Reviewed-by: Håkon Bugge Thxs, Håkon > --- > net/rds/ib_cm.c |3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c > index eea1d86..13

Re: [rds-devel] [PATCH RFC RFC] rds: Use NETDEV_UNREGISTER in rds_tcp_dev_event() (then kill NETDEV_UNREGISTER_FINAL)

2018-03-20 Thread Håkon Bugge
Hi Sowmini, A little nit below. And some spelling issues in existing commentary you can consider fixing, since you reshuffle this file considerable. Thxs, Håkon > On 18 Mar 2018, at 21:45, Sowmini Varadhan > wrote: > > On (03/18/18 00:55), Kirill Tkhai wrote: >> >> I just want to make rds

[PATCH net] rds: Fix NULL pointer dereference in __rds_rdma_map

2017-12-06 Thread Håkon Bugge
02 00 00 48 89 55 d0 48 89 4d c8 85 c0 0f 84 2d 03 00 00 48 8b 87 00 03 00 00 <48> 83 b8 c0 00 00 00 00 0f 84 25 03 00 0 0 48 8b 06 48 8b 56 08 The fix is to check the existence of an underlying transport in __rds_rdma_map(). Signed-off-by: Håkon Bugge Reported-by: syzbot --- net/rds/rdma

Re: [PATCH] mlx4_core: allocate 4KB ICM chunks

2018-05-11 Thread Håkon Bugge
> On 11 May 2018, at 01:31, Qing Huang wrote: > > When a system is under memory presure (high usage with fragments), > the original 256KB ICM chunk allocations will likely trigger kernel > memory management to enter slow path doing memory compact/migration > ops in order to complete high order

Re: [PATCH net 2/2] net/mlx5e: Cleanup of dcbnl related fields

2018-08-14 Thread Håkon Bugge
> On 14 Aug 2018, at 11:01, Yuval Shaia wrote: > > On Wed, Aug 08, 2018 at 03:48:08PM -0700, Saeed Mahameed wrote: >> From: Huy Nguyen >> >> Remove unused netdev_registered_init/remove in en.h >> Return ENOSUPPORT if the check MLX5_DSCP_SUPPORTED fails. > > s/ENOSUPPORT/EOPNOTSUPP > (noted

[PATCH net] rds: Reintroduce statistics counting

2017-08-08 Thread Håkon Bugge
re-introduces filling the receive queue from rds_ib_recv(), but does not add the statistics counter. rds_ib_recv() was later renamed to rds_ib_recv_path(). This commit reintroduces the statistics counting of s_ib_rx_refill_from_thread and s_ib_rx_refill_from_cq. Signed-off-by: Håkon Bugge Reviewed

[PATCH net] rds: Make sure updates to cp_send_gen can be observed

2017-07-20 Thread Håkon Bugge
del: Loads from and stores to shared (but non-atomic) variables should be protected with the READ_ONCE(), WRITE_ONCE(), and ACCESS_ONCE(). Clause 5.1.2.4/25 in the C standard is also relevant. Signed-off-by: Håkon Bugge Reviewed-by: Knut Omang --- net/rds/send.c | 6 +++--- 1 f

Re: [PATCH net] rds: Make sure updates to cp_send_gen can be observed

2017-07-20 Thread Håkon Bugge
> On 20 Jul 2017, at 13:02, Sowmini Varadhan > wrote: > > On (07/20/17 12:28), H??kon Bugge wrote: >> cp->cp_send_gen is treated as a normal variable, although it may be >> used by different threads. > > I'm confused by that assertion. If you look at the comments right > above the change in yo

[PATCH] rds: Fix inaccurate accounting of unsignaled wrs

2017-10-24 Thread Håkon Bugge
rds_ib_set_wr_signal_state() function. However, this function is not always used which yields inaccurate accounting. This commit fixes this, re-factors a code bloat related to the matter, and makes the actual parameter type to the function consistent. Signed-off-by: Håkon Bugge --- net/rds/ib_send.c | 15

[PATCH] rds: Fix uninitialized variable

2017-10-24 Thread Håkon Bugge
send_flags needs to be initialized before calling rds_ib_set_wr_signal_state(). Signed-off-by: Håkon Bugge --- net/rds/ib_send.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/rds/ib_send.c b/net/rds/ib_send.c index 6ab39db..8f46755 100644 --- a/net/rds/ib_send.c +++ b/net/rds

[PATCH] rds: Fix uninitialized variable

2017-10-24 Thread Håkon Bugge
send_flags needs to be initialized before calling rds_ib_set_wr_signal_state(). Signed-off-by: Håkon Bugge --- net/rds/ib_send.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/rds/ib_send.c b/net/rds/ib_send.c index 6ab39db..8f46755 100644 --- a/net/rds/ib_send.c +++ b/net/rds

Re: [PATCH] rds: Fix uninitialized variable

2017-10-24 Thread Håkon Bugge
Ignore this, sent the old one. Håkon > On 24 Oct 2017, at 18:07, Håkon Bugge wrote: > > send_flags needs to be initialized before calling > rds_ib_set_wr_signal_state(). > > Signed-off-by: Håkon Bugge > --- > net/rds/ib_send.c | 1 + > 1 file changed, 1 insertion(+

[PATCH] rds: ib: Fix uninitialized variable

2017-10-24 Thread Håkon Bugge
send_flags needs to be initialized before calling rds_ib_set_wr_signal_state(). Signed-off-by: Håkon Bugge Acked-by: Santosh Shilimkar --- net/rds/ib_send.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/rds/ib_send.c b/net/rds/ib_send.c index 6ab39db..8f46755 100644 --- a/net/rds

[PATCH net] rds: Fix non-atomic operation on shared flag variable

2017-09-05 Thread Håkon Bugge
The bits in m_flags in struct rds_message are used for a plurality of reasons, and from different contexts. To avoid any missing updates to m_flags, use the atomic set_bit() instead of the non-atomic equivalent. Signed-off-by: Håkon Bugge Reviewed-by: Knut Omang Reviewed-by: Wei Lin Guay

[PATCH net] rds: Fix incorrect statistics counting

2017-09-06 Thread Håkon Bugge
the race and increments the statistics counter correctly. Signed-off-by: Håkon Bugge Reviewed-by: Knut Omang --- net/rds/send.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/net/rds/send.c b/net/rds/send.c index 058a407..ecfe0b5 100644 --- a/net/rds/send.c

Re: [PATCH net] rds: Fix incorrect statistics counting

2017-09-06 Thread Håkon Bugge
> On 6 Sep 2017, at 17:58, Santosh Shilimkar > wrote: > > On 9/6/2017 8:29 AM, Håkon Bugge wrote: >> In rds_send_xmit() there is logic to batch the sends. However, if >> another thread has acquired the lock, it is considered a race and we >> yi

[PATCH net v2] rds: Fix incorrect statistics counting

2017-09-06 Thread Håkon Bugge
counts the race condition correctly. Changes from v1: - Removed check for *someone_on_xmit()* - Fixed incorrect indentation Signed-off-by: Håkon Bugge Reviewed-by: Knut Omang --- net/rds/send.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/net/rds/send.c b/net/rds

[PATCH net] rds: ib: Fix NULL pointer dereference in debug code

2017-11-07 Thread Håkon Bugge
ag->f_sg), (long) ib_sg_dma_address( The fix is simply to move the rdsdebug() statement up before the ib_post_recv() and remove the printing of ret, which is taken care of anyway by the non-debug code. Signed-off-by: Håkon Bugge Reviewed-by: Knut Omang Reviewed-by: Wei L

[PATCH] mlx4_ib: Increase the timeout for CM cache

2019-01-31 Thread Håkon Bugge
he numbers fell down to about one hundred for both of them. Adjustment of the CMA timeout is _not_ part of this commit. Signed-off-by: Håkon Bugge --- drivers/infiniband/hw/mlx4/cm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/mlx4/cm.c b/drivers/inf

Re: [PATCH] mlx4_ib: Increase the timeout for CM cache

2019-02-06 Thread Håkon Bugge
> On 5 Feb 2019, at 23:36, Jason Gunthorpe wrote: > > On Thu, Jan 31, 2019 at 06:09:51PM +0100, Håkon Bugge wrote: >> Using CX-3 virtual functions, either from a bare-metal machine or >> pass-through from a VM, MAD packets are proxied through the PF driver. >> >

Re: [PATCH] mlx4_ib: Increase the timeout for CM cache

2019-02-06 Thread Håkon Bugge
> On 6 Feb 2019, at 09:50, Håkon Bugge wrote: > > > >> On 5 Feb 2019, at 23:36, Jason Gunthorpe wrote: >> >> On Thu, Jan 31, 2019 at 06:09:51PM +0100, Håkon Bugge wrote: >>> Using CX-3 virtual functions, either from a bare-metal machine or >

Re: [PATCH] mlx4_ib: Increase the timeout for CM cache

2019-02-06 Thread Håkon Bugge
> On 6 Feb 2019, at 19:02, jackm wrote: > > On Wed, 6 Feb 2019 16:40:14 +0100 > Håkon Bugge wrote: > >> Jack, >> >> A major contributor to the long processing time in the PF driver >> proxying QP1 packets is: >> >> c

Re: [Linux-kernel-mentees] [PATCH net] rds: Prevent kernel-infoleak in rds_notify_queue_get()

2020-07-31 Thread Håkon Bugge
> On 31 Jul 2020, at 11:59, Dan Carpenter wrote: > > On Fri, Jul 31, 2020 at 07:53:01AM +0300, Leon Romanovsky wrote: >> On Thu, Jul 30, 2020 at 03:20:26PM -0400, Peilin Ye wrote: >>> rds_notify_queue_get() is potentially copying uninitialized kernel stack >>> memory to userspace since the com

Re: [Linux-kernel-mentees] [PATCH net] rds: Prevent kernel-infoleak in rds_notify_queue_get()

2020-07-31 Thread Håkon Bugge
> On 31 Jul 2020, at 13:59, Greg Kroah-Hartman > wrote: > > On Fri, Jul 31, 2020 at 01:14:09PM +0200, Håkon Bugge wrote: >> >> >>> On 31 Jul 2020, at 11:59, Dan Carpenter wrote: >>> >>> On Fri, Jul 31, 2020 at 07:53:01AM +0300, Leon R

[PATCH for-next v3 0/2] Introduce rdma_set_min_rnr_timer() and use it in RDS

2021-03-31 Thread Håkon Bugge
ib_modify_qp() is an expensive operation on some HCAs running virtualized. This series removes two ib_modify_qp() calls from RDS. I am sending this as a v3, even though it is the first sent to net. This because the IB Core commit has reach v3. Håkon Bugge (2): IB/cma: Introduce

[PATCH for-next v3 2/2] rds: ib: Remove two ib_modify_qp() calls

2021-03-31 Thread Håkon Bugge
rface to shave off another ib_modify_qp(). Fixes: ec16227e1414 ("RDS/IB: Infiniband transport") Signed-off-by: Håkon Bugge --- net/rds/ib_cm.c | 35 +-- net/rds/rdma_transport.c | 1 + 2 files changed, 2 insertions(+), 34 deletions(-) diff --git a

[PATCH for-next v3 1/2] IB/cma: Introduce rdma_set_min_rnr_timer()

2021-03-31 Thread Håkon Bugge
ime value before retrying the send. The 5-bit value to be supplied to the rdma_set_min_rnr_timer() is documented in IBTA Table 45: "Encoding for RNR NAK Timer Field". Signed-off-by: Håkon Bugge Acked-by: Jason Gunthorpe --- drivers/infiniband/core/cm

Re: [PATCH net-next] net/rds: Use DMA memory pool allocation for rds_header

2019-10-02 Thread Håkon Bugge
ous DMA coherent memory to store struct rds_header for >>> sending/receiving packets. The memory allocated is then partitioned >>> into struct rds_header. This is not necessary and can be costly at >>> times when memory is fragmented. Instead, RDS should use the DMA >