Re: [PATCH] IB/core: Allocating larger memory than required for cma_configfs

2015-12-30 Thread Bart Van Assche
On 12/30/2015 03:14 PM, Matan Barak wrote: We were allocating larger memory space than requried for cma_dev_group->default_ports_group. Please change the subject into something like "Do not allocate more ...". Please also fix the spelling error in the patch description. Thanks, Bart. -- To

Re: [PATCH] IB/mad: Ensure fairness in ib_mad_completion_handler

2015-12-30 Thread ira.weiny
On Wed, Dec 30, 2015 at 03:01:33AM -0800, Christoph Hellwig wrote: > Hi Ira, > > please take a look at the patches I've attached - they are just WIP > that hasn't been tested as I'm on a vacation without access to my > IB setup until New Year's Eve. I have them on a branch. I'll try and do some

Re: [PATCH for-next 3/7] IB/mlx4: Configure device to work in RoCEv2

2015-12-30 Thread Matan Barak
On 12/29/2015 4:37 PM, Or Gerlitz wrote: On 12/29/2015 3:24 PM, Matan Barak wrote: From: Moni Shoua Some mlx4 adapters are RoCEv2 capable. To enable this feature some hardware configuration is required. This is 1. Set port general parameters 2. Configure the outgoing

Re: [PATCH for-next 6/7] IB/mlx4: Create and use another QP1 for RoCEv2

2015-12-30 Thread Matan Barak
On 12/29/2015 4:42 PM, Or Gerlitz wrote: On 12/29/2015 3:24 PM, Matan Barak wrote: The mlx4 driver uses a special QP to implement the GSI QP. This kind of QP allows to build the InfiniBand headers in SW to be put before the payload that comes in with the WR. The mlx4 HW builds the packet,

Re: [PATCH for-next 3/7] IB/mlx4: Configure device to work in RoCEv2

2015-12-30 Thread Or Gerlitz
On 12/30/2015 10:23 AM, Matan Barak wrote: int mlx4_CONFIG_DEV_wrapper(struct mlx4_dev *dev, int slave, struct mlx4_vhcr *vhcr, struct mlx4_cmd_mailbox *inbox, struct mlx4_cmd_mailbox *outbox,

Re: [PATCH for-next 2/7] IB/mlx4: Add RoCE per GID support for add_gid and del_gid

2015-12-30 Thread Matan Barak
On 12/29/2015 5:24 PM, Or Gerlitz wrote: On 12/29/2015 3:24 PM, Matan Barak wrote: [...] We use a new firmware command in order to populate the GID table and store the type along with the GID value. Its a new value to existing command.. so better say we use a new value to the SET_PORT

Re: [PATCH for-next V3 00/11] Add RoCE v2 support

2015-12-30 Thread Matan Barak
On 12/30/2015 8:04 AM, Or Gerlitz wrote: Hi Matan, I see these two smatch complaints on code added with this series, can you please take a look? drivers/infiniband/core/addr.c:503 rdma_resolve_ip_route() warn: variable dereferenced before check 'src_addr' (see line 500)

Re: [PATCH] IB/mad: Ensure fairness in ib_mad_completion_handler

2015-12-30 Thread Christoph Hellwig
Hi Ira, please take a look at the patches I've attached - they are just WIP that hasn't been tested as I'm on a vacation without access to my IB setup until New Year's Eve. Patch 1 is I think a genuine bug fix caused by the madness (pun intendended) of the wr_id abuses. Patch 2: passes the

Re: [PATCH for-next 1/7] IB/mlx4: Query RoCE support

2015-12-30 Thread Matan Barak
On 12/30/2015 10:44 AM, Or Gerlitz wrote: On 12/30/2015 10:27 AM, Matan Barak wrote: On 12/29/2015 5:19 PM, Or Gerlitz wrote: On 12/29/2015 3:24 PM, Matan Barak wrote: @@ -905,6 +906,8 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap) dev_cap->flags2

Re: [PATCH for-next V3 00/11] Add RoCE v2 support

2015-12-30 Thread Matan Barak
On 12/30/2015 1:05 PM, Or Gerlitz wrote: On 12/30/2015 12:48 PM, Matan Barak wrote: On 12/30/2015 8:04 AM, Or Gerlitz wrote: Hi Matan, I see these two smatch complaints on code added with this series, can you please take a look? drivers/infiniband/core/addr.c:503 rdma_resolve_ip_route()

Re: [PATCH 3/6] IB/uapi: expose uverbs WC opcodes

2015-12-30 Thread Leon Romanovsky
On Wed, Dec 30, 2015 at 10:44:29AM +0100, Christoph Hellwig wrote: > On Tue, Dec 29, 2015 at 01:02:54PM +0200, Sagi Grimberg wrote: > >> As you did it in the first patch, just don't assign after IB_WC_LOCAL_INV. > >> Compiler will handle IB_UVERS_WC_SEND_END + X calculations by itself. > > > > I

Re: [PATCH for-next V3 00/11] Add RoCE v2 support

2015-12-30 Thread Or Gerlitz
On 12/30/2015 12:48 PM, Matan Barak wrote: On 12/30/2015 8:04 AM, Or Gerlitz wrote: Hi Matan, I see these two smatch complaints on code added with this series, can you please take a look? drivers/infiniband/core/addr.c:503 rdma_resolve_ip_route() warn: variable dereferenced before check

Re: [PATCH for-next 5/7] IB/mlx4: Enable send of RoCE QP1 packets with IP/UDP headers

2015-12-30 Thread Moni Shoua
> > The last hunk that you removed had a role and was by no means > dead-code, right? so... (1) why it's correct to remove it? (2) if you > want to introduce different way to implement what was done here, why > in this patch? maybe add pre-patch for that In a way you are right. This hunk does not

Re: [PATCH for-next 2/3] IB/core: Change per-entry lock in RoCE GID table to one lock

