On 29/01/16 22:28, Bill Fischofer wrote:
You can always pretend the MTU is smaller than it actually is and do segmenting yourself, however this defeats the purpose of Large Segment Offload (LSO), which is a key HW offload capability of most modern I/O interfaces. With LSO the application can send arbitrary sized packets (up to at least 64KB) and the HW divides them into MTU-sized segments with appropriate headers for each segment (e.g., ensuring IPv4 ID uniqueness, proper TCP seq numbers, etc.) as part of TX processing. On the RX side, Large Receive Offload (LRO) does the inverse, taking an oversized arriving packet and chopping it up into MTU-sized packets, often doing other things like header splitting for better cache utilization (packet headers have their own separate receive buffers that are physically disjoint from packet payload) since the network stacks are often most concerned with headers rather than payload. Do we know what the DPDK use case is for introducing this API?
You mean rte_eth_dev_set_mtu()? Well, it needs it because there is no other way to set it, apart from KNI.
On Fri, Jan 29, 2016 at 10:28 AM, Zoltan Kiss <[email protected] <mailto:[email protected]>> wrote: On 29/01/16 08:26, Savolainen, Petri (Nokia - FI/Espoo) wrote: If two applications share a link (pktio), A diverging question, but: how does that work? Who calls odp_init_global()? Who calls pktio_open? And how do they share the same pktio? both can send up to MTU sized frames … and if one of them wants send less than MTU sized frames, it’s free to do that (without forcing the other app to the same limit). From ODP API point of view, MTU is the limit of the local transmit buffer. Whereas from IP stack point of view (to avoid fragmenting) it could be the minimum of: local tx buf (== ODP MTU), gateway rx/tx buf and destination rx buf sizes. The reason I asked because although OVS follows the idea Bill explained, and handles the MTU as a read-only information (with the kernel module datapath you can send it with ifconfig), but there is an upcoming patch to implement a dpdk-mtu parameter, because in case of DPDK you can only set that through the application (except I think if you use KNI) Regards, Zoli -Petri *From:*lng-odp [mailto:[email protected] <mailto:[email protected]>] *On Behalf Of *EXT Bill Fischofer *Sent:* Thursday, January 28, 2016 7:25 PM *To:* Mike Holmes *Cc:* lng-odp *Subject:* Re: [lng-odp] Setting MTU The short answer is that MTU is not an application parameter but a system configuration parameter. As such it is the domain of the control/management plane rather than the data plane. The data plane simply uses the MTU that has been configured elsewhere. Applications use higher-level segmenting like the TCP MSS that is negotiated for each connection. As a practical matter, at 10Gb and above link speeds (what ODP is designed for), all interfaces should be running with 9K jumbo frames anyway. MTU is something of a legacy from the early days of networking where primitive low-speed devices had extremely limited buffering capacities, necessitating these tiny MTU values. They are really not relevant to 21st-century data plane processing. On Thu, Jan 28, 2016 at 9:06 AM, Mike Holmes <[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>> wrote: commit 45598fea1a8a64ab49e191224784188382fbd466 Author: Petri Savolainen <[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>> Date: Thu Jan 21 11:39:29 2016 +0200 api: pktio: remove odp_pktio_set_mtu Not all hardware can change MTU size from ODP application. Reviewed-by: Petri Savolainen <[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>> Signed-off-by: Maxim Uvarov <[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>> On 28 January 2016 at 08:30, Zoltan Kiss <[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>> wrote: Hi, Is there a specific reason why we don't have an MTU setting API, but only one to query it? Zoli _______________________________________________ lng-odp mailing list [email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>> https://lists.linaro.org/mailman/listinfo/lng-odp -- Mike Holmes Technical Manager - Linaro Networking Group Linaro.org <http://www.linaro.org/>***│ *Open source software for ARM SoCs "Work should be fun and collborative, the rest follows" _______________________________________________ lng-odp mailing list [email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>> https://lists.linaro.org/mailman/listinfo/lng-odp _______________________________________________ lng-odp mailing list [email protected] <mailto:[email protected]> https://lists.linaro.org/mailman/listinfo/lng-odp
_______________________________________________ lng-odp mailing list [email protected] https://lists.linaro.org/mailman/listinfo/lng-odp
