From patchwork Sun Jun 24 05:13:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Miller X-Patchwork-Id: 933848 Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=davemloft.net Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 41D0p83P1Fz9s01 for ; Sun, 24 Jun 2018 15:13:52 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750864AbeFXFNn (ORCPT ); Sun, 24 Jun 2018 01:13:43 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:57102 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750780AbeFXFNn (ORCPT ); Sun, 24 Jun 2018 01:13:43 -0400 Received: from localhost (unknown [211.196.191.92]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 873DE1094A60B; Sat, 23 Jun 2018 22:13:41 -0700 (PDT) Date: Sun, 24 Jun 2018 14:13:37 +0900 (KST) Message-Id: <20180624.141337.912478766766100321.davem@davemloft.net> To: netdev@vger.kernel.org CC: edumazet@google.com Subject: [PATCH RFC 0/2] Convert GRO receive over to hash table. From: David Miller X-Mailer: Mew version 6.7 on Emacs 26 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Sat, 23 Jun 2018 22:13:42 -0700 (PDT) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org When many parallel flows are present and being received on the same RX queue, GRO processing can become expensive because each incoming frame must traverse the per-NAPI GRO list at each protocol layer of GRO receive (eth --> ipv{4,6} --> tcp). Use the already computed hash to chain these SKBs in a hash table instead of a simple list. The first patch makes the GRO list a true list_head. The second patch implements the hash table. This series patches basic testing and I added some diagnostics to make sure we really were aggregating GRO frames :-) Signed-off-by: David S. Miller