Date: Sun, 26 May 2013 11:43:29 +0000 From: Alex Liptsin <alexl@mellanox.com> To: "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>, "freebsd-net@freebsd.org" <freebsd-net@freebsd.org> Subject: How to switch Datgram/Connected mtu modes? Message-ID: <64DAB3164E410447932305F50F896D8D6AF651AD@MTLDAG01.mtl.com>
next in thread | raw e-mail | index | archive | help
Hello. I work with FreeBSD 9.1 and Mellanox devices. How can I configure MTU in connected mode on FreeBSD 9.1? In Linux to enable connected mode for interface ib0, I enter: echo connected > /sys/class/net/ib0/mode Switching between CM and UD mode can be done in run time: echo datagram > /sys/class/net/ib0/mode sets the mode of ib0 to UD echo connected > /sys/class/net/ib0/mode sets the mode ib0 to CM There is no such directories at FreeBSD. Wat shall I do? 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 =3D 2044 bytes. In connected mode, the IB RC (Reliable Connected) transport is used. Connected mode 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. Thanks a lot Regards, Alex Liptsin Office: +972 (74) 7236141 Mobile: +972(54) 7833986 Fax: +972(74) 7236161 Email: alexl@mellanox.com<mailto:alexl@mellanox.com>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?64DAB3164E410447932305F50F896D8D6AF651AD>