From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pb0-f53.google.com (mail-pb0-f53.google.com [209.85.160.53]) by dpdk.org (Postfix) with ESMTP id 94B535922 for ; Fri, 4 Oct 2013 18:40:42 +0200 (CEST) Received: by mail-pb0-f53.google.com with SMTP id up15so4231081pbc.12 for ; Fri, 04 Oct 2013 09:41:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=VY+eVhJZfyiZGVqLf5GdLZcfTLaLvUCN9AIyZ0LbEW0=; b=GM1Apr7uoKY1BVRIz087HwMfDdvNgFO/8c6uRdbhwh6UUtvvawv8IxrUcWsS9tzgXz Poom62Oz2iKJNHI6qu10NDbTdgRFCp2ytpAxh294R4AHvxgqn/gqAK0dCKLuKiHyPVoP +mV8V9L6lgl05nUM2j9MuAnRNQhHWMOQf7OIN2camWs4NBSzsFpz/skhe+HHibx/se4Y qfD2RF54kpj7qbYl5TJvkm/g5uVuGX/3XDFegH5MqM8l5+282XUteUc07tGj3XfE86XO NIG7hX/uQymAD6VHTSyHKzxDnILI+8OFZ6Ds7vWKTNAuSWWXekE2BHB9uyQwM3anRtij 1SaA== X-Gm-Message-State: ALoCoQlZa8zCutOKj/KAYzm4CjyFxaVy4yjNtn3jTHWNzOArMUuSYS7RiM3Kr/OhKVZoZ34h69g3 X-Received: by 10.68.179.98 with SMTP id df2mr15452946pbc.38.1380904885684; Fri, 04 Oct 2013 09:41:25 -0700 (PDT) Received: from nehalam.linuxnetplumber.net (static-50-53-83-51.bvtn.or.frontiernet.net. [50.53.83.51]) by mx.google.com with ESMTPSA id gg10sm15735054pbc.46.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 04 Oct 2013 09:41:25 -0700 (PDT) Date: Fri, 4 Oct 2013 09:41:22 -0700 From: Stephen Hemminger To: jigsaw Message-ID: <20131004094122.0166e406@nehalam.linuxnetplumber.net> In-Reply-To: References: X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] Need comment on 82599 TSO X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Oct 2013 16:40:43 -0000 On Fri, 4 Oct 2013 15:44:19 +0300 jigsaw wrote: > Hi, > > I'm working on TSO for 82599, and encounter a problem: nowhere to store MSS. > > TSO must be aware of MSS, or gso in skb of kernel. > But MSS nees 16 bits per mbuf. And we have no spare 16 bits in > rte_mbuf or rte_pktmbuf. > If we add 16 bit field in rte_pktmbuf, the size of rte_mbuf will be > doubled, coz currently the size is at the edge of cacheline(32 byte). > > I have two solutions here: > > 1. Store MSS in struct rte_eth_conf. > This is actually a very bad idea, coz MSS is not bound to device. > > 2. Turn on and off TSO with rte_ctrlmbuf. > I found that rte_ctrlmbuf is not used at all. So it could be the first > use case of it. > With rte_ctrlmbuf we have enough space to store MSS. > > Looking forward to your comments. > > thx & > rgds, > -Qinglai The mbuf needs to grow to 2 cache lines. There are other things that need to be added to mbuf eventually as well. For example the QoS bitfield is too small when crammed into 32 bits. Ideally the normal small packet stuff would be in the first cacheline; and the other part of the struct would have things less likely to be used.