get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 787397,
    "url": "http://patchwork.ozlabs.org/api/patches/787397/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20170712094614.76501-10-alice.michael@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": "<20170712094614.76501-10-alice.michael@intel.com>",
    "list_archive_url": null,
    "date": "2017-07-12T09:46:13",
    "name": "[next,S75-V3,10/11] i40e/i40evf: support for VF VLAN tag stripping control",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": false,
    "hash": "9862e7bb91adfc5f59790db068b2f8dc71231528",
    "submitter": {
        "id": 71123,
        "url": "http://patchwork.ozlabs.org/api/people/71123/?format=api",
        "name": "Michael, Alice",
        "email": "alice.michael@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/20170712094614.76501-10-alice.michael@intel.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/787397/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/787397/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 silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\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 3x761r4s3Lz9s72\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 13 Jul 2017 03:50:55 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id E650130910;\n\tWed, 12 Jul 2017 17:50:53 +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 56+R+CzYFdl2; Wed, 12 Jul 2017 17:50:50 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id D103B30926;\n\tWed, 12 Jul 2017 17:50:47 +0000 (UTC)",
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 0BBE11C4121\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 12 Jul 2017 17:50:44 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 0683E89FDF\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 12 Jul 2017 17:50:44 +0000 (UTC)",
            "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id l6fR4xYj2Mol for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 12 Jul 2017 17:50:42 +0000 (UTC)",
            "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id B958489FFB\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 12 Jul 2017 17:50:42 +0000 (UTC)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby orsmga104.jf.intel.com with ESMTP; 12 Jul 2017 10:50:42 -0700",
            "from unknown (HELO localhost.jf.intel.com) ([10.166.16.121])\n\tby FMSMGA003.fm.intel.com with ESMTP; 12 Jul 2017 10:50:42 -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.40,350,1496127600\"; d=\"scan'208\";a=\"878118689\"",
        "From": "Alice Michael <alice.michael@intel.com>",
        "To": "alice.michael@intel.com,\n\tintel-wired-lan@lists.osuosl.org",
        "Date": "Wed, 12 Jul 2017 05:46:13 -0400",
        "Message-Id": "<20170712094614.76501-10-alice.michael@intel.com>",
        "X-Mailer": "git-send-email 2.9.3",
        "In-Reply-To": "<20170712094614.76501-1-alice.michael@intel.com>",
        "References": "<20170712094614.76501-1-alice.michael@intel.com>",
        "Cc": "Mariusz Stachura <mariusz.stachura@intel.com>",
        "Subject": "[Intel-wired-lan] [next PATCH S75-V3 10/11] i40e/i40evf: support\n\tfor VF VLAN tag stripping control",
        "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": "From: Mariusz Stachura <mariusz.stachura@intel.com>\n\nThis patch gives VF capability to control VLAN tag stripping via\nethtool. As rx-vlan-offload was fixed before, now the VF is able to\nchange it using \"ethtool --offload <IF> rxvlan on/off\" settings.\n\nSigned-off-by: Mariusz Stachura <mariusz.stachura@intel.com>\n---\n drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 60 ++++++++++++++++++++++\n drivers/net/ethernet/intel/i40evf/i40evf.h         |  4 ++\n drivers/net/ethernet/intel/i40evf/i40evf_main.c    | 33 ++++++++++++\n .../net/ethernet/intel/i40evf/i40evf_virtchnl.c    | 40 +++++++++++++++\n 4 files changed, 137 insertions(+)",
    "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c\nindex aa8d30b..d551f84 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c\n@@ -2530,6 +2530,60 @@ static int i40e_vc_set_rss_hena(struct i40e_vf *vf, u8 *msg, u16 msglen)\n }\n \n /**\n+ * i40e_vc_enable_vlan_stripping\n+ * @vf: pointer to the VF info\n+ * @msg: pointer to the msg buffer\n+ * @msglen: msg length\n+ *\n+ * Enable vlan header stripping for the VF\n+ **/\n+static int i40e_vc_enable_vlan_stripping(struct i40e_vf *vf, u8 *msg,\n+\t\t\t\t\t u16 msglen)\n+{\n+\tstruct i40e_vsi *vsi = vf->pf->vsi[vf->lan_vsi_idx];\n+\ti40e_status aq_ret = 0;\n+\n+\tif (!test_bit(I40E_VF_STATE_ACTIVE, &vf->vf_states)) {\n+\t\taq_ret = I40E_ERR_PARAM;\n+\t\tgoto err;\n+\t}\n+\n+\ti40e_vlan_stripping_enable(vsi);\n+\n+\t/* send the response to the VF */\n+err:\n+\treturn i40e_vc_send_resp_to_vf(vf, VIRTCHNL_OP_ENABLE_VLAN_STRIPPING,\n+\t\t\t\t       aq_ret);\n+}\n+\n+/**\n+ * i40e_vc_disable_vlan_stripping\n+ * @vf: pointer to the VF info\n+ * @msg: pointer to the msg buffer\n+ * @msglen: msg length\n+ *\n+ * Disable vlan header stripping for the VF\n+ **/\n+static int i40e_vc_disable_vlan_stripping(struct i40e_vf *vf, u8 *msg,\n+\t\t\t\t\t  u16 msglen)\n+{\n+\tstruct i40e_vsi *vsi = vf->pf->vsi[vf->lan_vsi_idx];\n+\ti40e_status aq_ret = 0;\n+\n+\tif (!test_bit(I40E_VF_STATE_ACTIVE, &vf->vf_states)) {\n+\t\taq_ret = I40E_ERR_PARAM;\n+\t\tgoto err;\n+\t}\n+\n+\ti40e_vlan_stripping_disable(vsi);\n+\n+\t/* send the response to the VF */\n+err:\n+\treturn i40e_vc_send_resp_to_vf(vf, VIRTCHNL_OP_DISABLE_VLAN_STRIPPING,\n+\t\t\t\t       aq_ret);\n+}\n+\n+/**\n  * i40e_vc_process_vf_msg\n  * @pf: pointer to the PF structure\n  * @vf_id: source VF id\n@@ -2648,6 +2702,12 @@ int i40e_vc_process_vf_msg(struct i40e_pf *pf, s16 vf_id, u32 v_opcode,\n \tcase VIRTCHNL_OP_SET_RSS_HENA:\n \t\tret = i40e_vc_set_rss_hena(vf, msg, msglen);\n \t\tbreak;\n+\tcase VIRTCHNL_OP_ENABLE_VLAN_STRIPPING:\n+\t\tret = i40e_vc_enable_vlan_stripping(vf, msg, msglen);\n+\t\tbreak;\n+\tcase VIRTCHNL_OP_DISABLE_VLAN_STRIPPING:\n+\t\tret = i40e_vc_disable_vlan_stripping(vf, msg, msglen);\n+\t\tbreak;\n \n \tcase VIRTCHNL_OP_UNKNOWN:\n \tdefault:\ndiff --git a/drivers/net/ethernet/intel/i40evf/i40evf.h b/drivers/net/ethernet/intel/i40evf/i40evf.h\nindex f028c09..b659358 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40evf.h\n+++ b/drivers/net/ethernet/intel/i40evf/i40evf.h\n@@ -261,6 +261,8 @@ struct i40evf_adapter {\n #define I40EVF_FLAG_AQ_RELEASE_PROMISC\t\tBIT(16)\n #define I40EVF_FLAG_AQ_REQUEST_ALLMULTI\t\tBIT(17)\n #define I40EVF_FLAG_AQ_RELEASE_ALLMULTI\t\tBIT(18)\n+#define I40EVF_FLAG_AQ_ENABLE_VLAN_STRIPPING\tBIT(19)\n+#define I40EVF_FLAG_AQ_DISABLE_VLAN_STRIPPING   BIT(20)\n \n \t/* OS defined structs */\n \tstruct net_device *netdev;\n@@ -358,6 +360,8 @@ void i40evf_get_hena(struct i40evf_adapter *adapter);\n void i40evf_set_hena(struct i40evf_adapter *adapter);\n void i40evf_set_rss_key(struct i40evf_adapter *adapter);\n void i40evf_set_rss_lut(struct i40evf_adapter *adapter);\n+void i40evf_enable_vlan_stripping(struct i40evf_adapter *adapter);\n+void i40evf_disable_vlan_stripping(struct i40evf_adapter *adapter);\n void i40evf_virtchnl_completion(struct i40evf_adapter *adapter,\n \t\t\t\tenum virtchnl_ops v_opcode,\n \t\t\t\ti40e_status v_retval, u8 *msg, u16 msglen);\ndiff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c\nindex a8bc1ed..ad4c833 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c\n+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c\n@@ -1676,6 +1676,16 @@ static void i40evf_watchdog_task(struct work_struct *work)\n \t\tgoto watchdog_done;\n \t}\n \n+\tif (adapter->aq_required & I40EVF_FLAG_AQ_ENABLE_VLAN_STRIPPING) {\n+\t\ti40evf_enable_vlan_stripping(adapter);\n+\t\tgoto watchdog_done;\n+\t}\n+\n+\tif (adapter->aq_required & I40EVF_FLAG_AQ_DISABLE_VLAN_STRIPPING) {\n+\t\ti40evf_disable_vlan_stripping(adapter);\n+\t\tgoto watchdog_done;\n+\t}\n+\n \tif (adapter->aq_required & I40EVF_FLAG_AQ_CONFIGURE_QUEUES) {\n \t\ti40evf_configure_queues(adapter);\n \t\tgoto watchdog_done;\n@@ -2295,6 +2305,28 @@ static int i40evf_change_mtu(struct net_device *netdev, int new_mtu)\n }\n \n /**\n+ * i40e_set_features - set the netdev feature flags\n+ * @netdev: ptr to the netdev being adjusted\n+ * @features: the feature set that the stack is suggesting\n+ * Note: expects to be called while under rtnl_lock()\n+ **/\n+static int i40evf_set_features(struct net_device *netdev,\n+\t\t\t       netdev_features_t features)\n+{\n+\tstruct i40evf_adapter *adapter = netdev_priv(netdev);\n+\n+\tif (!VLAN_ALLOWED(adapter))\n+\t\treturn -EINVAL;\n+\n+\tif (features & NETIF_F_HW_VLAN_CTAG_RX)\n+\t\tadapter->aq_required |= I40EVF_FLAG_AQ_ENABLE_VLAN_STRIPPING;\n+\telse\n+\t\tadapter->aq_required |= I40EVF_FLAG_AQ_DISABLE_VLAN_STRIPPING;\n+\n+\treturn 0;\n+}\n+\n+/**\n  * i40evf_features_check - Validate encapsulated packet conforms to limits\n  * @skb: skb buff\n  * @netdev: This physical port's netdev\n@@ -2387,6 +2419,7 @@ static const struct net_device_ops i40evf_netdev_ops = {\n \t.ndo_vlan_rx_kill_vid\t= i40evf_vlan_rx_kill_vid,\n \t.ndo_features_check\t= i40evf_features_check,\n \t.ndo_fix_features\t= i40evf_fix_features,\n+\t.ndo_set_features\t= i40evf_set_features,\n #ifdef CONFIG_NET_POLL_CONTROLLER\n \t.ndo_poll_controller\t= i40evf_netpoll,\n #endif\ndiff --git a/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c b/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c\nindex 6c403bf..85876f4 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c\n+++ b/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c\n@@ -821,6 +821,46 @@ void i40evf_set_rss_lut(struct i40evf_adapter *adapter)\n }\n \n /**\n+ * i40evf_enable_vlan_stripping\n+ * @adapter: adapter structure\n+ *\n+ * Request VLAN header stripping to be enabled\n+ **/\n+void i40evf_enable_vlan_stripping(struct i40evf_adapter *adapter)\n+{\n+\tif (adapter->current_op != VIRTCHNL_OP_UNKNOWN) {\n+\t\t/* bail because we already have a command pending */\n+\t\tdev_err(&adapter->pdev->dev, \"Cannot enable stripping, command %d pending\\n\",\n+\t\t\tadapter->current_op);\n+\t\treturn;\n+\t}\n+\tadapter->current_op = VIRTCHNL_OP_ENABLE_VLAN_STRIPPING;\n+\tadapter->aq_required &= ~I40EVF_FLAG_AQ_ENABLE_VLAN_STRIPPING;\n+\ti40evf_send_pf_msg(adapter, VIRTCHNL_OP_ENABLE_VLAN_STRIPPING,\n+\t\t\t   NULL, 0);\n+}\n+\n+/**\n+ * i40evf_disable_vlan_stripping\n+ * @adapter: adapter structure\n+ *\n+ * Request VLAN header stripping to be disabled\n+ **/\n+void i40evf_disable_vlan_stripping(struct i40evf_adapter *adapter)\n+{\n+\tif (adapter->current_op != VIRTCHNL_OP_UNKNOWN) {\n+\t\t/* bail because we already have a command pending */\n+\t\tdev_err(&adapter->pdev->dev, \"Cannot disable stripping, command %d pending\\n\",\n+\t\t\tadapter->current_op);\n+\t\treturn;\n+\t}\n+\tadapter->current_op = VIRTCHNL_OP_DISABLE_VLAN_STRIPPING;\n+\tadapter->aq_required &= ~I40EVF_FLAG_AQ_DISABLE_VLAN_STRIPPING;\n+\ti40evf_send_pf_msg(adapter, VIRTCHNL_OP_DISABLE_VLAN_STRIPPING,\n+\t\t\t   NULL, 0);\n+}\n+\n+/**\n  * i40evf_print_link_message - print link up or down\n  * @adapter: adapter structure\n  *\n",
    "prefixes": [
        "next",
        "S75-V3",
        "10/11"
    ]
}