Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp233187imm; Fri, 21 Sep 2018 13:22:39 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYIMOcYtoO+KXHeydlilDPqCYd/NQF03W/ftjHpgUeV8PGbO1Wb3wI72fXRgr5MjZ8esy18 X-Received: by 2002:a65:40cd:: with SMTP id u13-v6mr42425795pgp.334.1537561359603; Fri, 21 Sep 2018 13:22:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537561359; cv=none; d=google.com; s=arc-20160816; b=ZWHUdd6czrsd6V/q9Ue9oyypC8abZ5hQYP0HSfC0kq/wJ0iwrATOzDvgZpssvkHBVX 0pLe12ne872eSr/gJsrv4hktal+EHNyH4fFmOGJGAxnqz5T5Alyk2Q3J5rEkdLyOUfJs XBiZGb3foi+8JnpHDapy0CXNZ4UwPoegNIz25tAHd8hYF6e0TtOHh7KgORzwcVBvK6dW e/Q06JZ0M4I8QtybXUVysp4sxAaP/3B6yYfB0KQBwEiK9IscZMXXdwkoT5pW4SyUWQ7d iAi7GPeKARFouLviuZbTIU5cWiEzqbSRyWckFal7cJczRfy+D4mM2cJfMaKzHq0vrIa5 PzMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=r3uBCRo2p/xGTc+biix2QsYJ8JW1hlb72ebhgEmstuk=; b=t5Gw193ZU/qXR8vr8SdPcSdgjHjDrxHxTdhUfy92GWVmhG5Dw+LuFmxPfVf9L0inIp 8AJWu0hLEHFftyzpqxNpFBipDGdJgpPz9HA5c5lEH8+iF8WYkiUn+/JjRwqK+LkPF+9E pJX74w9RoMhwSpn991fw799UkB+UZ6KNCR6g4VCk2hjHchSoaxABug5G4PC1mIBItZ8F RJWxJYyPVkhDi6OIRtTcXlPBOE41Alq1ooFDm4RSG6QTCeWpcyc2fsaARznsto1jk6US dVJ8ctUFmChcBRKw8WyLdbz5pgY9dVgGaWzxit3bq06VbsAmWCSkZStfUOxmEOwFYtcA 778g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b=NYXxFalv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i128-v6si29174607pfg.93.2018.09.21.13.22.23; Fri, 21 Sep 2018 13:22:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b=NYXxFalv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391409AbeIVCMo (ORCPT + 99 others); Fri, 21 Sep 2018 22:12:44 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:33178 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390726AbeIVCMn (ORCPT ); Fri, 21 Sep 2018 22:12:43 -0400 Received: by mail-pf1-f193.google.com with SMTP id d4-v6so6463441pfn.0 for ; Fri, 21 Sep 2018 13:22:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=r3uBCRo2p/xGTc+biix2QsYJ8JW1hlb72ebhgEmstuk=; b=NYXxFalvFErlqRRUDKXQ1DnWgpsmk/R0pwDxG1Yusa59QCnW7A1+xu7AcQClEH9bPN NAoXRUBCbCfUbJiaHIn2xE7EmGmsK+f1LvjGgAXz7JwUjG9TKPnoQ2yjVJ17LSxKzeCT APRjEzS6tCOC0qnN8kMGQwrs3UXfoBKwkVLRK0S1zJ+15I/pd2yAxGcvGGp+/ni2AFSs Q6FU5cIuxjRVjCiIDxHwf6l6Ainz2t1tekP95mNvjEajlP1jD0mPpma5Z1+9PVPowLRJ JnDytAwBayZkVe2bORsJNxS5EvD/vZ6a2Wdd8Z/HxuZwgxM2vshSMGbkVpvaoF4lSAId 6AVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=r3uBCRo2p/xGTc+biix2QsYJ8JW1hlb72ebhgEmstuk=; b=ZKdvPonkh16vA2xZO2pQq3+8ZlNhYKtWp5l0onuxltaLZK6D3exliZKHX7Jc0s6IDB HOduvKny5eFw9a8TEXGfOvLlXCVyuBD+ggQ3xNYni1Q//kRRxqA/gP11oLefVtbNzeAP 467zFbfTmcFYKyprU5lt0rVemT47/tOhAQpfL13gmwEC6FB/QuaWlYMZ59xgohstSH9e xpgMVToW/XHhlX6/ZzfsNBSG3RxteyFhIyXNjPA/GCXuO6xfOcVZ8d9K5uhDWbeHZtUD 12ZXFSvzp/Hpsro0rHWOuxbnD938IjMIupHIS/yMieD/FQib6xbfH9XpLzCctsrxEj7Z tQZQ== X-Gm-Message-State: APzg51Ab5N6RYExspP+JBd2NmiGOjgX3GvLNy4uppIewNmueM8rdkfg3 O420VctgVOzMrSs5WPnTR1bQDw== X-Received: by 2002:a62:1c7:: with SMTP id 190-v6mr47960147pfb.1.1537561333959; Fri, 21 Sep 2018 13:22:13 -0700 (PDT) Received: from xeon-e3 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id i185-v6sm38778827pfg.89.2018.09.21.13.22.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 21 Sep 2018 13:22:13 -0700 (PDT) Date: Fri, 21 Sep 2018 13:22:06 -0700 From: Stephen Hemminger To: Haiyang Zhang Cc: "davem@davemloft.net" , "netdev@vger.kernel.org" , "olaf@aepfle.de" , "linux-kernel@vger.kernel.org" , "devel@linuxdriverproject.org" , vkuznets Subject: Re: [PATCH net-next, v2, 1/3] hv_netvsc: Add support for LRO/RSC in the vSwitch Message-ID: <20180921132206.417f3714@xeon-e3> In-Reply-To: References: <20180921182037.10077-1-haiyangz@linuxonhyperv.com> <20180921182037.10077-2-haiyangz@linuxonhyperv.com> <20180921113620.62a004cb@xeon-e3> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 21 Sep 2018 18:51:54 +0000 Haiyang Zhang wrote: > > -----Original Message----- > > From: Stephen Hemminger > > Sent: Friday, September 21, 2018 2:37 PM > > To: Haiyang Zhang > > Cc: Haiyang Zhang ; davem@davemloft.net; > > netdev@vger.kernel.org; olaf@aepfle.de; linux-kernel@vger.kernel.org; > > devel@linuxdriverproject.org; vkuznets > > Subject: Re: [PATCH net-next, v2, 1/3] hv_netvsc: Add support for LRO/RSC in > > the vSwitch > > > > On Fri, 21 Sep 2018 18:20:35 +0000 > > Haiyang Zhang wrote: > > > > Overall, this looks good. Some minor suggestions. > > > > > +struct nvsc_rsc { > > > + const struct ndis_pkt_8021q_info *vlan; > > > + const struct ndis_tcp_ip_checksum_info *csum_info; > > > + u8 is_last; /* last RNDIS msg in a vmtransfer_page */ > > > + u32 cnt; /* #fragments in an RSC packet */ > > > + u32 pktlen; /* Full packet length */ > > > + void *data[NVSP_RSC_MAX]; > > > + u32 len[NVSP_RSC_MAX]; > > > +}; > > > + > > > > This new state structure is state on a per-channel basis. > > Do you really need this to be persistent across packets? > > > > Could this be on stack or do you need it to handle split packets arriving in > > different polls? Or is the stack space a problem? > > > > Also, maybe data and length could be in one structure since they are related. > > The stack space is a problem. NVSP_RSC_MAX is 562, which is defined by host. > It will be too large for limited stack space. > > struct nvsc_rsc includes the data, len, cnt, chksum, vlan for one RSC packet. They > are all related to construction of one SKB and its meta data. So I put them in > one structure. > > Thanks, > - Haiyang > That makes sense. How big is sizeof(struct net_device) + netdev_priv now? Need to make sure it doesn't become an order 2 (ie keep it less than 4K).