diff options
author | Pradeep Satyanarayana <pradeeps@linux.vnet.ibm.com> | 2007-12-21 16:08:23 -0500 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-01-25 17:15:37 -0500 |
commit | 586a693448676de5174e752426ced69ec79ab174 (patch) | |
tree | a42a760115ccdde07853428c485296ce364a9b7d /drivers/infiniband/ulp/ipoib/ipoib.h | |
parent | fff09a8e6e726f0752254e1f46f7224e3bebb302 (diff) |
IPoIB/CM: Enable SRQ support on HCAs that support fewer than 16 SG entries
Some HCAs (such as ehca2) support SRQ, but only support fewer than 16 SG
entries for SRQs. Currently IPoIB/CM implicitly assumes all HCAs will
support 16 SG entries for SRQs (to handle a 64K MTU with 4K pages). This
patch removes that restriction by limiting the maximum MTU in connected
mode to what the maximum number of SRQ SG entries allows.
This patch addresses <https://bugs.openfabrics.org/show_bug.cgi?id=728>
Signed-off-by: Pradeep Satyanarayana <pradeeps@linux.vnet.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/ulp/ipoib/ipoib.h')
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib.h b/drivers/infiniband/ulp/ipoib/ipoib.h index d35025f0652b..fe250c60607d 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib.h +++ b/drivers/infiniband/ulp/ipoib/ipoib.h | |||
@@ -238,6 +238,8 @@ struct ipoib_cm_dev_priv { | |||
238 | struct ib_sge rx_sge[IPOIB_CM_RX_SG]; | 238 | struct ib_sge rx_sge[IPOIB_CM_RX_SG]; |
239 | struct ib_recv_wr rx_wr; | 239 | struct ib_recv_wr rx_wr; |
240 | int nonsrq_conn_qp; | 240 | int nonsrq_conn_qp; |
241 | int max_cm_mtu; | ||
242 | int num_frags; | ||
241 | }; | 243 | }; |
242 | 244 | ||
243 | /* | 245 | /* |
@@ -503,6 +505,12 @@ static inline int ipoib_cm_has_srq(struct net_device *dev) | |||
503 | return !!priv->cm.srq; | 505 | return !!priv->cm.srq; |
504 | } | 506 | } |
505 | 507 | ||
508 | static inline unsigned int ipoib_cm_max_mtu(struct net_device *dev) | ||
509 | { | ||
510 | struct ipoib_dev_priv *priv = netdev_priv(dev); | ||
511 | return priv->cm.max_cm_mtu; | ||
512 | } | ||
513 | |||
506 | void ipoib_cm_send(struct net_device *dev, struct sk_buff *skb, struct ipoib_cm_tx *tx); | 514 | void ipoib_cm_send(struct net_device *dev, struct sk_buff *skb, struct ipoib_cm_tx *tx); |
507 | int ipoib_cm_dev_open(struct net_device *dev); | 515 | int ipoib_cm_dev_open(struct net_device *dev); |
508 | void ipoib_cm_dev_stop(struct net_device *dev); | 516 | void ipoib_cm_dev_stop(struct net_device *dev); |
@@ -552,6 +560,11 @@ static inline int ipoib_cm_has_srq(struct net_device *dev) | |||
552 | return 0; | 560 | return 0; |
553 | } | 561 | } |
554 | 562 | ||
563 | static inline unsigned int ipoib_cm_max_mtu(struct net_device *dev) | ||
564 | { | ||
565 | return 0; | ||
566 | } | ||
567 | |||
555 | static inline | 568 | static inline |
556 | void ipoib_cm_send(struct net_device *dev, struct sk_buff *skb, struct ipoib_cm_tx *tx) | 569 | void ipoib_cm_send(struct net_device *dev, struct sk_buff *skb, struct ipoib_cm_tx *tx) |
557 | { | 570 | { |