Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1860cdf8 authored by Steve Wise's avatar Steve Wise Committed by Roland Dreier
Browse files

RDMA/cxgb3: Fail qp creation if the requested max_inline is too large

parent 4a97d47e
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -38,6 +38,7 @@
#include "firmware_exports.h"
#include "firmware_exports.h"


#define T3_MAX_SGE      4
#define T3_MAX_SGE      4
#define T3_MAX_INLINE	64


#define Q_EMPTY(rptr,wptr) ((rptr)==(wptr))
#define Q_EMPTY(rptr,wptr) ((rptr)==(wptr))
#define Q_FULL(rptr,wptr,size_log2)  ( (((wptr)-(rptr))>>(size_log2)) && \
#define Q_FULL(rptr,wptr,size_log2)  ( (((wptr)-(rptr))>>(size_log2)) && \
+3 −0
Original line number Original line Diff line number Diff line
@@ -780,6 +780,9 @@ static struct ib_qp *iwch_create_qp(struct ib_pd *pd,
	if (rqsize > T3_MAX_RQ_SIZE)
	if (rqsize > T3_MAX_RQ_SIZE)
		return ERR_PTR(-EINVAL);
		return ERR_PTR(-EINVAL);


	if (attrs->cap.max_inline_data > T3_MAX_INLINE)
		return ERR_PTR(-EINVAL);

	/*
	/*
	 * NOTE: The SQ and total WQ sizes don't need to be
	 * NOTE: The SQ and total WQ sizes don't need to be
	 * a power of two.  However, all the code assumes
	 * a power of two.  However, all the code assumes