2015-12-30 Thread Matan Barak
On 12/30/2015 9:36 AM, Bart Van Assche wrote: On 12/30/2015 07:01 AM, Or Gerlitz wrote: On 10/28/2015 4:52 PM, Matan Barak wrote: @@ -134,16 +138,14 @@ static int write_gid(struct ib_device *ib_dev, u8 port, { int ret = 0; struct net_device *old_net_dev; -unsigned long

Re: [PATCH v1 ib-next 0/3] IB core uverbs support for leagacy commands

2015-12-30 Thread Leon Romanovsky
On Tue, Nov 10, 2015 at 08:00:07PM +0200, Eli Cohen wrote: > Hi Doug, > > this patcheset is addresses comments from the community. Specifically if the > verbs is not supported by a hardware driver, we return -EOPNOTSUPP. > > Eli > > Eli Cohen (3): > IB/core: Avoid duplicate code > IB/core:

Re: [PATCH for-next 1/7] IB/mlx4: Query RoCE support

2015-12-30 Thread Matan Barak
On 12/29/2015 5:19 PM, Or Gerlitz wrote: On 12/29/2015 3:24 PM, Matan Barak wrote: @@ -905,6 +906,8 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap) dev_cap->flags2 |= MLX4_DEV_CAP_FLAG2_EQE_STRIDE; MLX4_GET(dev_cap->bmme_flags, outbox,

Re: [PATCH for-next 1/7] IB/mlx4: Query RoCE support

2015-12-30 Thread Or Gerlitz
On 12/30/2015 10:27 AM, Matan Barak wrote: On 12/29/2015 5:19 PM, Or Gerlitz wrote: On 12/29/2015 3:24 PM, Matan Barak wrote: @@ -905,6 +906,8 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap) dev_cap->flags2 |= MLX4_DEV_CAP_FLAG2_EQE_STRIDE;

Re: [PATCH 08/13] IB/srpt: chain RDMA READ/WRITE requests

2015-12-30 Thread Christoph Hellwig
On Tue, Dec 29, 2015 at 10:58:24AM +0100, Bart Van Assche wrote: > On 12/07/2015 09:51 PM, Christoph Hellwig wrote: > > Remove struct rdma_iu and instead allocate the struct ib_rdma_wr array > > early and fill out directly. This allows us to chain the WRs, and thus > > archive both less lock

Re: [PATCH for-next V3 10/11] IB/core: Initialize UD header structure with IP and UDP headers

2015-12-30 Thread Matan Barak
On 12/30/2015 7:57 AM, Or Gerlitz wrote: On 12/23/2015 2:56 PM, Matan Barak wrote: +__be16 ib_ud_ip4_csum(struct ib_ud_header *header) +{ +struct iphdr iph; + +iph.ihl= 5; +iph.version= 4; +iph.tos= header->ip4.tos; +iph.tot_len=

Re: [PATCH 03/13] irq_poll: fold irq_poll_sched_prep into irq_poll_sched

2015-12-30 Thread Christoph Hellwig
On Tue, Dec 29, 2015 at 10:54:18AM +0100, Bart Van Assche wrote: > After having applied these changes the SRP initiator didn't receive any > RDMA completions anymore. I could remedy that by changing > "!test_and_set_bit()" into "test_and_set_bit()": Yes. I actually had this bug earlier, fixed

Re: [PATCH] IB/core: Remove a set-but-not-used variable from ib_sg_to_pages()

2015-12-30 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 3/6] IB/uapi: expose uverbs WC opcodes

2015-12-30 Thread Christoph Hellwig
On Tue, Dec 29, 2015 at 01:02:54PM +0200, Sagi Grimberg wrote: >> As you did it in the first patch, just don't assign after IB_WC_LOCAL_INV. >> Compiler will handle IB_UVERS_WC_SEND_END + X calculations by itself. > > I disagree, I'd say its better to keep the code verbosity level here... I

Re: [PATCH for-next 7/7] IB/mlx4: Advertise RoCE support

2015-12-30 Thread Matan Barak
On 12/29/2015 4:44 PM, Or Gerlitz wrote: On 12/29/2015 3:24 PM, Matan Barak wrote: Advertise RoCE support in port_immutable according to the hardware capabilities. This enables the verbs stack to use RoCE v2 mode. Advertise RoCE V2 support Signed-off-by: Matan Barak

Re: [PATCH] IB/mad: Ensure fairness in ib_mad_completion_handler

2015-12-30 Thread Eli Cohen
On Mon, Dec 28, 2015 at 07:35:14PM -0500, ira.weiny wrote: > > I'm still confused. Here is the code with the patch applied: > > > /* > * IB MAD completion callback > */ > static void ib_mad_completion_handler(struct work_struct *work) > { > struct ib_mad_port_private *port_priv;

[PATCH] IB/core: Allocating larger memory than required for cma_configfs

2015-12-30 Thread Matan Barak
We were allocating larger memory space than requried for cma_dev_group->default_ports_group. Fixes: 045959db65c6 ('IB/cma: Add configfs for rdma_cm') Signed-off-by: Matan Barak --- Hi Doug, This patch fixes a small issue, where we allocated more space than we actually

[PATCH] IB/core: Fix dereference before check

2015-12-30 Thread Matan Barak
Sparse complains about dereference before check. Fixing this by moving the check before the dereference. Fixes: 200298326b27 ('IB/core: Validate route when we init ah') Signed-off-by: Matan Barak --- Hi Doug, This patch eliminates a deference before check sparse false

[PATCH] IB/core: Eliminate sparse false positive warning on context imbalance

2015-12-30 Thread Matan Barak
When write_gid function needs to do a sleep-able operation, it unlocks table->rwlock and then relocks it. Sparse complains about context imbalance. This is safe as write_gid is always called with table->rwlock. write_gid protects from simultaneous writes to this GID entry by setting the

git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma.git/k.o/for-4.5 crash during boot

2015-12-30 Thread Bart Van Assche
Hello Christoph, Can you check whether the branch in the subject of this e-mail works fine on your setup (commit 59caaed7a7) ? On my test setup (Dell R430 with two ConnectX-3 adapters) this branch crashes during boot in get_counter_table() (see also the attached screenshot). Thanks, Bart.

Re: git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma.git/k.o/for-4.5 crash during boot

2015-12-30 Thread Or Gerlitz
On 12/30/2015 2:04 PM, Bart Van Assche wrote: Hello Christoph, Can you check whether the branch in the subject of this e-mail works fine on your setup (commit 59caaed7a7) ? On my test setup (Dell R430 with two ConnectX-3 adapters) this branch crashes during boot in get_counter_table() (see

Re: git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma.git/k.o/for-4.5 crash during boot

2015-12-30 Thread Leon Romanovsky
On Wed, Dec 30, 2015 at 02:22:23PM +0200, Or Gerlitz wrote: > On 12/30/2015 2:04 PM, Bart Van Assche wrote: > >Hello Christoph, > > > >Can you check whether the branch in the subject of this e-mail works fine > >on your setup (commit 59caaed7a7) ? On my test setup (Dell R430 with two > >ConnectX-3