Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 142945
b: refs/heads/master
c: e1d60ec
h: refs/heads/master
i:
  142943: bedf944
v: v3
  • Loading branch information
Roland Dreier authored and Roland Dreier committed Mar 30, 2009
1 parent eb7f093 commit b2ee355
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 63 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6a3335b43342b42dd6c69b4bbbde15d622cb49ca
refs/heads/master: e1d60ec6699f19b760df8261e922ae236ea7bb31
45 changes: 0 additions & 45 deletions trunk/Documentation/infiniband/ipoib.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,49 +24,6 @@ Partitions and P_Keys
The P_Key for any interface is given by the "pkey" file, and the
main interface for a subinterface is in "parent."

Datagram vs Connected modes

The IPoIB driver supports two modes of operation: datagram and
connected. The mode is set and read through an interface's
/sys/class/net/<intf name>/mode file.

In datagram mode, the IB UD (Unreliable Datagram) transport is used
and so the interface MTU has is equal to the IB L2 MTU minus the
IPoIB encapsulation header (4 bytes). For example, in a typical IB
fabric with a 2K MTU, the IPoIB MTU will be 2048 - 4 = 2044 bytes.

In connected mode, the IB RC (Reliable Connected) transport is used.
Connected mode is to takes advantage of the connected nature of the
IB transport and allows an MTU up to the maximal IP packet size of
64K, which reduces the number of IP packets needed for handling
large UDP datagrams, TCP segments, etc and increases the performance
for large messages.

In connected mode, the interface's UD QP is still used for multicast
and communication with peers that don't support connected mode. In
this case, RX emulation of ICMP PMTU packets is used to cause the
networking stack to use the smaller UD MTU for these neighbours.

Stateless offloads

If the IB HW supports IPoIB stateless offloads, IPoIB advertises
TCP/IP checksum and/or Large Send (LSO) offloading capability to the
network stack.

Large Receive (LRO) offloading is also implemented and may be turned
on/off using ethtool calls. Currently LRO is supported only for
checksum offload capable devices.

Stateless offloads are supported only in datagram mode.

Interrupt moderation

If the underlying IB device supports CQ event moderation, one can
use ethtool to set interrupt mitigation parameters and thus reduce
the overhead incurred by handling interrupts. The main code path of
IPoIB doesn't use events for TX completion signaling so only RX
moderation is supported.

Debugging Information

By compiling the IPoIB driver with CONFIG_INFINIBAND_IPOIB_DEBUG set
Expand Down Expand Up @@ -98,5 +55,3 @@ References
http://ietf.org/rfc/rfc4391.txt
IP over InfiniBand (IPoIB) Architecture (RFC 4392)
http://ietf.org/rfc/rfc4392.txt
IP over InfiniBand: Connected Mode (RFC 4755)
http://ietf.org/rfc/rfc4755.txt
3 changes: 1 addition & 2 deletions trunk/drivers/infiniband/hw/mlx4/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,7 @@ static int mlx4_ib_mmap(struct ib_ucontext *context, struct vm_area_struct *vma)
PAGE_SIZE, vma->vm_page_prot))
return -EAGAIN;
} else if (vma->vm_pgoff == 1 && dev->dev->caps.bf_reg_size != 0) {
/* FIXME want pgprot_writecombine() for BlueFlame pages */
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);

if (io_remap_pfn_range(vma, vma->vm_start,
to_mucontext(context)->uar.pfn +
Expand Down
25 changes: 10 additions & 15 deletions trunk/drivers/infiniband/ulp/ipoib/ipoib_vlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,12 @@ int ipoib_vlan_add(struct net_device *pdev, unsigned short pkey)
*/
if (ppriv->pkey == pkey) {
result = -ENOTUNIQ;
priv = NULL;
goto err;
}

list_for_each_entry(priv, &ppriv->child_intfs, list) {
if (priv->pkey == pkey) {
result = -ENOTUNIQ;
priv = NULL;
goto err;
}
}
Expand All @@ -98,7 +96,7 @@ int ipoib_vlan_add(struct net_device *pdev, unsigned short pkey)

result = ipoib_set_dev_features(priv, ppriv->ca);
if (result)
goto err;
goto device_init_failed;

priv->pkey = pkey;

Expand All @@ -111,7 +109,7 @@ int ipoib_vlan_add(struct net_device *pdev, unsigned short pkey)
ipoib_warn(ppriv, "failed to initialize subinterface: "
"device %s, port %d",
ppriv->ca->name, ppriv->port);
goto err;
goto device_init_failed;
}

result = register_netdevice(priv->dev);
Expand Down Expand Up @@ -148,19 +146,19 @@ int ipoib_vlan_add(struct net_device *pdev, unsigned short pkey)
register_failed:
ipoib_dev_cleanup(priv->dev);

device_init_failed:
free_netdev(priv->dev);

err:
mutex_unlock(&ppriv->vlan_mutex);
rtnl_unlock();
if (priv)
free_netdev(priv->dev);

return result;
}

int ipoib_vlan_delete(struct net_device *pdev, unsigned short pkey)
{
struct ipoib_dev_priv *ppriv, *priv, *tpriv;
struct net_device *dev = NULL;
int ret = -ENOENT;

if (!capable(CAP_NET_ADMIN))
return -EPERM;
Expand All @@ -174,17 +172,14 @@ int ipoib_vlan_delete(struct net_device *pdev, unsigned short pkey)
unregister_netdevice(priv->dev);
ipoib_dev_cleanup(priv->dev);
list_del(&priv->list);
dev = priv->dev;
free_netdev(priv->dev);

ret = 0;
break;
}
}
mutex_unlock(&ppriv->vlan_mutex);
rtnl_unlock();

if (dev) {
free_netdev(dev);
return 0;
}

return -ENODEV;
return ret;
}

0 comments on commit b2ee355

Please sign in to comment.