get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/602586/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 602586,
    "url": "http://patchwork.ozlabs.org/api/patches/602586/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1459163845-28035-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": "<1459163845-28035-8-git-send-email-harshitha.ramamurthy@intel.com>",
    "list_archive_url": null,
    "date": "2016-03-28T11:17:18",
    "name": "[next,S32,07/14] i40e: Patch to support trusted VF",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "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/1459163845-28035-8-git-send-email-harshitha.ramamurthy@intel.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/602586/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/602586/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 fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ozlabs.org (Postfix) with ESMTP id 3qYkMN5vhtz9sBM\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 29 Mar 2016 06:22:56 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 097B588861;\n\tMon, 28 Mar 2016 19:22:56 +0000 (UTC)",
            "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id WK31r2IvSApS; Mon, 28 Mar 2016 19:22:55 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 1636E88513;\n\tMon, 28 Mar 2016 19:22:55 +0000 (UTC)",
            "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 2D4331C15FF\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 28 Mar 2016 19:22:52 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 2BFDF8B6CA\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 28 Mar 2016 19:22:52 +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 E5XeX7w3KTsq for <intel-wired-lan@lists.osuosl.org>;\n\tMon, 28 Mar 2016 19:22:51 +0000 (UTC)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 6429F8B819\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 28 Mar 2016 19:22:51 +0000 (UTC)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby fmsmga101.fm.intel.com with ESMTP; 28 Mar 2016 12:22:51 -0700",
            "from harshitha-linux1.jf.intel.com ([10.166.45.81])\n\tby orsmga002.jf.intel.com with ESMTP; 28 Mar 2016 12:22:51 -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,408,1455004800\"; d=\"scan'208\";a=\"943132225\"",
        "From": "Harshitha Ramamurthy <harshitha.ramamurthy@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Mon, 28 Mar 2016 04:17:18 -0700",
        "Message-Id": "<1459163845-28035-8-git-send-email-harshitha.ramamurthy@intel.com>",
        "X-Mailer": "git-send-email 2.4.3",
        "In-Reply-To": "<1459163845-28035-1-git-send-email-harshitha.ramamurthy@intel.com>",
        "References": "<1459163845-28035-1-git-send-email-harshitha.ramamurthy@intel.com>",
        "Subject": "[Intel-wired-lan] [next PATCH S32 07/14] 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 6c30b21..b7dd9ae 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -9004,6 +9004,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 21dd1be..fccfc36 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c\n@@ -2526,3 +2526,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 e74642a..0e0c465 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h\n+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h\n@@ -86,6 +86,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@@ -123,6 +124,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": [
        "next",
        "S32",
        "07/14"
    ]
}