From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f53.google.com (mail-pg0-f53.google.com [74.125.83.53]) by dpdk.org (Postfix) with ESMTP id DDEA658EC for ; Thu, 29 Jun 2017 19:51:53 +0200 (CEST) Received: by mail-pg0-f53.google.com with SMTP id f127so51365724pgc.0 for ; Thu, 29 Jun 2017 10:51:53 -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=RFkUSjBRdulwSeoAH+vifjzUV6ImiV01bFbYleOIS+0=; b=dCyWHYu3io/wqk/UGlZG5ND11AIlAw84GJh176sI7gcBRYXYjyRojdHA1GY3jYHFz2 UoBpeWmuudRT2+PMsGuiAel4Iyh+8ZdtGAPmiBerq9tZxHt3ShiavjBMO1FrfbRoj0v2 gDIZyGHby+dzcA8wPa33oJ2WPNokc6Uk0GrPyJ4Ha9x3Sn6/ozK0DsAetVNAem5E2PSC JxUvcPAEaoZrHtUKqRnPH+Kh+fPdZlJvhAbgwIlOl9al8RDUAaeNgYyKWhB2vPsqj4/v 7WZSsrY3LhMlJX5kiX6JhZ4KrM1d6F63fQZuuVQtciAu34g/CrgtohwKMeLMbWRUimsE R82g== 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=RFkUSjBRdulwSeoAH+vifjzUV6ImiV01bFbYleOIS+0=; b=FdUQ36gqzCJpwLHxpbH1KH89H2Sv05Hnerhot+TqffMjR/t+M5y9XcZDLYIpsJg6/9 XJ16DZT1o/h9voYomZ8cYghhoxQwMQwHC4lkoerK66etVY1CeJyOf/hXdd+eMO6xGLDE O22og2ODGSJfOuZ+LePsS1VZGrUQdgrkigj6PWynrGbF49EQct8HqKoC/B3wMSN6KtPS rPH0f8K+Wv/3iW4SA1UD6MA+55cJnaDq1uwMlGqAx6adrc4AIKXAOv3aU9HIYgF5GsDR 4/DBaXKsIv4aJXHg/V7gIrY5ofHd744t9SAo/D9B0ctNjCM36SUBL2iJDjqjNmSx72X4 xSKw== X-Gm-Message-State: AKS2vOw/BeD0juPnjAE6wRLeuP2enI/Kjo6T5xF5SQ85JLh12kFtXh8K ArgcMWFUxp9VYskyF/7xIw== X-Received: by 10.98.209.76 with SMTP id t12mr9513953pfl.190.1498758712929; Thu, 29 Jun 2017 10:51:52 -0700 (PDT) Received: from xeon-e3 (76-14-207-240.or.wavecable.com. [76.14.207.240]) by smtp.gmail.com with ESMTPSA id r81sm13403181pfa.103.2017.06.29.10.51.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 29 Jun 2017 10:51:52 -0700 (PDT) Date: Thu, 29 Jun 2017 10:51:50 -0700 From: Stephen Hemminger To: Jiayu Hu Cc: dev@dpdk.org, konstantin.ananyev@intel.com, jianfeng.tan@intel.com, yliu@fridaylinux.org, jingjing.wu@intel.com, tiwei.bie@intel.com, lei.a.yao@intel.com Message-ID: <20170629105150.74b8bf88@xeon-e3> In-Reply-To: <1498733940-117800-3-git-send-email-jiayu.hu@intel.com> References: <1498459430-116048-1-git-send-email-jiayu.hu@intel.com> <1498733940-117800-1-git-send-email-jiayu.hu@intel.com> <1498733940-117800-3-git-send-email-jiayu.hu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v8 2/3] lib/gro: add TCP/IPv4 GRO 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: Thu, 29 Jun 2017 17:51:54 -0000 On Thu, 29 Jun 2017 18:58:59 +0800 Jiayu Hu wrote: > + /* allocate a reassembly table for TCP/IPv4 GRO */ > + uint32_t tcp_item_num = RTE_MIN(item_num, > + RTE_GRO_MAX_BURST_ITEM_NUM); > + struct gro_tcp_tbl tcp_tbl; > + struct gro_tcp_key tcp_keys[tcp_item_num]; > + struct gro_tcp_item tcp_items[tcp_item_num]; Variable size structures on stack were not supported by CLANG, last time I checked. Why not always max size? > + > + struct rte_mbuf *unprocess_pkts[nb_pkts]; > + uint16_t unprocess_num = 0; > + int32_t ret; > + uint64_t current_time; > + > + if ((param->desired_gro_types & RTE_GRO_TCP_IPV4) == 0) > + return nb_pkts; > + > + memset(tcp_keys, 0, sizeof(struct gro_tcp_key) * > + tcp_item_num); > + memset(tcp_items, 0, sizeof(struct gro_tcp_item) * > + tcp_item_num); Variable size memset's are slow. They generate 'rep; stoz' last I checked in GCC and because of rep instruction it kills multi-execution pipeline.