From patchwork Thu Nov 2 23:33:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander H Duyck X-Patchwork-Id: 833578 X-Patchwork-Delegate: jeffrey.t.kirsher@intel.com 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; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="E1mDrgd6"; dkim-atps=neutral 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 3yShH62fFzz9sRn for ; Fri, 3 Nov 2017 10:33:38 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 4F26F87F02; Thu, 2 Nov 2017 23:33:36 +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 pPEdF_AQBqA7; Thu, 2 Nov 2017 23:33:34 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 1525B87A1F; Thu, 2 Nov 2017 23:33:34 +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 D685F1C2306 for ; Thu, 2 Nov 2017 23:33:32 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id CF00787A1F for ; Thu, 2 Nov 2017 23:33:32 +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 krj-VNMvoLSW for ; Thu, 2 Nov 2017 23:33:32 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pf0-f196.google.com (mail-pf0-f196.google.com [209.85.192.196]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 06B6487A04 for ; Thu, 2 Nov 2017 23:33:32 +0000 (UTC) Received: by mail-pf0-f196.google.com with SMTP id p87so853601pfj.3 for ; Thu, 02 Nov 2017 16:33:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:date:message-id:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=NQ4ImBZ7hpFkmoU/jpU5xNNp+sY2kCI6u/UUk+w8gr0=; b=E1mDrgd6IJXWxGmKQRnE4/J3tkH8YyS82QjqhW6lixkOoMcoCc1LJi16RftHgrYHRu HdpONN7itYIoyuboLkaVuzdYpF/HZ1eiepfjl2tRvzQ/MG1tWfv2ON2ZpWAazjmjN3ot amuRjZU2VoEATmQh8V/Nb3lojyWD+d0Q4Fi0AJdxwgQJupRXK3nm98asgPFSJkhjz0ev dbqTInmsEm4uYViohN4vrN9UMpvMsrAPO0TTeVOQnQTPFg5eyrogOgyyUb7LAA6Z3y3O HQSEt7m65xNxviojfzJJvVR/wRBeW/Hpuwul5hWTU7u5ynk9qglkEXFYZTWNwmf++eHh 6WYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:date:message-id:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=NQ4ImBZ7hpFkmoU/jpU5xNNp+sY2kCI6u/UUk+w8gr0=; b=ngjyx/CkaillvVdq2InZmH05qRpxmWHEkxqC2471vv0Adt4K9SjjbncS7CHlJ+WexW Lz38hnaGdyw2Kjn3H9rOUCobxEqS58CGBh+IjvQtu5zQyT7NWWZX/n+m+1gJMQhfbwpC 1KKVKdxqruLbqU6G0T9UhtdYRhR3n8pjHxnIMUfVFPI/5cTVouLEcBQ65pivi8E49jit 5daFcm9zV89vw2LOzGgysBMDKH72S3ekzyjNmWe02AWsoYTG18pcHBIggsB2tv4lCt/z 8cbg+ApRxv5td9LqGEnkZC6K79Q3PMwBcdBoSFJNjTXjlnIYK5MTA/+aHPDkQ1RKIkYU Nntg== X-Gm-Message-State: AMCzsaV47bcdL6jd1OPAB6ffD6nXWT3D+KwCJix6NvQ1LjGNn71KxuKq P+7wWk88zxsAJdywVlUmNUg= X-Google-Smtp-Source: ABhQp+SuABaxl/PTvKDD7JkyJQRd9E+NUWUwmLdz6S4Eikc2Od71MeFnrKcdxauBP3q0lj26hTkWHg== X-Received: by 10.98.60.211 with SMTP id b80mr5671020pfk.4.1509665611245; Thu, 02 Nov 2017 16:33:31 -0700 (PDT) Received: from localhost.localdomain ([2001:470:b:9c3:9e5c:8eff:fe4f:f2d0]) by smtp.gmail.com with ESMTPSA id c25sm6780750pgn.64.2017.11.02.16.33.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Nov 2017 16:33:30 -0700 (PDT) From: Alexander Duyck To: netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org Date: Thu, 02 Nov 2017 16:33:30 -0700 Message-ID: <20171102233315.15146.95215.stgit@localhost.localdomain> In-Reply-To: <20171102232857.15146.21583.stgit@localhost.localdomain> References: <20171102232857.15146.21583.stgit@localhost.localdomain> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Subject: [Intel-wired-lan] [jkirsher/next-queue PATCH 1/5] ixgbe: Fix interaction between SR-IOV and macvlan offload 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" From: Alexander Duyck When SR-IOV was enabled the macvlan offload was configuring several filters with the wrong pool value. This would result in the macvlan interfaces not being able to receive traffic that had to pass over the physical interface. To fix it wrap the pool argument in the VMDQ_P macro which will add the necessary offset to get to the actual VMDq pool Signed-off-by: Alexander Duyck Reviewed-by: Jesse Brandeburg Tested-by: Andrew Bowers --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 2d0232254a7a..69ef35d13c36 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -5426,10 +5426,11 @@ static int ixgbe_fwd_ring_up(struct net_device *vdev, goto fwd_queue_err; if (is_valid_ether_addr(vdev->dev_addr)) - ixgbe_add_mac_filter(adapter, vdev->dev_addr, accel->pool); + ixgbe_add_mac_filter(adapter, vdev->dev_addr, + VMDQ_P(accel->pool)); ixgbe_fwd_psrtype(accel); - ixgbe_macvlan_set_rx_mode(vdev, accel->pool, adapter); + ixgbe_macvlan_set_rx_mode(vdev, VMDQ_P(accel->pool), adapter); return err; fwd_queue_err: ixgbe_fwd_ring_down(vdev, accel); From patchwork Thu Nov 2 23:33:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander H Duyck X-Patchwork-Id: 833580 X-Patchwork-Delegate: jeffrey.t.kirsher@intel.com 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.133; helo=hemlock.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="FkV99kpY"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yShHP5bLjz9sRn for ; Fri, 3 Nov 2017 10:33:53 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id DB73B88ABC; Thu, 2 Nov 2017 23:33:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GCkWaQQIJ6Ta; Thu, 2 Nov 2017 23:33:50 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id F387588A58; Thu, 2 Nov 2017 23:33:49 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 6F8C51C2306 for ; Thu, 2 Nov 2017 23:33:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 66E03828F2 for ; Thu, 2 Nov 2017 23:33:48 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wT3s9C6HcFnA for ; Thu, 2 Nov 2017 23:33:47 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pg0-f65.google.com (mail-pg0-f65.google.com [74.125.83.65]) by whitealder.osuosl.org (Postfix) with ESMTPS id 6967282766 for ; Thu, 2 Nov 2017 23:33:47 +0000 (UTC) Received: by mail-pg0-f65.google.com with SMTP id l24so938895pgu.11 for ; Thu, 02 Nov 2017 16:33:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:date:message-id:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=O6djppOfLcf2mYR0qC4zIV32MkDJ6tpMULtX30dxdpM=; b=FkV99kpYYjey63KSo1fNexV7iwOVAu3rrJgOODZVXGyaWXcaE+17f+VvdYojh5f3ZV juvVIEno243YWc6yBnymBDXk+PaZoRXjUYZr7s9M7lzEz05pdH9fCcT95dd/wdxZwLqJ 6T472NeuqnH9RL9OwEemIVlAaf+v1hmOCmkSWFWA3BCHPkiJftIv7sBCWvUMjX2IF7Q3 eprRSQpAa05kTXZ06F5GEOMIU11VGIrs1o/ExE8yByiXjfHAAEI/0lKLedq+aQyeFotB MzI02us7yL9X0k3uDCLLBVkp6o9tSFjS9HE/6r4Lnc/8ug87wHOxs4JsMVQBY87/Sf+p 2DWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:date:message-id:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=O6djppOfLcf2mYR0qC4zIV32MkDJ6tpMULtX30dxdpM=; b=eghkvgKwMKxJJHCjTa+hkMSibuz9mLswXfX4ra0xQaHIyZeOrk4QdjgWHoRVWQLMz0 Hi1JxiIWWhzQD5L+JFDT1QeybNnXMoVJPr187fkWULtsnaZJm1OWLchEiN2dRQpPNye3 nbI/9maPC6+klgc0wcDrk5u1maXapxYkYKWQPZkAcxwSvWHL6wq1IWm1AhNC4OIdm1/G /AlBqT6/o8HcOSCbpioJDCbTydCru0LpSYApMGssm6zioEWDES+/4l0tu4GgTH4j2O86 cs/h/nI65J490104GAGXo1xyBjAyyc6twd2FWXD6Sxxn8ETCCB17IS8D6lnhOO6blff4 ASPA== X-Gm-Message-State: AMCzsaUPBf0o1yf3eU/3JFQQ4xlrLcRAy2OO+Y6ApgMX0jZrwzuR74VQ tjBw+UhaB7/MHzFEIW0zvkE84nTA X-Google-Smtp-Source: ABhQp+RmZroeO9DQFQbPvk+0of9/boOv4Yukw1SIWb+Zbo6MhFgUqEJgMH1qYADgG2BVv02wFt9FDA== X-Received: by 10.84.197.35 with SMTP id m32mr4964977pld.306.1509665626814; Thu, 02 Nov 2017 16:33:46 -0700 (PDT) Received: from localhost.localdomain ([2001:470:b:9c3:9e5c:8eff:fe4f:f2d0]) by smtp.gmail.com with ESMTPSA id y84sm7904388pff.158.2017.11.02.16.33.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Nov 2017 16:33:46 -0700 (PDT) From: Alexander Duyck To: netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org Date: Thu, 02 Nov 2017 16:33:45 -0700 Message-ID: <20171102233336.15146.31137.stgit@localhost.localdomain> In-Reply-To: <20171102232857.15146.21583.stgit@localhost.localdomain> References: <20171102232857.15146.21583.stgit@localhost.localdomain> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Subject: [Intel-wired-lan] [jkirsher/next-queue PATCH 2/5] fm10k: Fix VLAN configuration for macvlan offload 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" From: Alexander Duyck The fm10k driver didn't work correctly when macvlan offload was enabled. Specifically what would occur is that we would see no unicast packets being received. This was traced down to us not correctly configuring the default VLAN ID for the port and defaulting to 0. To correct this we either use the default ID provided by the switch or simply use 1. With that we are able to pass and receive traffic without any issues. Signed-off-by: Alexander Duyck Reviewed-by: Jesse Brandeburg --- drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c index 81e4425f0529..1280127077de 100644 --- a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c +++ b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c @@ -1490,7 +1490,7 @@ static void *fm10k_dfwd_add_station(struct net_device *dev, hw->mac.ops.update_xcast_mode(hw, glort, FM10K_XCAST_MODE_MULTI); fm10k_queue_mac_request(interface, glort, sdev->dev_addr, - 0, true); + hw->mac.default_vid ? : 1, true); } fm10k_mbx_unlock(interface); @@ -1530,7 +1530,7 @@ static void fm10k_dfwd_del_station(struct net_device *dev, void *priv) hw->mac.ops.update_xcast_mode(hw, glort, FM10K_XCAST_MODE_NONE); fm10k_queue_mac_request(interface, glort, sdev->dev_addr, - 0, false); + hw->mac.default_vid ? : 1, false); } fm10k_mbx_unlock(interface); From patchwork Thu Nov 2 23:34:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander H Duyck X-Patchwork-Id: 833582 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; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ueQ9pg9E"; dkim-atps=neutral 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 3yShHs4C9Kz9sPm for ; Fri, 3 Nov 2017 10:34:17 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id E980784E4A; Thu, 2 Nov 2017 23:34:15 +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 sAEIkIEpE8Gv; Thu, 2 Nov 2017 23:34:14 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 8CB5F84E63; Thu, 2 Nov 2017 23:34:14 +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 EE28E1C2306 for ; Thu, 2 Nov 2017 23:34:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id E6E7884E63 for ; Thu, 2 Nov 2017 23:34:12 +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 LalYuuIXwZxM for ; Thu, 2 Nov 2017 23:34:12 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pg0-f67.google.com (mail-pg0-f67.google.com [74.125.83.67]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 8109984E4A for ; Thu, 2 Nov 2017 23:34:12 +0000 (UTC) Received: by mail-pg0-f67.google.com with SMTP id r25so955332pgn.4 for ; Thu, 02 Nov 2017 16:34:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:date:message-id:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=R9K54CpAn8YtvMqkfDKdtYoAFzJoDB4/y2QCXWS9VVY=; b=ueQ9pg9EkD1SrvRyyMc1G+k0OzJhPLmc6vjJQA2JIbLr58MBiobATuj80tQiaWhMSa qPt4R4MlXhJSQI1QwLd6hTqCCuFSynngmORqGhOZcUZzq/SCu1cGXs0o64YmlDCZkB+L LBv0skMHzrSBOL8M1JxUG0lmVLFhemJgEf+RIxDup5OxDpkI+FrBLD9wh2LOzBJK61yx jlTKhe3iCLwbkrQWY686JZ7UUisjw79Ha97SpbWR2P+u9drANsFSh4ykfiOBRfEBErJC TcIIE9CH9bJRCMjvAHrc5GjEfb9Uq6REh7usryLw1em0OT5ZJ/G5xtMmPsohfjwEaD+i HVYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:date:message-id:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=R9K54CpAn8YtvMqkfDKdtYoAFzJoDB4/y2QCXWS9VVY=; b=fbMQZBZQ3UvivIXtZGHvatyTbsrzqI3ui/ZtBcwZjn1lED1doYTbjB5ES5W63Pag9c +o11rg2h5MwXgbAGfdL11DNhAP/9IDvVL+KFuia/leMpQoothnkgTSLSoV63ycnAknna KoCyDGmtSrpgfPrAB7WtE7plMuIKluk0+J/atyPr54C6oV6BNGA4tCNlCqwapi632t1F Ai2+68CQS/PlnoVNqzj8MP8pYSvR0oJ72CDmIvhCwSBAtlj+vghoBWz0mo6aBjKsUc7f VyidG/Xpl4yA8NBaiWMhF81Z87wSKPHH4XIXQA22pvmm4qowTXbQgV8EXIXilrQ6XVwk Z1sg== X-Gm-Message-State: AMCzsaVNwNWbKHDv6ZVrfRzfioNLBJmxL7NVxuVcSA1NxIwbAzBgm0Om 92KtuipGXNCNpi0kr9VXyPo+hf38 X-Google-Smtp-Source: ABhQp+QzcG1BeqITeeYAWNJImTOKtsv8FXmchOStKjzKOgwjVFLaxidr/rA8R1PicDdz9dNgIGEsdQ== X-Received: by 10.101.76.195 with SMTP id n3mr5467871pgt.120.1509665652039; Thu, 02 Nov 2017 16:34:12 -0700 (PDT) Received: from localhost.localdomain ([2001:470:b:9c3:9e5c:8eff:fe4f:f2d0]) by smtp.gmail.com with ESMTPSA id j6sm6948411pgn.68.2017.11.02.16.34.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Nov 2017 16:34:11 -0700 (PDT) From: Alexander Duyck To: netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org Date: Thu, 02 Nov 2017 16:34:11 -0700 Message-ID: <20171102233351.15146.16006.stgit@localhost.localdomain> In-Reply-To: <20171102232857.15146.21583.stgit@localhost.localdomain> References: <20171102232857.15146.21583.stgit@localhost.localdomain> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Subject: [Intel-wired-lan] [jkirsher/next-queue PATCH 3/5] ixgbe: Fix handling of macvlan Tx offload 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" From: Alexander Duyck This update makes it so that we report the actual number of Tx queues via real_num_tx_queues but are still restricted to RSS on only the first pool by setting num_tc equal to 1. Doing this locks us into only having the ability to setup XPS on the queues in that pool, and only those queues should be used for transmitting anything other than macvlan traffic. Signed-off-by: Alexander Duyck --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 69ef35d13c36..b22ec4b9d02c 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -6638,8 +6638,9 @@ int ixgbe_open(struct net_device *netdev) goto err_req_irq; /* Notify the stack of the actual queue counts. */ - if (adapter->num_rx_pools > 1) - queues = adapter->num_rx_queues_per_pool; + if (adapter->num_rx_pools > 1 && + adapter->num_tx_queues > IXGBE_MAX_L2A_QUEUES) + queues = IXGBE_MAX_L2A_QUEUES; else queues = adapter->num_tx_queues; @@ -8901,6 +8902,18 @@ int ixgbe_setup_tc(struct net_device *dev, u8 tc) if (adapter->hw.mac.type == ixgbe_mac_82598EB) adapter->hw.fc.requested_mode = adapter->last_lfc_mode; + /* To support macvlan offload we have to use num_tc to + * restrict the queues that can be used by the device. + * By doing this we can avoid reporing a false number of + * queues. + */ + if (adapter->num_rx_pools > 1) { + u16 qpp = adapter->num_rx_queues_per_pool; + + netdev_set_num_tc(dev, 1); + netdev_set_tc_queue(dev, 0, qpp, 0); + } + adapter->flags &= ~IXGBE_FLAG_DCB_ENABLED; adapter->temp_dcb_cfg.pfc_mode_enable = false; From patchwork Thu Nov 2 23:34:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander H Duyck X-Patchwork-Id: 833584 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.133; helo=hemlock.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="RjEdySKk"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yShJS6zL2z9sPm for ; Fri, 3 Nov 2017 10:34:48 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 5236C8940F; Thu, 2 Nov 2017 23:34:47 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zA9HZrjfhkzQ; Thu, 2 Nov 2017 23:34:44 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 3041F890DC; Thu, 2 Nov 2017 23:34:44 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 264F41C2306 for ; Thu, 2 Nov 2017 23:34:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 1D4E888139 for ; Thu, 2 Nov 2017 23:34:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aUpxtIkVRvSP for ; Thu, 2 Nov 2017 23:34:42 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pf0-f194.google.com (mail-pf0-f194.google.com [209.85.192.194]) by whitealder.osuosl.org (Postfix) with ESMTPS id 8E4B082BEA for ; Thu, 2 Nov 2017 23:34:42 +0000 (UTC) Received: by mail-pf0-f194.google.com with SMTP id p87so855423pfj.3 for ; Thu, 02 Nov 2017 16:34:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:date:message-id:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=ejmPs4d6WGksKqGaSvVZvzQ4R2XgnE32rVqWT/NiCTA=; b=RjEdySKk9u2SrTdOBE4hweiNT5LTvf/dbv6PMVXzZZXG1gXJLz0V0hWG59jtZh/EFs mW6GkOFBd3qWG6n73ul0m1qvz4fhGffshAl3b9hn1R+BQEy3fg1O3z2Aufl6kEpDNlSh oo1nipCDqB9HsHRNmMwig1xeS+obB4KkX2jPiPqQg9/Dbvw1ozmEoPEBX1NIbcK1eGcD wfqISVnsNc5X7a1ZRaj4J3NzoIhfruyNcFwysbgZxnW0bbxw9uyobPOQi3tZJ2Shdb1E fdk6HIjPZX/oUg/L59yOrzZWcpPFTQ9jEMuC+WaG0HAtFdolbenc2iEH07zbfnwwsNsJ fYWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:date:message-id:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=ejmPs4d6WGksKqGaSvVZvzQ4R2XgnE32rVqWT/NiCTA=; b=IZLW8RuGFxDtnA8OAXaovDb0R+rOUMfw97/x+DWRVFSZjbrFoNGxxPXsjemqJlg6D3 BNepztmjjWoiAgBebw0S8Npo8nEOmFBy0MDUfoaphPrmAxcwop5UQ9nChJ73S6YOqzOA oTqgZKFlC0fVCiFdSqZ1ylULXPSFk5juEmHiqY+5RRFFDhoBzgjS0e4+Kup1jGkmK4r6 Om6S+oh37WViIKOQGgUeTGL2vWb0jrSS0/fej+NPw2KIZde0FSyVtOTqlyH+m/dOFn5l IlbmaEwy53SamiJyIHu1SEZ0rO0YjLQQ9HrA12YN3Yv2zi2Q1n7xJ4zsoIiw5V+2Cf1Q en+A== X-Gm-Message-State: AMCzsaUqJxWu75hxmMo0ADeqy8ahCCVUxz/K1aUPd7qO1hrHFOPusWtg NdQwp2Xzm2B39BWCOjqNCx9XY2O4 X-Google-Smtp-Source: ABhQp+QQ01eccjlFow0I0mLeKGS+UkmzkE9PbIRGcH52BsXpVql+zOBLGxFlOX6zrdYe7+fHGPN3yg== X-Received: by 10.84.215.207 with SMTP id g15mr4941034plj.11.1509665681979; Thu, 02 Nov 2017 16:34:41 -0700 (PDT) Received: from localhost.localdomain ([2001:470:b:9c3:9e5c:8eff:fe4f:f2d0]) by smtp.gmail.com with ESMTPSA id m1sm7667336pfk.54.2017.11.02.16.34.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Nov 2017 16:34:41 -0700 (PDT) From: Alexander Duyck To: netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org Date: Thu, 02 Nov 2017 16:34:41 -0700 Message-ID: <20171102233417.15146.6991.stgit@localhost.localdomain> In-Reply-To: <20171102232857.15146.21583.stgit@localhost.localdomain> References: <20171102232857.15146.21583.stgit@localhost.localdomain> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Subject: [Intel-wired-lan] [jkirsher/next-queue PATCH 4/5] dev: Clean-up __skb_tx_hash to match up with traffic class based configs 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" From: Alexander Duyck This patch is mostly just a minor clean-up so that we avoid letting a packet jump from one traffic class to another just based on the Rx queue. Instead we now use that queue number as an offset within the traffic class. Handling it this way allows us to operate more cleanly in a mixed environment that is doing routing over multiple interfaces that may not have the same queue configuration. This patch includes a minor clean-up of variable declaration as well to get things into the reverse xmas tree format. Signed-off-by: Alexander Duyck --- net/core/dev.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/net/core/dev.c b/net/core/dev.c index 24ac9083bc13..fd51b8703277 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -2573,16 +2573,9 @@ void netif_device_attach(struct net_device *dev) u16 __skb_tx_hash(const struct net_device *dev, struct sk_buff *skb, unsigned int num_tx_queues) { - u32 hash; - u16 qoffset = 0; u16 qcount = num_tx_queues; - - if (skb_rx_queue_recorded(skb)) { - hash = skb_get_rx_queue(skb); - while (unlikely(hash >= num_tx_queues)) - hash -= num_tx_queues; - return hash; - } + u16 qoffset = 0; + u32 hash; if (dev->num_tc) { u8 tc = netdev_get_prio_tc_map(dev, skb->priority); @@ -2591,6 +2584,13 @@ u16 __skb_tx_hash(const struct net_device *dev, struct sk_buff *skb, qcount = dev->tc_to_txq[tc].count; } + if (skb_rx_queue_recorded(skb)) { + hash = skb_get_rx_queue(skb); + while (unlikely(hash >= qcount)) + hash -= qcount; + return hash + qoffset; + } + return (u16) reciprocal_scale(skb_get_hash(skb), qcount) + qoffset; } EXPORT_SYMBOL(__skb_tx_hash); From patchwork Thu Nov 2 23:34:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander H Duyck X-Patchwork-Id: 833586 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; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="eg2Rd4+x"; dkim-atps=neutral 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 3yShJn3WD4z9sPm for ; Fri, 3 Nov 2017 10:35:05 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 12E8687FD4; Thu, 2 Nov 2017 23:35:04 +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 Yu3BmNbreuCQ; Thu, 2 Nov 2017 23:35:02 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id A36CF87F02; Thu, 2 Nov 2017 23:35:02 +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 15AF51C2306 for ; Thu, 2 Nov 2017 23:35:01 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 0EE3787F02 for ; Thu, 2 Nov 2017 23:35:01 +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 lOtmTayVcmQB for ; Thu, 2 Nov 2017 23:35:00 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pf0-f193.google.com (mail-pf0-f193.google.com [209.85.192.193]) by fraxinus.osuosl.org (Postfix) with ESMTPS id F349587EEB for ; Thu, 2 Nov 2017 23:34:59 +0000 (UTC) Received: by mail-pf0-f193.google.com with SMTP id 17so835262pfn.12 for ; Thu, 02 Nov 2017 16:34:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:date:message-id:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=iLjHRixSDCRTQfcLDjM+FpUO1hYT+7rfHsXO46gnGlw=; b=eg2Rd4+x3go7GOjRASi4KRt4RrcMGr8ujbqfRvKWGQFWvphooXsrUyip0j9GhJeS9z YTmIofzdboA2wz5VsXi2VGlupAKIyeS2leWyofDw5rS8wB0HY2v2ud1ZyDl1PsJMeeFQ zy/hz8zjPC9uZThu7qXag9kXqVy1vyC1PyCdU5YHndO91OROyInrB7WMl3FjvhFrvY0c GuU+QuLFAhMhHEkvK/6y1DmOGTg0DWRBEFCwO5pqyc7dhh+3R6UhBIMOvETrp9HclASq 1DmuN0kHz8yxit4jrBFqIAtn3gY2dzlZkQqEn/eVUXCpKCRD1DuPxupLQI9jpHxNqa4I gIfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:date:message-id:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=iLjHRixSDCRTQfcLDjM+FpUO1hYT+7rfHsXO46gnGlw=; b=ULdoreLLv5IuEhJ8jLXurLKNPAbsKcngET7AseH4XvX4+kUIQKDUsVanuwL5gGrN1r mdtZJWpO2F+LcUPhbx4XXWhJPbq5gqNB3Xm9lDGyJ83FkNnvzQUL+evyWwveqF8uldYn YOZi3mcmZ1uqbkev2QM05idSl4Ck+i3E8L4L4ONZfNuk6isL5TrkNV7P+Trci4xKsvHF gePYehZ1AkuOzx3gGoLj7ulufED17fOB8iveOPO1HjvRmcYCXz7172fzgXednB8Bjz5c JGkGqtcbwQbp6fs/Q4vrXGqkCHdAPkwRh9dx92aVviMMvTHoUsrONO409rlcfIPhBTKg mVAg== X-Gm-Message-State: AMCzsaXCWSHt5d7MTMhCfCePUvXLAAdHUNsQmMOoxSlezSbM+Rl7UgTT /wLwWCJ5JCkQq7aLtsk8DJI= X-Google-Smtp-Source: ABhQp+S/XlxoUQabx7R8XrWnOP1P/1yyMr6qLWCr+onUpuWHGCdEeT//d8k+I/bYbIxUpvOcDxQ3zw== X-Received: by 10.84.168.69 with SMTP id e63mr4947657plb.340.1509665699428; Thu, 02 Nov 2017 16:34:59 -0700 (PDT) Received: from localhost.localdomain ([2001:470:b:9c3:9e5c:8eff:fe4f:f2d0]) by smtp.gmail.com with ESMTPSA id g24sm8847276pfk.0.2017.11.02.16.34.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Nov 2017 16:34:58 -0700 (PDT) From: Alexander Duyck To: netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org Date: Thu, 02 Nov 2017 16:34:58 -0700 Message-ID: <20171102233447.15146.63844.stgit@localhost.localdomain> In-Reply-To: <20171102232857.15146.21583.stgit@localhost.localdomain> References: <20171102232857.15146.21583.stgit@localhost.localdomain> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Subject: [Intel-wired-lan] [jkirsher/next-queue PATCH 5/5] dev: Cap number of queues even with accel_priv 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" From: Alexander Duyck With the recent fix to ixgbe we can cap the number of queues always regardless of if accel_priv is being used or not since the actual number of queues are being reported via real_num_tx_queues. Signed-off-by: Alexander Duyck Reviewed-by: Jesse Brandeburg --- net/core/dev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/core/dev.c b/net/core/dev.c index fd51b8703277..59dcc1b26ae2 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -3393,8 +3393,7 @@ struct netdev_queue *netdev_pick_tx(struct net_device *dev, else queue_index = __netdev_pick_tx(dev, skb); - if (!accel_priv) - queue_index = netdev_cap_txqueue(dev, queue_index); + queue_index = netdev_cap_txqueue(dev, queue_index); } skb_set_queue_mapping(skb, queue_index);