get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 67721,
    "url": "http://patches.dpdk.org/api/patches/67721/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200403024353.24681-14-wei.zhao1@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20200403024353.24681-14-wei.zhao1@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200403024353.24681-14-wei.zhao1@intel.com",
    "date": "2020-04-03T02:43:53",
    "name": "[v3,13/13] net/ice: redirect switch rule to new VSI",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "8a95fb16a89d44da2b1e203ca8ef722ccff23c97",
    "submitter": {
        "id": 495,
        "url": "http://patches.dpdk.org/api/people/495/?format=api",
        "name": "Zhao1, Wei",
        "email": "wei.zhao1@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200403024353.24681-14-wei.zhao1@intel.com/mbox/",
    "series": [
        {
            "id": 9180,
            "url": "http://patches.dpdk.org/api/series/9180/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=9180",
            "date": "2020-04-03T02:43:40",
            "name": "add switch filter support for intel DCF",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/9180/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/67721/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/67721/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id E7B2AA0562;\n\tFri,  3 Apr 2020 05:07:12 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 4FAFB1C137;\n\tFri,  3 Apr 2020 05:05:32 +0200 (CEST)",
            "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n by dpdk.org (Postfix) with ESMTP id 8DAEB1C0DC\n for <dev@dpdk.org>; Fri,  3 Apr 2020 05:05:30 +0200 (CEST)",
            "from orsmga003.jf.intel.com ([10.7.209.27])\n by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 02 Apr 2020 20:05:30 -0700",
            "from unknown (HELO localhost.localdomain.bj.intel.com)\n ([172.16.182.123])\n by orsmga003.jf.intel.com with ESMTP; 02 Apr 2020 20:05:28 -0700"
        ],
        "IronPort-SDR": [
            "\n qT8DxVpHgAUySij7qqpQLWQTH1dBlLj9nCyPYLNDsk4K994NIzAY87V5m6BEdkT5tdGSzpG9W7\n pW5e+WPHMQSw==",
            "\n uHE7LWPfxTCWtErV+X4NwSCmJvTzKCTVtJ5HwMuGoUuRPCFoBjp1rmvrbPbd8Pyc74pcAGl6Xq\n X1YI1294aumg=="
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.72,337,1580803200\"; d=\"scan'208\";a=\"250034507\"",
        "From": "Wei Zhao <wei.zhao1@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "qi.z.zhang@intel.com, nannan.lu@intel.com, qi.fu@intel.com,\n yuan.peng@intel.com, Beilei Xing <beilei.xing@intel.com>",
        "Date": "Fri,  3 Apr 2020 10:43:53 +0800",
        "Message-Id": "<20200403024353.24681-14-wei.zhao1@intel.com>",
        "X-Mailer": "git-send-email 2.19.1",
        "In-Reply-To": "<20200403024353.24681-1-wei.zhao1@intel.com>",
        "References": "<20200402064620.47668-1-wei.zhao1@intel.com>\n <20200403024353.24681-1-wei.zhao1@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v3 13/13] net/ice: redirect switch rule to new VSI",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "After VF reset, VF's VSI number may be changed,\nthe switch rule which forwards packet to the old\nVSI number should be redirected to the new VSI\nnumber.\n\nSigned-off-by: Beilei Xing <beilei.xing@intel.com>\n---\n drivers/net/ice/ice_dcf_parent.c | 22 +++++++++++++++++++---\n 1 file changed, 19 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/drivers/net/ice/ice_dcf_parent.c b/drivers/net/ice/ice_dcf_parent.c\nindex 37f0e2be2..e05b6b3e5 100644\n--- a/drivers/net/ice/ice_dcf_parent.c\n+++ b/drivers/net/ice/ice_dcf_parent.c\n@@ -19,6 +19,8 @@ ice_dcf_update_vsi_ctx(struct ice_hw *hw, uint16_t vsi_handle,\n \t\t       uint16_t vsi_map)\n {\n \tstruct ice_vsi_ctx *vsi_ctx;\n+\tbool first_update = false;\n+\tuint16_t new_vsi_num;\n \n \tif (unlikely(vsi_handle >= ICE_MAX_VSI)) {\n \t\tPMD_DRV_LOG(ERR, \"Invalid vsi handle %u\", vsi_handle);\n@@ -35,11 +37,25 @@ ice_dcf_update_vsi_ctx(struct ice_hw *hw, uint16_t vsi_handle,\n \t\t\t\t\t    vsi_handle);\n \t\t\t\treturn;\n \t\t\t}\n+\t\t\thw->vsi_ctx[vsi_handle] = vsi_ctx;\n+\t\t\tfirst_update = true;\n \t\t}\n \n-\t\tvsi_ctx->vsi_num = (vsi_map & VIRTCHNL_DCF_VF_VSI_ID_M) >>\n-\t\t\t\t\t      VIRTCHNL_DCF_VF_VSI_ID_S;\n-\t\thw->vsi_ctx[vsi_handle] = vsi_ctx;\n+\t\tnew_vsi_num = (vsi_map & VIRTCHNL_DCF_VF_VSI_ID_M) >>\n+\t\t\tVIRTCHNL_DCF_VF_VSI_ID_S;\n+\n+\t\t/* Redirect rules if vsi mapping table changes. */\n+\t\tif (!first_update && vsi_ctx->vsi_num != new_vsi_num) {\n+\t\t\tstruct ice_flow_redirect rd;\n+\n+\t\t\tmemset(&rd, 0, sizeof(struct ice_flow_redirect));\n+\t\t\trd.type = ICE_FLOW_REDIRECT_VSI;\n+\t\t\trd.vsi_handle = vsi_handle;\n+\t\t\trd.new_vsi_num = new_vsi_num;\n+\t\t\tice_flow_redirect((struct ice_adapter *)hw->back, &rd);\n+\t\t} else {\n+\t\t\tvsi_ctx->vsi_num = new_vsi_num;\n+\t\t}\n \n \t\tPMD_DRV_LOG(DEBUG, \"VF%u is assigned with vsi number %u\",\n \t\t\t    vsi_handle, vsi_ctx->vsi_num);\n",
    "prefixes": [
        "v3",
        "13/13"
    ]
}