Re: [PATCH v2] IB/rxe: don't crash, if allocation of crc algorithm failed

2017-10-31 Thread Moni Shoua
PTR_ERR(rxe->tfm)); > - return PTR_ERR(rxe->tfm); > + PTR_ERR(tfm)); > + return PTR_ERR(tfm); > } > + rxe->tfm = tfm; > > err = ib_register_device(dev, NULL); > if (err) { > -- > 2.12.3 > > -- Thanks Acked-by: Moni Shoua

Re: [PATCH 2/2] IB/rxe: don't crash, if allocation of crc algorithm failed

2017-10-29 Thread Moni Shoua
On Fri, Oct 27, 2017 at 6:59 PM, Thomas Bogendoerfer wrote: > Following crash happens, if crc algorithm couldn't be allocated: > > [ 1087.989072] rdma_rxe: loaded > [ 1097.855397] PCLMULQDQ-NI instructions are not detected. > [ 1097.901220] rdma_rxe: failed to allocate crc algorithmi err:-2 > [ 10

Re: [PATCH v06 30/36] uapi rdma/rdma_user_rxe.h: include in.h and in6.h

2017-08-09 Thread Moni Shoua
> > I'm not sure this is a good idea, linux/in.h should not be included in > userspace users of this file, 'sockaddr_in' needs to come from glibc's > 'netinet/in.h' instead.. > > Jason Is it wrong to include include/uapi/linux/in.h from userspace?

Re: [PATCH] infiniband: avoid overflow warning

2017-07-31 Thread Moni Shoua
On Mon, Jul 31, 2017 at 9:50 AM, Arnd Bergmann wrote: > A sockaddr_in structure on the stack getting passed into rdma_ip2gid > triggers this warning, since we memcpy into a larger sockaddr_in6 > structure: > > In function 'memcpy', > inlined from 'rdma_ip2gid' at include/rdma/ib_addr.h:175:3,

Re: [PATCH] drivers/rxe: improve rxe loopback

2017-07-30 Thread Moni Shoua
>> Have you considered using ip_route_output_key() for IPv4 or >> ip6_route_output() for IPv6 to decide if this is a loopback? >> For reference you can check the flow starting at rdma_resolve_ip() >> > > Hi Moni, > > Yes, I had looked into it, but I haven't seen how I can find > out if the destin

Re: [PATCH] drivers/rxe: improve rxe loopback

2017-07-27 Thread Moni Shoua
On Wed, Jul 26, 2017 at 10:57 PM, Yuval Shaia wrote: > On Wed, Jul 26, 2017 at 05:52:48PM +0300, Marcel Apfelbaum wrote: >> Currently a packet is marked for loopback only if the source and >> destination address match. This is not enough when multiple >> gids are present in rxe's gid table and the

Re: [PATCH V5] rxe: Fix a sleep-in-atomic bug in post_one_send

2017-06-05 Thread Moni Shoua
Acked-by: Moni Shoua thanks

Re: [PATCH V3] rxe: Fix a sleep-in-atomic bug in post_one_send

2017-06-05 Thread Moni Shoua
> I agree. > So, it is fine to me to remove this line, as you said in the former email: > Thanks. Can you please send a patch like that?

Re: [PATCH V3] rxe: Fix a sleep-in-atomic bug in post_one_send

2017-06-05 Thread Moni Shoua
> - if (qp->is_user && copy_from_user(p, (__user void *) > - (uintptr_t)sge->addr, > sge->length)) > + spin_unlock_irqrestore(&qp->sq.sq_lock, *flags); > + err = copy_from_user(p, (__user vo

Re: [PATCH V3] rxe: Fix a sleep-in-atomic bug in post_one_send

2017-06-01 Thread Moni Shoua
On Thu, Jun 1, 2017 at 11:28 AM, Jia-Ju Bai wrote: > The driver may sleep under a spin lock, and the function call path is: > post_one_send (acquire the lock by spin_lock_irqsave) > init_send_wqe > copy_from_user --> may sleep > > To fix it, the lock is released before copy_from_user, and th

Re: [PATCH][V2] IB/rxe: fix typo: "algorithmi" -> "algorithm"

2017-04-24 Thread Moni Shoua
On Mon, Apr 24, 2017 at 12:26 PM, Colin King wrote: > From: Colin Ian King > > trivial fix to typo in pr_err message > > Signed-off-by: Colin Ian King > --- > drivers/infiniband/sw/rxe/rxe_verbs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/infiniband/sw/rxe

Re: [PATCH] IB/rxe: Don't clamp residual length to mtu

2017-04-13 Thread Moni Shoua
qp->resp.resid = mtu; > } else { > if (pktlen != resid) { > state = RESPST_ERR_LENGTH; > -- > 2.10.2 > > -- Thanks Johannes Acked-by: Moni Shoua

Re: [PATCH] IB/rxe: fix GFP_KERNEL in spinlock context

2016-09-04 Thread Moni Shoua
qp_list) ? > - skb_clone(skb, GFP_KERNEL) : NULL; > + skb_clone(skb, GFP_ATOMIC) : NULL; > > pkt->qp = qp; > rxe_add_ref(qp); > -- > 2.7.4 > Acked-by: Moni Shoua

Re: [PATCH v05 61/72] include/uapi/rdma/rdma_user_rxe.h: include in.h and in6.h

2016-08-25 Thread Moni Shoua
Acked-by: Moni Shoua On Mon, Aug 22, 2016 at 9:33 PM, Mikko Rapeli wrote: > Fixes these userspace compilation errors when rdma_user_rxe.h is compiled > alone: > > rdma/rdma_user_rxe.h:59:20: error: field ‘_sockaddr’ has incomplete type >struct sock

Re: [PATCH 3/3] infiniband: rxe: fix 32-bit build warnings

2016-06-13 Thread Moni Shoua
thanks. will be applied to next series. On Mon, Jun 13, 2016 at 3:54 PM, Arnd Bergmann wrote: > The new rxe infinband driver passes around pointers that have been > converted to 64-bit integers. This is valid, but causes compile-time > warnings on all 32-bit architectures: > > infiniband/hw/rxe/r

Re: [PATCH 1/3] infiniband: rxe: avoid 64-bit division

2016-06-13 Thread Moni Shoua
thanks. will be applied to next series On Mon, Jun 13, 2016 at 4:18 PM, Leon Romanovsky wrote: > On Mon, Jun 13, 2016 at 02:54:53PM +0200, Arnd Bergmann wrote: >> The rxe driver fails to build on 32-bit because of a 64-bit division: >> >> In function `rxe_qp_from_attr': >> :(.text+0x53158): undef

Re: [PATCH 2/3] infiniband: rxe: add UDP_TUNNEL dependency

2016-06-13 Thread Moni Shoua
thanks. will be applied to next series On Mon, Jun 13, 2016 at 3:54 PM, Arnd Bergmann wrote: > The newly added rxe driver links against the UDP tunneling code, > which causes build errors when CONFIG_UDP_TUNNEL is disabled: > > ERROR: "setup_udp_tunnel_sock" [drivers/infiniband/hw/rxe/ib_rxe.ko]

Re: [patch] IB/rxe: fix error code in rxe_srq_from_init()

2016-06-13 Thread Moni Shoua
On Mon, Jun 13, 2016 at 9:53 AM, Dan Carpenter wrote: > If copy_to_user() fails then it returns the number of bytes not copied. > It would be between 1-4 here. Later the callers dereference it leading > to an Oops. > > It was sort of hard to fix this without making the code confusing so I > did a