From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 4FFF75F29 for ; Mon, 14 May 2018 05:28:21 +0200 (CEST) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 May 2018 20:28:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,398,1520924400"; d="scan'208";a="39640583" Received: from dpdk15.sh.intel.com ([10.67.111.77]) by fmsmga008.fm.intel.com with ESMTP; 13 May 2018 20:28:20 -0700 Date: Mon, 14 May 2018 11:35:37 +0800 From: Jiayu Hu To: dev@dpdk.org Cc: konstantin.ananyev@intel.com, jiayu.hu@intel.com Message-ID: <20180514033537.GA64815@dpdk15.sh.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.7.1 (2016-10-04) Subject: [dpdk-dev] [RFC] Add UDP GSO Support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2018 03:28:22 -0000 With the support of UDP Fragmentation Offload (UFO) and TCP Segmentation Offload (TSO) in virtio, VMs can exchange large UDP and TCP packets exceeding MTU between each other, which can greatly reduce per-packet processing overheads. When the destination of the large TCP and UDP packets is crossing machines, the host application needs to call two different libraries, GSO and IP fragmentation, to split the large packets respectively. However,the GSO and IP fragmentation library have quite different APIs, which greatly complicates the host application implementation. To simplify application development, we propose to support UDP segmentation offload in the GSO library. With supporting UDP GSO, host applicationss can use the unified APIs to split large UDP and TCP packets. Since we already have the IP fragmentation library, we can implement UDP GSO in two ways: 1. Calling the IP fragmentation library inside the GSO library. This method can resue the existed code, but it also introduces some changes. Specifically, the GSO library ignores checksum, but the IP fragmentation library sets PKT_TX_IP_CKSUM for output packets by default. To avoid confusing applications, we need to change the GSO or IP fragmentation library design, but both of them would change the behaviors of the applications which already use the two libraries. 2. Implementing a new UDP fragmentation function in the GSO library. This method can keep current designs for the two libraries, but we cannot reuse the existed code. Look forward to your opinions about this proposal. Thanks, Jiayu