Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/782236/?format=api
{ "id": 782236, "url": "http://patchwork.ozlabs.org/api/patches/782236/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20170629131225.9251-2-sassmann@kpanic.de/", "project": { "id": 46, "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api", "name": "Intel Wired Ethernet development", "link_name": "intel-wired-lan", "list_id": "intel-wired-lan.osuosl.org", "list_email": "intel-wired-lan@osuosl.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20170629131225.9251-2-sassmann@kpanic.de>", "list_archive_url": null, "date": "2017-06-29T13:12:24", "name": "[1/2] i40e/i40evf: rename vf_offload_flags to vf_cap_flags in struct virtchnl_vf_resource", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "b347113fc135299d3eaa8bc2cdc93b97fb99fdfb", "submitter": { "id": 7508, "url": "http://patchwork.ozlabs.org/api/people/7508/?format=api", "name": "Stefan Assmann", "email": "sassmann@kpanic.de" }, "delegate": { "id": 68, "url": "http://patchwork.ozlabs.org/api/users/68/?format=api", "username": "jtkirshe", "first_name": "Jeff", "last_name": "Kirsher", "email": "jeffrey.t.kirsher@intel.com" }, "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20170629131225.9251-2-sassmann@kpanic.de/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/782236/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/782236/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@osuosl.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Received": [ "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3wz0Td6jgMz9s65\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 29 Jun 2017 23:13:25 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 07A4E87A9A;\n\tThu, 29 Jun 2017 13:13:24 +0000 (UTC)", "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id XWzE6Ns6ktKr; Thu, 29 Jun 2017 13:13:22 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id B352687A58;\n\tThu, 29 Jun 2017 13:13:22 +0000 (UTC)", "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 8E0A01C3EBA\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 29 Jun 2017 13:13:19 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 8863E87A4C\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 29 Jun 2017 13:13:19 +0000 (UTC)", "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id qzQvcZHLvqLv for <intel-wired-lan@lists.osuosl.org>;\n\tThu, 29 Jun 2017 13:13:18 +0000 (UTC)", "from mx1.redhat.com (mx1.redhat.com [209.132.183.28])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id 5CDA087A4B\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 29 Jun 2017 13:13:18 +0000 (UTC)", "from smtp.corp.redhat.com\n\t(int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 227E270D90;\n\tThu, 29 Jun 2017 13:13:17 +0000 (UTC)", "from w541.redhat.com (ovpn-117-74.ams2.redhat.com [10.36.117.74])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id D9CC187E3D;\n\tThu, 29 Jun 2017 13:13:15 +0000 (UTC)" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": [ "from auto-whitelisted by SQLgrey-1.7.6", "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.28]); Thu, 29 Jun 2017 13:13:17 +0000 (UTC)" ], "DMARC-Filter": "OpenDMARC Filter v1.3.2 mx1.redhat.com 227E270D90", "Authentication-Results": [ "ext-mx04.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=kpanic.de", "ext-mx04.extmail.prod.ext.phx2.redhat.com;\n\tspf=none smtp.mailfrom=sassmann@kpanic.de" ], "DKIM-Filter": "OpenDKIM Filter v2.11.0 mx1.redhat.com 227E270D90", "From": "Stefan Assmann <sassmann@kpanic.de>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Thu, 29 Jun 2017 15:12:24 +0200", "Message-Id": "<20170629131225.9251-2-sassmann@kpanic.de>", "In-Reply-To": "<20170629131225.9251-1-sassmann@kpanic.de>", "References": "<20170629131225.9251-1-sassmann@kpanic.de>", "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.14", "Cc": "netdev@vger.kernel.org, davem@davemloft.net, sassmann@kpanic.de", "Subject": "[Intel-wired-lan] [PATCH 1/2] i40e/i40evf: rename vf_offload_flags\n\tto vf_cap_flags in struct virtchnl_vf_resource", "X-BeenThere": "intel-wired-lan@osuosl.org", "X-Mailman-Version": "2.1.18-1", "Precedence": "list", "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>", "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>", "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "intel-wired-lan-bounces@osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>" }, "content": "The current name of vf_offload_flags indicates that the bitmap is\nlimited to offload related features. Make this more generic by renaming\nit to vf_cap_flags, which allows for other capabilities besides\noffloading to be added.\n\nSigned-off-by: Stefan Assmann <sassmann@kpanic.de>\n---\n drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 22 +++++++++++-----------\n drivers/net/ethernet/intel/i40evf/i40e_common.c | 2 +-\n drivers/net/ethernet/intel/i40evf/i40evf.h | 10 +++++-----\n drivers/net/ethernet/intel/i40evf/i40evf_main.c | 12 ++++++------\n include/linux/avf/virtchnl.h | 4 ++--\n 5 files changed, 25 insertions(+), 25 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c\nindex 3ef67dc..057c77b 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c\n@@ -1528,39 +1528,39 @@ static int i40e_vc_get_vf_resources_msg(struct i40e_vf *vf, u8 *msg)\n \t\t\t\t VIRTCHNL_VF_OFFLOAD_RSS_REG |\n \t\t\t\t VIRTCHNL_VF_OFFLOAD_VLAN;\n \n-\tvfres->vf_offload_flags = VIRTCHNL_VF_OFFLOAD_L2;\n+\tvfres->vf_cap_flags = VIRTCHNL_VF_OFFLOAD_L2;\n \tvsi = pf->vsi[vf->lan_vsi_idx];\n \tif (!vsi->info.pvid)\n-\t\tvfres->vf_offload_flags |= VIRTCHNL_VF_OFFLOAD_VLAN;\n+\t\tvfres->vf_cap_flags |= VIRTCHNL_VF_OFFLOAD_VLAN;\n \n \tif (i40e_vf_client_capable(pf, vf->vf_id) &&\n \t (vf->driver_caps & VIRTCHNL_VF_OFFLOAD_IWARP)) {\n-\t\tvfres->vf_offload_flags |= VIRTCHNL_VF_OFFLOAD_IWARP;\n+\t\tvfres->vf_cap_flags |= VIRTCHNL_VF_OFFLOAD_IWARP;\n \t\tset_bit(I40E_VF_STATE_IWARPENA, &vf->vf_states);\n \t}\n \n \tif (vf->driver_caps & VIRTCHNL_VF_OFFLOAD_RSS_PF) {\n-\t\tvfres->vf_offload_flags |= VIRTCHNL_VF_OFFLOAD_RSS_PF;\n+\t\tvfres->vf_cap_flags |= VIRTCHNL_VF_OFFLOAD_RSS_PF;\n \t} else {\n \t\tif ((pf->hw_features & I40E_HW_RSS_AQ_CAPABLE) &&\n \t\t (vf->driver_caps & VIRTCHNL_VF_OFFLOAD_RSS_AQ))\n-\t\t\tvfres->vf_offload_flags |= VIRTCHNL_VF_OFFLOAD_RSS_AQ;\n+\t\t\tvfres->vf_cap_flags |= VIRTCHNL_VF_OFFLOAD_RSS_AQ;\n \t\telse\n-\t\t\tvfres->vf_offload_flags |= VIRTCHNL_VF_OFFLOAD_RSS_REG;\n+\t\t\tvfres->vf_cap_flags |= VIRTCHNL_VF_OFFLOAD_RSS_REG;\n \t}\n \n \tif (pf->hw_features & I40E_HW_MULTIPLE_TCP_UDP_RSS_PCTYPE) {\n \t\tif (vf->driver_caps & VIRTCHNL_VF_OFFLOAD_RSS_PCTYPE_V2)\n-\t\t\tvfres->vf_offload_flags |=\n+\t\t\tvfres->vf_cap_flags |=\n \t\t\t\tVIRTCHNL_VF_OFFLOAD_RSS_PCTYPE_V2;\n \t}\n \n \tif (vf->driver_caps & VIRTCHNL_VF_OFFLOAD_ENCAP)\n-\t\tvfres->vf_offload_flags |= VIRTCHNL_VF_OFFLOAD_ENCAP;\n+\t\tvfres->vf_cap_flags |= VIRTCHNL_VF_OFFLOAD_ENCAP;\n \n \tif ((pf->hw_features & I40E_HW_OUTER_UDP_CSUM_CAPABLE) &&\n \t (vf->driver_caps & VIRTCHNL_VF_OFFLOAD_ENCAP_CSUM))\n-\t\tvfres->vf_offload_flags |= VIRTCHNL_VF_OFFLOAD_ENCAP_CSUM;\n+\t\tvfres->vf_cap_flags |= VIRTCHNL_VF_OFFLOAD_ENCAP_CSUM;\n \n \tif (vf->driver_caps & VIRTCHNL_VF_OFFLOAD_RX_POLLING) {\n \t\tif (pf->flags & I40E_FLAG_MFP_ENABLED) {\n@@ -1570,12 +1570,12 @@ static int i40e_vc_get_vf_resources_msg(struct i40e_vf *vf, u8 *msg)\n \t\t\taq_ret = I40E_ERR_PARAM;\n \t\t\tgoto err;\n \t\t}\n-\t\tvfres->vf_offload_flags |= VIRTCHNL_VF_OFFLOAD_RX_POLLING;\n+\t\tvfres->vf_cap_flags |= VIRTCHNL_VF_OFFLOAD_RX_POLLING;\n \t}\n \n \tif (pf->hw_features & I40E_HW_WB_ON_ITR_CAPABLE) {\n \t\tif (vf->driver_caps & VIRTCHNL_VF_OFFLOAD_WB_ON_ITR)\n-\t\t\tvfres->vf_offload_flags |=\n+\t\t\tvfres->vf_cap_flags |=\n \t\t\t\t\tVIRTCHNL_VF_OFFLOAD_WB_ON_ITR;\n \t}\n \ndiff --git a/drivers/net/ethernet/intel/i40evf/i40e_common.c b/drivers/net/ethernet/intel/i40evf/i40e_common.c\nindex 1dd1938..d69c2e4 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40e_common.c\n+++ b/drivers/net/ethernet/intel/i40evf/i40e_common.c\n@@ -1104,7 +1104,7 @@ void i40e_vf_parse_hw_config(struct i40e_hw *hw,\n \thw->dev_caps.num_rx_qp = msg->num_queue_pairs;\n \thw->dev_caps.num_tx_qp = msg->num_queue_pairs;\n \thw->dev_caps.num_msix_vectors_vf = msg->max_vectors;\n-\thw->dev_caps.dcb = msg->vf_offload_flags &\n+\thw->dev_caps.dcb = msg->vf_cap_flags &\n \t\t\t VIRTCHNL_VF_OFFLOAD_L2;\n \thw->dev_caps.fcoe = 0;\n \tfor (i = 0; i < msg->num_vsis; i++) {\ndiff --git a/drivers/net/ethernet/intel/i40evf/i40evf.h b/drivers/net/ethernet/intel/i40evf/i40evf.h\nindex c89767e..d85e446 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40evf.h\n+++ b/drivers/net/ethernet/intel/i40evf/i40evf.h\n@@ -277,19 +277,19 @@ struct i40evf_adapter {\n \tenum virtchnl_link_speed link_speed;\n \tenum virtchnl_ops current_op;\n #define CLIENT_ALLOWED(_a) ((_a)->vf_res ? \\\n-\t\t\t (_a)->vf_res->vf_offload_flags & \\\n+\t\t\t (_a)->vf_res->vf_cap_flags & \\\n \t\t\t\tVIRTCHNL_VF_OFFLOAD_IWARP : \\\n \t\t\t 0)\n #define CLIENT_ENABLED(_a) ((_a)->cinst)\n /* RSS by the PF should be preferred over RSS via other methods. */\n-#define RSS_PF(_a) ((_a)->vf_res->vf_offload_flags & \\\n+#define RSS_PF(_a) ((_a)->vf_res->vf_cap_flags & \\\n \t\t VIRTCHNL_VF_OFFLOAD_RSS_PF)\n-#define RSS_AQ(_a) ((_a)->vf_res->vf_offload_flags & \\\n+#define RSS_AQ(_a) ((_a)->vf_res->vf_cap_flags & \\\n \t\t VIRTCHNL_VF_OFFLOAD_RSS_AQ)\n-#define RSS_REG(_a) (!((_a)->vf_res->vf_offload_flags & \\\n+#define RSS_REG(_a) (!((_a)->vf_res->vf_cap_flags & \\\n \t\t (VIRTCHNL_VF_OFFLOAD_RSS_AQ | \\\n \t\t\tVIRTCHNL_VF_OFFLOAD_RSS_PF)))\n-#define VLAN_ALLOWED(_a) ((_a)->vf_res->vf_offload_flags & \\\n+#define VLAN_ALLOWED(_a) ((_a)->vf_res->vf_cap_flags & \\\n \t\t\t VIRTCHNL_VF_OFFLOAD_VLAN)\n \tstruct virtchnl_vf_resource *vf_res; /* incl. all VSIs */\n \tstruct virtchnl_vsi_resource *vsi_res; /* our LAN VSI */\ndiff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c\nindex 77d2835..21103bb 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c\n+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c\n@@ -1418,7 +1418,7 @@ static int i40evf_init_rss(struct i40evf_adapter *adapter)\n \n \tif (!RSS_PF(adapter)) {\n \t\t/* Enable PCTYPES for RSS, TCP/UDP with IPv4/IPv6 */\n-\t\tif (adapter->vf_res->vf_offload_flags &\n+\t\tif (adapter->vf_res->vf_cap_flags &\n \t\t VIRTCHNL_VF_OFFLOAD_RSS_PCTYPE_V2)\n \t\t\tadapter->hena = I40E_DEFAULT_RSS_HENA_EXPANDED;\n \t\telse\n@@ -2372,7 +2372,7 @@ static netdev_features_t i40evf_fix_features(struct net_device *netdev,\n \tstruct i40evf_adapter *adapter = netdev_priv(netdev);\n \n \tfeatures &= ~I40EVF_VLAN_FEATURES;\n-\tif (adapter->vf_res->vf_offload_flags & VIRTCHNL_VF_OFFLOAD_VLAN)\n+\tif (adapter->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN)\n \t\tfeatures |= I40EVF_VLAN_FEATURES;\n \treturn features;\n }\n@@ -2459,7 +2459,7 @@ int i40evf_process_config(struct i40evf_adapter *adapter)\n \t/* advertise to stack only if offloads for encapsulated packets is\n \t * supported\n \t */\n-\tif (vfres->vf_offload_flags & VIRTCHNL_VF_OFFLOAD_ENCAP) {\n+\tif (vfres->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_ENCAP) {\n \t\thw_enc_features |= NETIF_F_GSO_UDP_TUNNEL\t|\n \t\t\t\t NETIF_F_GSO_GRE\t\t|\n \t\t\t\t NETIF_F_GSO_GRE_CSUM\t\t|\n@@ -2469,7 +2469,7 @@ int i40evf_process_config(struct i40evf_adapter *adapter)\n \t\t\t\t NETIF_F_GSO_PARTIAL\t\t|\n \t\t\t\t 0;\n \n-\t\tif (!(vfres->vf_offload_flags &\n+\t\tif (!(vfres->vf_cap_flags &\n \t\t VIRTCHNL_VF_OFFLOAD_ENCAP_CSUM))\n \t\t\tnetdev->gso_partial_features |=\n \t\t\t\tNETIF_F_GSO_UDP_TUNNEL_CSUM;\n@@ -2497,7 +2497,7 @@ int i40evf_process_config(struct i40evf_adapter *adapter)\n \tadapter->vsi.work_limit = I40E_DEFAULT_IRQ_WORK;\n \tvsi->netdev = adapter->netdev;\n \tvsi->qs_handle = adapter->vsi_res->qset_handle;\n-\tif (vfres->vf_offload_flags & VIRTCHNL_VF_OFFLOAD_RSS_PF) {\n+\tif (vfres->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RSS_PF) {\n \t\tadapter->rss_key_size = vfres->rss_key_size;\n \t\tadapter->rss_lut_size = vfres->rss_lut_size;\n \t} else {\n@@ -2665,7 +2665,7 @@ static void i40evf_init_task(struct work_struct *work)\n \tif (err)\n \t\tgoto err_sw_init;\n \ti40evf_map_rings_to_vectors(adapter);\n-\tif (adapter->vf_res->vf_offload_flags &\n+\tif (adapter->vf_res->vf_cap_flags &\n \t VIRTCHNL_VF_OFFLOAD_WB_ON_ITR)\n \t\tadapter->flags |= I40EVF_FLAG_WB_ON_ITR_CAPABLE;\n \ndiff --git a/include/linux/avf/virtchnl.h b/include/linux/avf/virtchnl.h\nindex c893b95..becfca2 100644\n--- a/include/linux/avf/virtchnl.h\n+++ b/include/linux/avf/virtchnl.h\n@@ -223,7 +223,7 @@ struct virtchnl_vsi_resource {\n \n VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_vsi_resource);\n \n-/* VF offload flags\n+/* VF capability flags\n * VIRTCHNL_VF_OFFLOAD_L2 flag is inclusive of base mode L2 offloads including\n * TX/RX Checksum offloading and TSO for non-tunnelled packets.\n */\n@@ -251,7 +251,7 @@ struct virtchnl_vf_resource {\n \tu16 max_vectors;\n \tu16 max_mtu;\n \n-\tu32 vf_offload_flags;\n+\tu32 vf_cap_flags;\n \tu32 rss_key_size;\n \tu32 rss_lut_size;\n \n", "prefixes": [ "1/2" ] }