From patchwork Thu Mar 29 21:07:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinicius Costa Gomes X-Patchwork-Id: 892984 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=osuosl.org (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=intel.com Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40By6P0PxFz9s19 for ; Fri, 30 Mar 2018 08:09:00 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id C00D33071C; Thu, 29 Mar 2018 21:08:57 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4e4fats5hWY1; Thu, 29 Mar 2018 21:08:55 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 0C44022767; Thu, 29 Mar 2018 21:08:55 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 247051C0BD3 for ; Thu, 29 Mar 2018 21:08:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 1FAA08868A for ; Thu, 29 Mar 2018 21:08:54 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wVP7UKXAR3E4 for ; Thu, 29 Mar 2018 21:08:53 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 586EB88AFD for ; Thu, 29 Mar 2018 21:08:53 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Mar 2018 14:08:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,378,1517904000"; d="scan'208";a="216093108" Received: from ellie.jf.intel.com (HELO localhost.localdomain) ([10.54.70.23]) by fmsmga005.fm.intel.com with ESMTP; 29 Mar 2018 14:08:52 -0700 From: Vinicius Costa Gomes To: intel-wired-lan@lists.osuosl.org Date: Thu, 29 Mar 2018 14:07:41 -0700 Message-Id: <20180329210751.11531-1-vinicius.gomes@intel.com> X-Mailer: git-send-email 2.16.3 Subject: [Intel-wired-lan] [next-queue PATCH v6 00/10] igb: offloading of receive filters X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org, jesus.sanchez-palencia@intel.com MIME-Version: 1.0 Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" Hi, Changes from v5: - Filters can now be added for local MAC addresses, when removed, they return to their initial configuration (thanks for the testing Aaron); Changes from v4: - Added a new bit to the MAC address filters internal representation to mean that some filters are steering filters (i.e. they direct traffic to queues); - And, this is only supported in i210; Changes from v3: - Addressed review comments from Aaron F. Brown and Jakub Kicinski; Changes from v2: - Addressed review comments from Jakub Kicinski, mostly about coding style adjustments and more consistent error reporting; Changes from v1: - Addressed review comments from Alexander Duyck and Florian Fainelli; - Adding and removing cls_flower filters are now proposed in the same patch; - cls_flower filters are kept in a separated list from "ethtool" filters (so that section of the original cover letter is no longer valid); - The patch adding support for ethtool filters is now independent from the rest of the series; Original cover letter: This series enables some ethtool and tc-flower filters to be offloaded to igb-based network controllers. This is useful when the system configurator want to steer kinds of traffic to a specific hardware queue. The first two commits are bug fixes. The basis of this series is to export the internal API used to configure address filters, so they can be used by ethtool, and extending the functionality so an source address can be handled. Then, we enable the tc-flower offloading implementation to re-use the same infrastructure as ethtool, and storing them in the per-adapter "nfc" (Network Filter Config?) list. But for consistency, for destructive access they are separated, i.e. an filter added by tc-flower can only be removed by tc-flower, but ethtool can read them all. Only support for VLAN Prio, Source and Destination MAC Address, and Ethertype is enabled for now. Open question: - igb is initialized with the number of traffic classes as 1, if we want to use multiple traffic classes we need to increase this value, the only way I could find is to use mqprio (for example). Should igb be initialized with, say, the number of queues as its "num_tc"? Vinicius Costa Gomes (10): igb: Fix not adding filter elements to the list igb: Fix queue selection on MAC filters on i210 igb: Enable the hardware traffic class feature bit for igb models igb: Add support for MAC address filters specifying source addresses igb: Add support for enabling queue steering in filters igb: Allow filters to be added for the local MAC address igb: Enable nfc filters to specify MAC addresses igb: Add MAC address support for ethtool nftuple filters igb: Add the skeletons for tc-flower offloading igb: Add support for adding offloaded clsflower filters drivers/net/ethernet/intel/igb/e1000_defines.h | 2 + drivers/net/ethernet/intel/igb/igb.h | 13 + drivers/net/ethernet/intel/igb/igb_ethtool.c | 65 ++++- drivers/net/ethernet/intel/igb/igb_main.c | 370 ++++++++++++++++++++++++- 4 files changed, 433 insertions(+), 17 deletions(-) --- 2.16.3