RE: [PATCH 5/9] ocrdma: Driver for Emulex OneConnect RDMA adapter

2012-03-21 Thread Hefty, Sean
> +static int ocrdma_inet6addr_event(struct notifier_block *, > + unsigned long, void *); > + > +static struct notifier_block ocrdma_inet6addr_notifier = { > + .notifier_call = ocrdma_inet6addr_event > +}; > + > +int ocrdma_get_instance(void) > +{ > + int insta

RE: [PATCH 4/9] ocrdma: Driver for Emulex OneConnect RDMA adapter

2012-03-21 Thread Hefty, Sean
> +static inline void *ocrdma_get_eqe(struct ocrdma_eq *eq) > +{ > + return (u8 *)eq->q.va + (eq->q.tail * sizeof(struct ocrdma_eqe)); > +} casts from (void *) to (u8 *) are not needed. This occurs in multiple places. > +enum ib_qp_state get_ibqp_state(enum ocrdma_qp_state qps) > +{ > +

Re: [GIT PULL] please pull infiniband.git

2012-03-21 Thread Or Gerlitz
On Wed, Mar 21, 2012 at 11:03 PM, Christoph Lameter wrote: > On Wed, 21 Mar 2012, Or Gerlitz wrote: >> So again, any reason not to merge the RAW QP patches for 3.4? they >> have been posted few months ago, its two kernel patches and we have >> Sean's reviewd-by Signature for the core patch (see

Re: [GIT PULL] please pull infiniband.git

2012-03-21 Thread Christoph Lameter
On Wed, 21 Mar 2012, Or Gerlitz wrote: > So again, any reason not to merge the RAW QP patches for 3.4? they > have been posted few months ago, its two kernel patches and we have > Sean's reviewd-by Signature for the core patch (see > http://marc.info/?l=linux-rdma&m=132693668105264&w=2) Yes pleas

Re: [PATCH 3/9] ocrdma: Driver for Emulex OneConnect RDMA adapter

2012-03-21 Thread Jason Gunthorpe
On Wed, Mar 21, 2012 at 12:33:00PM -0700, Roland Dreier wrote: > On Wed, Mar 21, 2012 at 12:04 PM, wrote: > >> > +/* mailbox cmd response */ > >> > +struct ocrdma_mbx_rsp { > >> > + ? ? ? u32 subsys_op; > >> > + ? ? ? u32 status; > >> > + ? ? ? u32 rsp_len; > >> > + ? ? ? u32 add_rsp_len; > >> >

Re: [GIT PULL] please pull infiniband.git

2012-03-21 Thread Or Gerlitz
On Mon, Mar 19, 2012 at 7:11 PM, Roland Dreier wrote: > InfiniBand/RDMA changes for the 3.4 merge window. Nothing big really stands > out; by > patch count lots of fixes to the mlx4 driver plus some cleanups and fixes to > the core > and other drivers. Hi Roland, So again, any reason not to m

RE: [PATCH 4/9] ocrdma: Driver for Emulex OneConnect RDMA adapter

2012-03-21 Thread Parav.Pandit
> -Original Message- > From: Roland Dreier [mailto:rol...@purestorage.com] > Sent: Thursday, March 22, 2012 1:02 AM > To: Pandit, Parav > Cc: linux-rdma@vger.kernel.org; net...@vger.kernel.org > Subject: Re: [PATCH 4/9] ocrdma: Driver for Emulex OneConnect RDMA > adapter > > On Wed, Mar

Re: [PATCH 3/9] ocrdma: Driver for Emulex OneConnect RDMA adapter

2012-03-21 Thread Roland Dreier
On Wed, Mar 21, 2012 at 12:04 PM, wrote: >> > +/* mailbox cmd response */ >> > +struct ocrdma_mbx_rsp { >> > +       u32 subsys_op; >> > +       u32 status; >> > +       u32 rsp_len; >> > +       u32 add_rsp_len; >> > +} __packed; >> ...similar comments about only using __packed where you really

Re: [PATCH 4/9] ocrdma: Driver for Emulex OneConnect RDMA adapter

2012-03-21 Thread Roland Dreier
On Wed, Mar 21, 2012 at 12:09 PM, wrote: > Yes. Driver needs to put QP to flush state. So that appropriate CQEs can be > returned during poll_cq() phase. > So state machine is implemented above. Couldn't you just write if (ib_modify_qp_is_ok(...)) { if (new_state == OCRDMA_QPS_ERR)

Re: [PATCH 6/9] ocrdma: Driver for Emulex OneConnect RDMA adapter

2012-03-21 Thread Roland Dreier
> It does returns ocrdma_mr* on success. Why do you think it doesn't return? > Below is the snippet. Sorry, you're absoutely right. I was looking at ocrdma_mbx_alloc_lkey(). - R. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger

RE: [PATCH 6/9] ocrdma: Driver for Emulex OneConnect RDMA adapter

2012-03-21 Thread Parav.Pandit
> -Original Message- > From: Roland Dreier [mailto:rol...@purestorage.com] > Sent: Wednesday, March 21, 2012 10:13 PM > To: Pandit, Parav > Cc: linux-rdma@vger.kernel.org; net...@vger.kernel.org > Subject: Re: [PATCH 6/9] ocrdma: Driver for Emulex OneConnect RDMA > adapter > > > +struct

RE: [PATCH 4/9] ocrdma: Driver for Emulex OneConnect RDMA adapter

2012-03-21 Thread Parav.Pandit
> -Original Message- > From: Roland Dreier [mailto:rol...@purestorage.com] > Sent: Wednesday, March 21, 2012 10:04 PM > To: Pandit, Parav > Cc: linux-rdma@vger.kernel.org; net...@vger.kernel.org > Subject: Re: [PATCH 4/9] ocrdma: Driver for Emulex OneConnect RDMA > adapter > > > +int ocr

RE: [PATCH 3/9] ocrdma: Driver for Emulex OneConnect RDMA adapter

2012-03-21 Thread Parav.Pandit
> -Original Message- > From: Roland Dreier [mailto:rol...@purestorage.com] > Sent: Wednesday, March 21, 2012 9:56 PM > To: Pandit, Parav > Cc: linux-rdma@vger.kernel.org; net...@vger.kernel.org > Subject: Re: [PATCH 3/9] ocrdma: Driver for Emulex OneConnect RDMA > adapter > > > +/* mailb

RE: [PATCH 2/9] ocrdma: Driver for Emulex OneConnect RDMA adapter

2012-03-21 Thread Parav.Pandit
I see couple of comments on rsvd words. They were primarily not introduced for alignment. But there are other new features that we will be adding with new set of hardware and firmware updates. I don't want to change the user-kernel interface at such stage by modifying the size of the structure. F

RE: [PATCH 1/9] ocrdma: Driver for Emulex OneConnect RDMA adapter

2012-03-21 Thread Parav.Pandit
> -Original Message- > From: Roland Dreier [mailto:rol...@purestorage.com] > Sent: Wednesday, March 21, 2012 9:44 PM > To: Pandit, Parav > Cc: linux-rdma@vger.kernel.org; net...@vger.kernel.org > Subject: Re: [PATCH 1/9] ocrdma: Driver for Emulex OneConnect RDMA > adapter > > > +#define

RE: [PATCH 6/9] ocrdma: Driver for Emulex OneConnect RDMA adapter

2012-03-21 Thread Parav.Pandit
Inline. > -Original Message- > From: Roland Dreier [mailto:rol...@purestorage.com] > Sent: Wednesday, March 21, 2012 11:27 PM > To: frank zago > Cc: Pandit, Parav; linux-rdma@vger.kernel.org > Subject: Re: [PATCH 6/9] ocrdma: Driver for Emulex OneConnect RDMA > adapter > > On Wed, Mar 21,

Re: [PATCH 6/9] ocrdma: Driver for Emulex OneConnect RDMA adapter

2012-03-21 Thread frank zago
On 03/20/2012 05:39 PM, parav.pan...@emulex.com wrote: > + > +int ocrdma_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, > + struct ib_send_wr **bad_wr) > +{ > + int status = 0; > + struct ocrdma_qp *qp = get_ocrdma_qp(ibqp); > + struct ocrdma_hdr_wqe *hdr; > +

Re: [PATCH 4/9] ocrdma: Driver for Emulex OneConnect RDMA adapter

2012-03-21 Thread frank zago
On 03/20/2012 05:39 PM, parav.pan...@emulex.com wrote: > From: Parav Pandit > + > +int ocrdma_mbx_dealloc_lkey(struct ocrdma_dev *dev, int fr_mr, u32 lkey) > +{ > + int status = -ENOMEM; > + struct ocrdma_dealloc_lkey *cmd; > + > + cmd = ocrdma_init_emb_mqe(OCRDMA_CMD_DEALLOC_LKEY, si

Fwd: Re: [PATCH 6/9] ocrdma: Driver for Emulex OneConnect RDMA adapter

2012-03-21 Thread frank zago
(Resent becasue the first one got lost) On 03/20/2012 05:39 PM, parav.pan...@emulex.com wrote: > + > +int ocrdma_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, > + struct ib_send_wr **bad_wr) > +{ > + int status = 0; > + struct ocrdma_qp *qp = get_ocrdma_qp(ibqp); >

Re: [PATCH 6/9] ocrdma: Driver for Emulex OneConnect RDMA adapter

2012-03-21 Thread Roland Dreier
On Wed, Mar 21, 2012 at 10:42 AM, frank zago wrote: > On 03/20/2012 05:39 PM, parav.pan...@emulex.com wrote: >> +struct ib_mr *ocrdma_get_dma_mr(struct ib_pd *ibpd, int acc) >> +{ >> +     struct ocrdma_mr *mr; >> + >> +     mr = ocrdma_alloc_lkey(ibpd, acc, 0, OCRDMA_ADDR_CHECK_DISABLE); >> +    

Re: [PATCH 6/9] ocrdma: Driver for Emulex OneConnect RDMA adapter

2012-03-21 Thread frank zago
On 03/20/2012 05:39 PM, parav.pan...@emulex.com wrote: > +struct ib_mr *ocrdma_get_dma_mr(struct ib_pd *ibpd, int acc) > +{ > + struct ocrdma_mr *mr; > + > + mr = ocrdma_alloc_lkey(ibpd, acc, 0, OCRDMA_ADDR_CHECK_DISABLE); > + if (!mr) > + return ERR_PTR(-ENOMEM); ocrdma_al

RE: [PATCH 2/9] ocrdma: Driver for Emulex OneConnect RDMA adapter

2012-03-21 Thread Hefty, Sean
> +struct ocrdma_alloc_ucontext_resp { > + u32 dev_id; > + u32 wqe_size; > + u32 max_inline_data; > + u32 dpp_wqe_size; > + u64 ah_tbl_page; > + u32 ah_tbl_len; > + u32 rsvd; > + u8 fw_ver[32]; > + u32 rqe_size; > + u64 rsvd1; > +} __packed; Is there some re

RE: [PATCH 1/9] ocrdma: Driver for Emulex OneConnect RDMA adapter

2012-03-21 Thread Hefty, Sean
> +struct ocrdma_cq { > + struct ib_cq ibcq; > + struct ocrdma_dev *dev; nit: There are several structures where you store ocrdma_dev *. You can remove these and use the struct ib_* to reach it as well. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body

Re: [PATCH 1/9] ocrdma: Driver for Emulex OneConnect RDMA adapter

2012-03-21 Thread Roland Dreier
On Tue, Mar 20, 2012 at 3:39 PM, wrote: > +struct ocrdma_queue_info { > +       void *va; > +       dma_addr_t dma; > +       u32 size; > +       u16 len; > +       u16 entry_size;         /* Size of an element in the queue */ > +       u16 id;                 /* qid, where to ring the doorbell.

Re: [PATCH 6/9] ocrdma: Driver for Emulex OneConnect RDMA adapter

2012-03-21 Thread Roland Dreier
> +struct ib_pd *ocrdma_alloc_pd(struct ib_device *ibdev, > +                             struct ib_ucontext *context, > +                             struct ib_udata *udata) > +{ > +       struct ocrdma_dev *dev = get_ocrdma_dev(ibdev); > +       struct ocrdma_pd *pd; > +       int status; > + > +

RE: [PATCH 3/9] ocrdma: Driver for Emulex OneConnect RDMA adapter

2012-03-21 Thread David Laight
> > +#define is_cqe_wr_imm(cqe) \ > > +       ((le32_to_cpu(cqe->flags_status_srcqpn) & OCRDMA_CQE_WRITE_IMM) ? 1 > > : 0) > > ...similar comment about using readable typesafe inline functions > instead of macros... and if you are using #defines, you need to enclose every reference to the para

Re: [PATCH 4/9] ocrdma: Driver for Emulex OneConnect RDMA adapter

2012-03-21 Thread Roland Dreier
> +int ocrdma_qp_state_machine(struct ocrdma_qp *qp, enum ib_qp_state > new_ib_state, > +                           enum ib_qp_state *old_ib_state) > +{ > +       unsigned long flags; > +       int status = 0; > +       enum ocrdma_qp_state new_state; > +       new_state = get_ocrdma_qp_state(new_

RE: [PATCH 2/9] ocrdma: Driver for Emulex OneConnect RDMA adapter

2012-03-21 Thread David Laight
> > - Header file for userspace library and kernel driver interface. > > > +struct ocrdma_alloc_ucontext_resp { > > +       u32 dev_id; > > +       u32 wqe_size; > > +       u32 max_inline_data; > > +       u32 dpp_wqe_size; > > +       u64 ah_tbl_page; > > +       u32 ah_tbl_len; > > +       u3

Re: [PATCH 3/9] ocrdma: Driver for Emulex OneConnect RDMA adapter

2012-03-21 Thread Roland Dreier
> +/* mailbox cmd response */ > +struct ocrdma_mbx_rsp { > +       u32 subsys_op; > +       u32 status; > +       u32 rsp_len; > +       u32 add_rsp_len; > +} __packed; ...similar comments about only using __packed where you really need it... > +#define is_cqe_valid(cq, cqe) \ > +       (((le32_t

Re: [PATCH 2/9] ocrdma: Driver for Emulex OneConnect RDMA adapter

2012-03-21 Thread Roland Dreier
On Tue, Mar 20, 2012 at 3:39 PM, wrote: > From: Parav Pandit > > - Header file for userspace library and kernel driver interface. > +struct ocrdma_alloc_ucontext_resp { > +       u32 dev_id; > +       u32 wqe_size; > +       u32 max_inline_data; > +       u32 dpp_wqe_size; > +       u64 ah_tbl_

Re: [PATCH 1/9] ocrdma: Driver for Emulex OneConnect RDMA adapter

2012-03-21 Thread Roland Dreier
> +#define ocrdma_err(format, arg...) printk(KERN_ERR format, ##arg) I think you'd be better off using pr_err() rather than defining your own macro. > +struct ocrdma_cq { > +       struct ib_cq ibcq; > +       struct ocrdma_dev *dev; > +       struct ocrdma_cqe *va; > +       u32 phase; > +    

Re: [PATCH 0/9] ocrdma: Driver for Emulex OneConnect RDMA

2012-03-21 Thread Roland Dreier
Overall looks pretty good... some comments on individual patches coming. - R. -- 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