Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/604973/?format=api
{ "id": 604973, "url": "http://patchwork.ozlabs.org/api/patches/604973/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1459508173-22777-8-git-send-email-harshitha.ramamurthy@intel.com/", "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": "<1459508173-22777-8-git-send-email-harshitha.ramamurthy@intel.com>", "list_archive_url": null, "date": "2016-04-01T10:56:07", "name": "[v3,next,S32,07/13] i40e: Patch to support trusted VF", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "d1d79aaa45441a05bc4089af19d7f6fe669d53ae", "submitter": { "id": 68642, "url": "http://patchwork.ozlabs.org/api/people/68642/?format=api", "name": "Harshitha Ramamurthy", "email": "harshitha.ramamurthy@intel.com" }, "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/1459508173-22777-8-git-send-email-harshitha.ramamurthy@intel.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/604973/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/604973/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@lists.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 silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ozlabs.org (Postfix) with ESMTP id 3qc9jK0Zfpz9sf6\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 2 Apr 2016 06:01:57 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 58B4433A83;\n\tFri, 1 Apr 2016 19:01:56 +0000 (UTC)", "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id KgY4h06rE8Nx; Fri, 1 Apr 2016 19:01:52 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id A383F33A7C;\n\tFri, 1 Apr 2016 19:01:49 +0000 (UTC)", "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 24ED71BF9E4\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 1 Apr 2016 19:01:46 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 1FAF491F0C\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 1 Apr 2016 19:01:46 +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 0B7Nj5IT2soA for <intel-wired-lan@lists.osuosl.org>;\n\tFri, 1 Apr 2016 19:01:44 +0000 (UTC)", "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id B99FC91F12\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 1 Apr 2016 19:01:43 +0000 (UTC)", "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby orsmga102.jf.intel.com with ESMTP; 01 Apr 2016 12:01:43 -0700", "from harshitha-linux1.jf.intel.com ([10.166.45.81])\n\tby fmsmga001.fm.intel.com with ESMTP; 01 Apr 2016 12:01:43 -0700" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.24,428,1455004800\"; d=\"scan'208\";a=\"936472996\"", "From": "Harshitha Ramamurthy <harshitha.ramamurthy@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Fri, 1 Apr 2016 03:56:07 -0700", "Message-Id": "<1459508173-22777-8-git-send-email-harshitha.ramamurthy@intel.com>", "X-Mailer": "git-send-email 2.4.3", "In-Reply-To": "<1459508173-22777-1-git-send-email-harshitha.ramamurthy@intel.com>", "References": "<1459508173-22777-1-git-send-email-harshitha.ramamurthy@intel.com>", "Subject": "[Intel-wired-lan] [v3 next PATCH S32 07/13] i40e: Patch to support\n\ttrusted VF", "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\n\t<intel-wired-lan.lists.osuosl.org>", "List-Unsubscribe": "<http://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@lists.osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@lists.osuosl.org?subject=help>", "List-Subscribe": "<http://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.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@lists.osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@lists.osuosl.org>" }, "content": "From: Anjali Singhai Jain <anjali.singhai@intel.com>\n\nThis patch adds hook to support changing a VF from not-trusted\nto trusted and vice-versa. Fixed the wrappers and function prototype.\nChanged the dmesg to reflex the current state better. This patch also\ndisables turning on/off trusted VF in MFP mode.\n\nSigned-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>\nChange-ID: Ibcd910935c01f0be1f3fdd6d427230291ee92ebe\n---\nTesting Hints : Test the feature with ip link set dev eth0 vf 1 trust\non or ip link set dev eth0 vf 1 trust off\n\n drivers/net/ethernet/intel/i40e/i40e_main.c | 1 +\n drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 42 ++++++++++++++++++++++\n drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h | 2 ++\n 3 files changed, 45 insertions(+)", "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c\nindex 86abd08..627acf0 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -9069,6 +9069,7 @@ static const struct net_device_ops i40e_netdev_ops = {\n \t.ndo_get_vf_config\t= i40e_ndo_get_vf_config,\n \t.ndo_set_vf_link_state\t= i40e_ndo_set_vf_link_state,\n \t.ndo_set_vf_spoofchk\t= i40e_ndo_set_vf_spoofchk,\n+\t.ndo_set_vf_trust\t= i40e_ndo_set_vf_trust,\n #if IS_ENABLED(CONFIG_VXLAN)\n \t.ndo_add_vxlan_port\t= i40e_add_vxlan_port,\n \t.ndo_del_vxlan_port\t= i40e_del_vxlan_port,\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c\nindex f2a9c14..b353966 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c\n@@ -2763,3 +2763,45 @@ int i40e_ndo_set_vf_spoofchk(struct net_device *netdev, int vf_id, bool enable)\n out:\n \treturn ret;\n }\n+\n+/**\n+ * i40e_ndo_set_vf_trust\n+ * @netdev: network interface device structure of the pf\n+ * @vf_id: VF identifier\n+ * @setting: trust setting\n+ *\n+ * Enable or disable VF trust setting\n+ **/\n+int i40e_ndo_set_vf_trust(struct net_device *netdev, int vf_id, bool setting)\n+{\n+\tstruct i40e_netdev_priv *np = netdev_priv(netdev);\n+\tstruct i40e_pf *pf = np->vsi->back;\n+\tstruct i40e_vf *vf;\n+\tint ret = 0;\n+\n+\t/* validate the request */\n+\tif (vf_id >= pf->num_alloc_vfs) {\n+\t\tdev_err(&pf->pdev->dev, \"Invalid VF Identifier %d\\n\", vf_id);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (pf->flags & I40E_FLAG_MFP_ENABLED) {\n+\t\tdev_err(&pf->pdev->dev, \"Trusted VF not supported in MFP mode.\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tvf = &pf->vf[vf_id];\n+\n+\tif (!vf)\n+\t\treturn -EINVAL;\n+\tif (setting == vf->trusted)\n+\t\tgoto out;\n+\n+\tvf->trusted = setting;\n+\ti40e_vc_notify_vf_reset(vf);\n+\ti40e_reset_vf(vf, false);\n+\tdev_info(&pf->pdev->dev, \"VF %u is now %strusted\\n\",\n+\t\t vf_id, setting ? \"\" : \"un\");\n+out:\n+\treturn ret;\n+}\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h\nindex e7b2fba..838cbd2 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h\n+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h\n@@ -88,6 +88,7 @@ struct i40e_vf {\n \tstruct i40e_virtchnl_ether_addr default_fcoe_addr;\n \tu16 port_vlan_id;\n \tbool pf_set_mac;\t/* The VMM admin set the VF MAC address */\n+\tbool trusted;\n \n \t/* VSI indices - actual VSI pointers are maintained in the PF structure\n \t * When assigned, these will be non-zero, because VSI 0 is always\n@@ -127,6 +128,7 @@ int i40e_ndo_set_vf_port_vlan(struct net_device *netdev,\n \t\t\t int vf_id, u16 vlan_id, u8 qos);\n int i40e_ndo_set_vf_bw(struct net_device *netdev, int vf_id, int min_tx_rate,\n \t\t int max_tx_rate);\n+int i40e_ndo_set_vf_trust(struct net_device *netdev, int vf_id, bool setting);\n int i40e_ndo_get_vf_config(struct net_device *netdev,\n \t\t\t int vf_id, struct ifla_vf_info *ivi);\n int i40e_ndo_set_vf_link_state(struct net_device *netdev, int vf_id, int link);\n", "prefixes": [ "v3", "next", "S32", "07/13" ] }