From patchwork Mon Jan 25 05:17:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Duyck X-Patchwork-Id: 572598 X-Patchwork-Delegate: jeffrey.t.kirsher@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id F394B1402DD for ; Mon, 25 Jan 2016 16:18:01 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=mirantis.com header.i=@mirantis.com header.b=XcWxeWps; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B47E18C45E; Mon, 25 Jan 2016 05:17:59 +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 cohrOJ5oS0sn; Mon, 25 Jan 2016 05:17:59 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 117338C430; Mon, 25 Jan 2016 05:17:59 +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 CB8431C107C for ; Mon, 25 Jan 2016 05:17:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id C6E3989E7A for ; Mon, 25 Jan 2016 05:17:59 +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 0uhiryUrBkOi for ; Mon, 25 Jan 2016 05:17:59 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pa0-f41.google.com (mail-pa0-f41.google.com [209.85.220.41]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 425EB89E59 for ; Mon, 25 Jan 2016 05:17:59 +0000 (UTC) Received: by mail-pa0-f41.google.com with SMTP id uo6so76357717pac.1 for ; Sun, 24 Jan 2016 21:17:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mirantis.com; s=google; h=subject:from:to:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; bh=UBdyzNLrPk8hb+s0S9xZnti891VOny8AtQZ9pIC/ajQ=; b=XcWxeWpsn1aHuqjHgrIBk2U2MvzNSIRK19fKXHh3IkNqnOW3G92sLhm0/9l+XMkpS5 P1QJLutMDW7GGnNFHjREpLn2V5s7sDJGqMbewTXh/kzjkkOpG86Qx2MA6CKrO9kYFZ6r dd5H0pcrZDPezvQjJDauPN9gZzXImvcHoWbAE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:from:to:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-type :content-transfer-encoding; bh=UBdyzNLrPk8hb+s0S9xZnti891VOny8AtQZ9pIC/ajQ=; b=WJJsa6fpEZwwWZgXj7Dp3vnN/AIx0rXDiXXgj7IgnRLKUjWa23TRONlqraemSeB+Y1 ECE16zieHyhQrKNb+uZHNOv7UzANzVI3EZV43aalejgqU7mwUw7UZf8J5VqTfkkTYbP5 4C2lFiFxeLmmnCW3hLYsix2ZgmH57tKhohrrtYYQVkERU0ijxhWR7VlIAakgRFApZbuH ywb3yOqR8vbTc4lY0NNBK7Le7gVDSg3lICi5j4uliIcCLGv3OvviQkZX1sNbuHz3Jige AI7PztYxlTqKJdAYMtyZG7+lwccHWn22CZTsHfB3k0vxP3sQx9SIXh4M+h0rKZmTlyFn eG7A== X-Gm-Message-State: AG10YOR1kPH9MaiEhrb9fiif5W5KgJs8Bi7kHmQzv8hV0RfdEfLpuD0Lm7a30AcveoAYC14x X-Received: by 10.66.250.165 with SMTP id zd5mr6214068pac.111.1453699078986; Sun, 24 Jan 2016 21:17:58 -0800 (PST) Received: from localhost.localdomain (static-50-53-29-36.bvtn.or.frontiernet.net. [50.53.29.36]) by smtp.gmail.com with ESMTPSA id yh5sm25042374pab.13.2016.01.24.21.17.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Jan 2016 21:17:58 -0800 (PST) From: Alexander Duyck To: intel-wired-lan@lists.osuosl.org, jeffrey.t.kirsher@intel.com Date: Sun, 24 Jan 2016 21:17:57 -0800 Message-ID: <20160125051757.12004.45770.stgit@localhost.localdomain> In-Reply-To: <20160125050602.12004.38884.stgit@localhost.localdomain> References: <20160125050602.12004.38884.stgit@localhost.localdomain> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Subject: [Intel-wired-lan] [next PATCH v3 15/15] i40evf: Update feature flags to reflect newly enabled features X-BeenThere: intel-wired-lan@lists.osuosl.org X-Mailman-Version: 2.1.18-1 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@lists.osuosl.org Sender: "Intel-wired-lan" Recent changes should have enabled support for IPv6 based tunnels and support for TSO with outer UDP checksums. As such we can update the feature flags to reflect that. In addition we can clean-up the flags that aren't needed such as SCTP and RXCSUM since having the bits there doesn't add any value. I also found one spot where we were setting the same flag twice. It looks like it was probably a git merge error that resulted in the line being duplicated. As such I have dropped it in this patch. Signed-off-by: Alexander Duyck Acked-by: Anjali Singhai Jain Tested-by: Andrew Bowers --- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c index 41369a30dfb8..3396fe32cc6d 100644 --- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c +++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c @@ -2337,9 +2337,24 @@ int i40evf_process_config(struct i40evf_adapter *adapter) NETIF_F_IPV6_CSUM | NETIF_F_TSO | NETIF_F_TSO6 | + NETIF_F_TSO_ECN | + NETIF_F_GSO_GRE | + NETIF_F_GSO_UDP_TUNNEL | NETIF_F_RXCSUM | NETIF_F_GRO; + netdev->hw_enc_features |= NETIF_F_IP_CSUM | + NETIF_F_IPV6_CSUM | + NETIF_F_TSO | + NETIF_F_TSO6 | + NETIF_F_TSO_ECN | + NETIF_F_GSO_GRE | + NETIF_F_GSO_UDP_TUNNEL | + NETIF_F_GSO_UDP_TUNNEL_CSUM; + + if (adapter->flags & I40EVF_FLAG_OUTER_UDP_CSUM_CAPABLE) + netdev->features |= NETIF_F_GSO_UDP_TUNNEL_CSUM; + /* copy netdev features into list of user selectable features */ netdev->hw_features |= netdev->features; netdev->hw_features &= ~NETIF_F_RXCSUM; @@ -2478,6 +2493,10 @@ static void i40evf_init_task(struct work_struct *work) default: goto err_alloc; } + + if (hw->mac.type == I40E_MAC_X722_VF) + adapter->flags |= I40EVF_FLAG_OUTER_UDP_CSUM_CAPABLE; + if (i40evf_process_config(adapter)) goto err_alloc; adapter->current_op = I40E_VIRTCHNL_OP_UNKNOWN; @@ -2519,10 +2538,6 @@ static void i40evf_init_task(struct work_struct *work) goto err_sw_init; i40evf_map_rings_to_vectors(adapter); if (adapter->vf_res->vf_offload_flags & - I40E_VIRTCHNL_VF_OFFLOAD_WB_ON_ITR) - adapter->flags |= I40EVF_FLAG_WB_ON_ITR_CAPABLE; - - if (adapter->vf_res->vf_offload_flags & I40E_VIRTCHNL_VF_OFFLOAD_WB_ON_ITR) adapter->flags |= I40EVF_FLAG_WB_ON_ITR_CAPABLE;