Re: [PATCH REPOST] svcrdma: Limit ORD based on client's advertised IRD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 03:17 PM 5/19/2008, Tom Tucker wrote:
>-static void handle_connect_req(struct rdma_cm_id *new_cma_id)
>+static void handle_connect_req(struct rdma_cm_id *new_cma_id, size_t client_ird)

Wow! That'll do it - 4 billion RDMA reads here we come!

Looks good to me with one tiny suggestion:

> 	newxprt->sc_ord =  min((size_t)devattr.max_qp_rd_atom,
>-			       (size_t)svcrdma_ord);
>+			       (size_t)newxprt->sc_ord);
>+	newxprt->sc_ord = min((size_t)svcrdma_ord,
>+			      (size_t)newxprt->sc_ord);
> 

You can code these a tiny bit more cleanly as min_t(size_t, foo, bar)
and thereby avoid all four casts.

Tom.

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux