From patchwork Tue Jun 12 15:18:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Duyck, Alexander H" X-Patchwork-Id: 928364 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.137; helo=fraxinus.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=intel.com Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 414tyj4CBfz9s0w for ; Wed, 13 Jun 2018 01:26:37 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 2362A88FE5; Tue, 12 Jun 2018 15:26:35 +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 ZSb-rr_w6Kbs; Tue, 12 Jun 2018 15:26:33 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 3165888224; Tue, 12 Jun 2018 15:26:33 +0000 (UTC) X-Original-To: intel-wired-lan@osuosl.org Delivered-To: intel-wired-lan@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id A1EBB1C0D68 for ; Tue, 12 Jun 2018 15:26:32 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 9EA53306AD for ; Tue, 12 Jun 2018 15:26:32 +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 uzd2enXwhCNJ for ; Tue, 12 Jun 2018 15:26:31 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by silver.osuosl.org (Postfix) with ESMTPS id C592F2FCA6 for ; Tue, 12 Jun 2018 15:26:31 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Jun 2018 08:26:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,215,1526367600"; d="scan'208";a="48744362" Received: from ahduyck-green-test.jf.intel.com ([10.166.244.179]) by orsmga008.jf.intel.com with ESMTP; 12 Jun 2018 08:26:31 -0700 From: Alexander Duyck To: intel-wired-lan@osuosl.org, jeffrey.t.kirsher@intel.com, netdev@vger.kernel.org Date: Tue, 12 Jun 2018 11:18:25 -0400 Message-ID: <20180612151322.86792.97587.stgit@ahduyck-green-test.jf.intel.com> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Subject: [Intel-wired-lan] [jkirsher/next-queue PATCH v2 0/7] Add support for L2 Fwd Offload w/o ndo_select_queue 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: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" This patch series is meant to allow support for the L2 forward offload, aka MACVLAN offload without the need for using ndo_select_queue. The existing solution currently requires that we use ndo_select_queue in the transmit path if we want to associate specific Tx queues with a given MACVLAN interface. In order to get away from this we need to repurpose the tc_to_txq array and XPS pointer for the MACVLAN interface and use those as a means of accessing the queues on the lower device. As a result we cannot offload a device that is configured as multiqueue, however it doesn't really make sense to configure a macvlan interfaced as being multiqueue anyway since it doesn't really have a qdisc of its own in the first place. I am submitting this as an RFC for the netdev mailing list, and officially submitting it for testing to Jeff Kirsher's next-queue in order to validate the ixgbe specific bits. The big changes in this set are: Allow lower device to update tc_to_txq and XPS map of offloaded MACVLAN Disable XPS for single queue devices Replace accel_priv with sb_dev in ndo_select_queue Add sb_dev parameter to fallback function for ndo_select_queue Consolidated ndo_select_queue functions that appeared to be duplicates v2: Implement generic "select_queue" functions instead of "fallback" functions. Tweak last two patches to account for changes in dev_pick_tx_xxx functions. --- Alexander Duyck (7): net-sysfs: Drop support for XPS and traffic_class on single queue device net: Add support for subordinate device traffic classes ixgbe: Add code to populate and use macvlan tc to Tx queue map net: Add support for subordinate traffic classes to netdev_pick_tx net: Add generic ndo_select_queue functions net: allow ndo_select_queue to pass netdev net: allow fallback function to pass netdev drivers/infiniband/hw/hfi1/vnic_main.c | 2 drivers/infiniband/ulp/opa_vnic/opa_vnic_netdev.c | 4 - drivers/net/bonding/bond_main.c | 3 drivers/net/ethernet/amazon/ena/ena_netdev.c | 5 - drivers/net/ethernet/broadcom/bcmsysport.c | 6 - drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 6 + drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h | 3 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 5 - drivers/net/ethernet/hisilicon/hns/hns_enet.c | 5 - drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 62 ++++++-- drivers/net/ethernet/lantiq_etop.c | 10 - drivers/net/ethernet/mellanox/mlx4/en_tx.c | 7 + drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 3 drivers/net/ethernet/mellanox/mlx5/core/en.h | 3 drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 5 - drivers/net/ethernet/renesas/ravb_main.c | 3 drivers/net/ethernet/sun/ldmvsw.c | 3 drivers/net/ethernet/sun/sunvnet.c | 3 drivers/net/ethernet/ti/netcp_core.c | 9 - drivers/net/hyperv/netvsc_drv.c | 6 - drivers/net/macvlan.c | 10 - drivers/net/net_failover.c | 7 + drivers/net/team/team.c | 3 drivers/net/tun.c | 3 drivers/net/wireless/marvell/mwifiex/main.c | 3 drivers/net/xen-netback/interface.c | 4 - drivers/net/xen-netfront.c | 3 drivers/staging/netlogic/xlr_net.c | 9 - drivers/staging/rtl8188eu/os_dep/os_intfs.c | 3 drivers/staging/rtl8723bs/os_dep/os_intfs.c | 7 - include/linux/netdevice.h | 34 ++++- net/core/dev.c | 156 ++++++++++++++++++--- net/core/net-sysfs.c | 36 ++++- net/mac80211/iface.c | 4 - net/packet/af_packet.c | 7 + 35 files changed, 312 insertions(+), 130 deletions(-) --