From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f65.google.com (mail-pg0-f65.google.com [74.125.83.65]) by dpdk.org (Postfix) with ESMTP id 9CA291B00E for ; Thu, 14 Dec 2017 04:02:42 +0100 (CET) Received: by mail-pg0-f65.google.com with SMTP id g7so2523779pgs.0 for ; Wed, 13 Dec 2017 19:02:42 -0800 (PST) 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=dzVTGBdeOCpmISHNC5WAeO8wLRu5v5cuGdW5nzmtD6I=; b=XAqOw30kMbsh3tb7WYScsNHMz6ZVaOKrxML/dfchUT2tTgqpTh8kmUUi8r+mH2/yn6 gmX8yZ6AYzkt8PRNIaCHyqtW6e6QOt7UtkzNdpDCmvBrU+FFowU0+y4V/FZrwZ4mRIrr kbgLHEQRkcMuQSYGETCIDh6Bk6bAhLYf/2Jx5e9ctcPy9pKm9p3/ySKyVf9gLbxAfIPh tXvHWpu1Vf2okEY6GhGeGmeLbd9hO4R7Iacmscu50SALJK66ZmWfDEOuVlwrVkS0ljAX 4/KqDNtqtd11M1r1+d26Qx++I+IrwxRAGPJrh8ymtnaW+uMUwPjmx5fLgXq3CWVXJ1vE YU4Q== 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=dzVTGBdeOCpmISHNC5WAeO8wLRu5v5cuGdW5nzmtD6I=; b=jybgV3KMRTIllBq4A75C3WsY0QYFCLq2pzfAHzbOb8ZiJJ5hsoHz1p+lGS8MMOI+t8 i5/OdJ1vwqbFrQDdV1zKiCXtEibwDadJrgKu/6NOuYhjXOF+pp5iuAQ9fZxa5v55EsJK 3xwd4peihaEkXESkND7zHAzTwt49vzzt16aT+Os76Lh5ncjC9JMIOyPG71pTMhWhk7QI y1N5/iAm27sMolXqvQ+3S1AygrFE0/6fnLDHgfPQA/lXzGoWI22MWStMZRyKRZooFw3a 7v52Y65WrizbdZIRg+lHJHjOzEP2e5jVaPPrZWBY++XgNFRNLF9G6l73B2BwT2BLLt8j nMXg== X-Gm-Message-State: AKGB3mJrua8pNaUpQCQrCrBZ7gPAcZy7yEC/0wp4VQbKWxMfjTXqUnYS PuqKgk8tWeDfZf5c/j4OFPLuCQ== X-Google-Smtp-Source: ACJfBosDsME2w5Vp/quJgU7KvISaQ8sVWJNGnVu0vjH5fYObVlVT/pP61ScCMkQ9jymi8LacsvgIBA== X-Received: by 10.98.252.7 with SMTP id e7mr8106877pfh.12.1513220561804; Wed, 13 Dec 2017 19:02:41 -0800 (PST) Received: from xeon-e3 (76-14-207-240.or.wavecable.com. [76.14.207.240]) by smtp.gmail.com with ESMTPSA id y131sm5837139pfg.125.2017.12.13.19.02.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Dec 2017 19:02:41 -0800 (PST) Date: Wed, 13 Dec 2017 19:02:39 -0800 From: Stephen Hemminger To: Jiayu Hu Cc: dev@dpdk.org, konstantin.ananyev@intel.com, jianfeng.tan@intel.com, junjie.j.chen@intel.com, john.mcnamara@intel.com, matvejchikov@gmail.com Message-ID: <20171213190239.5154c571@xeon-e3> In-Reply-To: <1513219779-100115-3-git-send-email-jiayu.hu@intel.com> References: <1511579860-37020-1-git-send-email-jiayu.hu@intel.com> <1513219779-100115-1-git-send-email-jiayu.hu@intel.com> <1513219779-100115-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 v2 2/2] gro: support VxLAN GRO 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, 14 Dec 2017 03:02:43 -0000 On Thu, 14 Dec 2017 10:49:39 +0800 Jiayu Hu wrote: > + /* Don't merge packets whose outer DF bits are different. */ > + if (item->outer_is_atomic ^ outer_is_atomic) unlikely() here? > + return 0; > + > + l2_offset = pkt->outer_l2_len + pkt->outer_l3_len; > + cmp = check_seq_option(&item->inner_item, tcp_hdr, sent_seq, ip_id, > + tcp_hl, tcp_dl, l2_offset, is_atomic); > + if ((cmp == 1) && (outer_is_atomic || (outer_ip_id == > + item->outer_ip_id + > + item->inner_item.nb_merged))) More readable if you break the line at the || > + /* Append the packet. */ > + return 1; > + else if ((cmp == -1) && (outer_is_atomic || (outer_ip_id + 1 == > + item->outer_ip_id))) else unecessary after return. Similar line break for readabilty. > + /* Prepend the packet. */ > + return -1; > + else > + return 0; > +} > + maybe? if (cmp == 1) { if (outer_is_atomic || outer_ip_id == item->outer_ip_id + item->inner_item.nb_merged) return 1; } else if (cmp == -1) { if (uter_is_atomic || outer_ip_id + 1 == item->outer_ip_id) return -1; } return 0;