Set default CQ moderation parameters
Set the default params to make sure they are applied. This params
give better performance.
Signed-off-by: Eli Cohen <[EMAIL PROTECTED]>
---
drivers/infiniband/ulp/ipoib/ipoib_verbs.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_verbs.c
b/drivers/infiniband/ulp/ipoib/ipoib_verbs.c
index f2289c6..f7defe9 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_verbs.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_verbs.c
@@ -34,6 +34,7 @@
*/
#include "ipoib.h"
+#include <linux/ethtool.h>
int ipoib_mcast_attach(struct net_device *dev, u16 mlid, union ib_gid *mgid)
{
@@ -158,6 +159,7 @@ int ipoib_transport_dev_init(struct net_device *dev, struct
ib_device *ca)
};
int i, ret, size;
+ struct ethtool_coalesce *coal;
priv->pd = ib_alloc_pd(priv->ca);
if (IS_ERR(priv->pd)) {
@@ -182,6 +184,16 @@ int ipoib_transport_dev_init(struct net_device *dev,
struct ib_device *ca)
goto out_free_mr;
}
+ coal = kzalloc(sizeof *coal, GFP_KERNEL);
+ if (coal) {
+ coal->rx_coalesce_usecs = 10;
+ coal->tx_coalesce_usecs = 10;
+ coal->rx_max_coalesced_frames = 16;
+ coal->tx_max_coalesced_frames = 16;
+ dev->ethtool_ops->set_coalesce(dev, coal);
+ kfree(coal);
+ }
+
if (ib_req_notify_cq(priv->cq, IB_CQ_NEXT_COMP))
goto out_free_cq;
--
1.5.3.8
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general