From patchwork Tue Oct 17 21:18:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Nelson X-Patchwork-Id: 827312 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@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=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3yGp635kcTz9t2m for ; Wed, 18 Oct 2017 08:21:31 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1764475AbdJQVV1 (ORCPT ); Tue, 17 Oct 2017 17:21:27 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:38756 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935043AbdJQVVW (ORCPT ); Tue, 17 Oct 2017 17:21:22 -0400 Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v9HLLKtv017684 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 17 Oct 2017 21:21:20 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v9HLLJDQ031154 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 17 Oct 2017 21:21:20 GMT Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v9HLLJjY007472; Tue, 17 Oct 2017 21:21:19 GMT Received: from sln75.us.oracle.com (/10.147.27.211) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 17 Oct 2017 14:21:19 -0700 From: Shannon Nelson To: intel-wired-lan@lists.osuosl.org, jeffrey.t.kirsher@intel.com Cc: netdev@vger.kernel.org Subject: [RFC PATCH next 0/2] Add support for macvlan offload Date: Tue, 17 Oct 2017 14:18:07 -0700 Message-Id: <1508275089-430113-1-git-send-email-shannon.nelson@oracle.com> X-Mailer: git-send-email 1.7.1 X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The XL710 and family was originally designed as a device to support the growing "cloud" networking needs. With its large number of queues, filters, VFs, and other features, it can be a very handy device for sorting traffic in a variety of ways. However, one early design point was to support macvlan offloads, and this was never really worked out; as the Intel group knows, this has bothered me for a rather long time. The original intent was to use a separate VSI for each macvlan offloaded. This would make multiple queues and various other features available for the new pseudo-device. Unfortunately, there are 2 problems with this approach: (1) the interraction between the stack and the driver makes it hard to figure out which VSI:queue pair to transmit through, and (2) there are a lot more queues available for offload duties than there are VSIs. Using a simpler design, we can partition off some of the queues in the PF's primary VSI and use the XL710's macaddr-to-queue filtering capability to make a large number of macvlan offload channels available. This RFC is with code that has been shown to get packets in and out of the right queues, but has gone through very little testing. In the spirit of fail fast, I wanted to get this out quickly for comments and get the rework cycle started. Shannon Nelson (2): i40e: add ToQueue specific handling for mac filters i40e: add support for macvlan hardware offload drivers/net/ethernet/intel/i40e/i40e.h | 27 ++- drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 4 +- drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 15 + drivers/net/ethernet/intel/i40e/i40e_main.c | 311 ++++++++++++++++++-- drivers/net/ethernet/intel/i40e/i40e_txrx.h | 1 + drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 10 +- 6 files changed, 327 insertions(+), 41 deletions(-)