diff options
author | Eli Cohen <eli@dev.mellanox.co.il> | 2008-04-17 00:09:27 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-04-17 00:09:27 -0400 |
commit | 40ca1988e03c001747d0b4cc1b25cf38297c9f9e (patch) | |
tree | 5eb1d1e32b41409bd722df9c80deb326a227b09f /drivers/infiniband/ulp/ipoib/ipoib_cm.c | |
parent | c93570f23a98c633570397aedc6d1808f5d5846a (diff) |
IPoIB: Add LSO support
For HCAs that support TCP segmentation offload (IB_DEVICE_UD_TSO), set
NETIF_F_TSO and use HW LSO to offload TCP segmentation.
Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/ulp/ipoib/ipoib_cm.c')
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_cm.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c index edf63dc0afe0..9d411f21460e 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c | |||
@@ -1384,7 +1384,7 @@ static ssize_t set_mode(struct device *d, struct device_attribute *attr, | |||
1384 | ipoib_warn(priv, "enabling connected mode " | 1384 | ipoib_warn(priv, "enabling connected mode " |
1385 | "will cause multicast packet drops\n"); | 1385 | "will cause multicast packet drops\n"); |
1386 | 1386 | ||
1387 | dev->features &= ~(NETIF_F_IP_CSUM | NETIF_F_SG); | 1387 | dev->features &= ~(NETIF_F_IP_CSUM | NETIF_F_SG | NETIF_F_TSO); |
1388 | priv->tx_wr.send_flags &= ~IB_SEND_IP_CSUM; | 1388 | priv->tx_wr.send_flags &= ~IB_SEND_IP_CSUM; |
1389 | 1389 | ||
1390 | ipoib_flush_paths(dev); | 1390 | ipoib_flush_paths(dev); |
@@ -1396,8 +1396,11 @@ static ssize_t set_mode(struct device *d, struct device_attribute *attr, | |||
1396 | dev->mtu = min(priv->mcast_mtu, dev->mtu); | 1396 | dev->mtu = min(priv->mcast_mtu, dev->mtu); |
1397 | ipoib_flush_paths(dev); | 1397 | ipoib_flush_paths(dev); |
1398 | 1398 | ||
1399 | if (test_bit(IPOIB_FLAG_CSUM, &priv->flags)) | 1399 | if (test_bit(IPOIB_FLAG_CSUM, &priv->flags)) { |
1400 | dev->features |= NETIF_F_IP_CSUM | NETIF_F_SG; | 1400 | dev->features |= NETIF_F_IP_CSUM | NETIF_F_SG; |
1401 | if (priv->hca_caps & IB_DEVICE_UD_TSO) | ||
1402 | dev->features |= NETIF_F_TSO; | ||
1403 | } | ||
1401 | 1404 | ||
1402 | return count; | 1405 | return count; |
1403 | } | 1406 | } |