get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 77397,
    "url": "http://patches.dpdk.org/api/patches/77397/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200911131954.15999-11-qi.z.zhang@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": "<20200911131954.15999-11-qi.z.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200911131954.15999-11-qi.z.zhang@intel.com",
    "date": "2020-09-11T13:19:24",
    "name": "[v2,10/40] net/ice/base: introduce and use bitmap set API",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "77073cfcc3209364074a7d66e8daf1dc6ebee8ae",
    "submitter": {
        "id": 504,
        "url": "http://patches.dpdk.org/api/people/504/?format=api",
        "name": "Qi Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200911131954.15999-11-qi.z.zhang@intel.com/mbox/",
    "series": [
        {
            "id": 12148,
            "url": "http://patches.dpdk.org/api/series/12148/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=12148",
            "date": "2020-09-11T13:19:15",
            "name": "ice base code update",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/12148/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/77397/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/77397/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 57A65A04B7;\n\tFri, 11 Sep 2020 15:18:00 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 8E1D81C199;\n\tFri, 11 Sep 2020 15:16:21 +0200 (CEST)",
            "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n by dpdk.org (Postfix) with ESMTP id C776B1C12F\n for <dev@dpdk.org>; Fri, 11 Sep 2020 15:16:15 +0200 (CEST)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 11 Sep 2020 06:16:15 -0700",
            "from dpdk51.sh.intel.com ([10.67.111.82])\n by FMSMGA003.fm.intel.com with ESMTP; 11 Sep 2020 06:16:13 -0700"
        ],
        "IronPort-SDR": [
            "\n tQyE2WXXcDS8AsdKiUxa5bEKB+A7HBjtuxymClR6w9XDG08Q85EwCG8MXWHzHr8r/rl6ym3UT5\n lZoArCu+09ag==",
            "\n qq6L8mbAJFks3qnCFB5nCHxyZiBi/Shq7cK2RmIR30NJTowVVou+E5JQrLrd+ACTSoV8RwkN9p\n 5Dc15fl7pyQQ=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9740\"; a=\"146482179\"",
            "E=Sophos;i=\"5.76,415,1592895600\"; d=\"scan'208\";a=\"146482179\"",
            "E=Sophos;i=\"5.76,415,1592895600\"; d=\"scan'208\";a=\"342296524\""
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "From": "Qi Zhang <qi.z.zhang@intel.com>",
        "To": "ferruh.yigit@intel.com",
        "Cc": "dev@dpdk.org, Qi Zhang <qi.z.zhang@intel.com>,\n Bruce Allan <bruce.w.allan@intel.com>",
        "Date": "Fri, 11 Sep 2020 21:19:24 +0800",
        "Message-Id": "<20200911131954.15999-11-qi.z.zhang@intel.com>",
        "X-Mailer": "git-send-email 2.13.6",
        "In-Reply-To": "<20200911131954.15999-1-qi.z.zhang@intel.com>",
        "References": "<20200907112826.48493-1-qi.z.zhang@intel.com>\n <20200911131954.15999-1-qi.z.zhang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 10/40] net/ice/base: introduce and use bitmap\n\tset API",
        "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": "Introduce ice_bitmap_set() and use it instead of open-coding that\nfunctionality.\n\nSigned-off-by: Bruce Allan <bruce.w.allan@intel.com>\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\nAcked-by: Qiming Yang <qiming.yang@intel.com>\n---\n drivers/net/ice/base/ice_acl_ctrl.c  |  4 +---\n drivers/net/ice/base/ice_bitops.h    | 19 +++++++++++++++++++\n drivers/net/ice/base/ice_flex_pipe.c |  9 ++-------\n drivers/net/ice/base/ice_switch.c    |  3 +--\n 4 files changed, 23 insertions(+), 12 deletions(-)",
    "diff": "diff --git a/drivers/net/ice/base/ice_acl_ctrl.c b/drivers/net/ice/base/ice_acl_ctrl.c\nindex 5310b9d9f..a732397ce 100644\n--- a/drivers/net/ice/base/ice_acl_ctrl.c\n+++ b/drivers/net/ice/base/ice_acl_ctrl.c\n@@ -354,7 +354,6 @@ ice_acl_create_tbl(struct ice_hw *hw, struct ice_acl_tbl_params *params)\n \n \t/* call the AQ command to create the ACL table with these values */\n \tstatus = ice_aq_alloc_acl_tbl(hw, &tbl_alloc, NULL);\n-\n \tif (status) {\n \t\tif (LE16_TO_CPU(tbl_alloc.buf.resp_buf.alloc_id) <\n \t\t    ICE_AQC_ALLOC_ID_LESS_THAN_4K)\n@@ -415,8 +414,7 @@ ice_acl_create_tbl(struct ice_hw *hw, struct ice_acl_tbl_params *params)\n \t\t(tbl->last_entry / ICE_ACL_ENTRY_ALLOC_UNIT);\n \n \t/* Indicate available entries in the table */\n-\tfor (i = first_e; i <= last_e; i++)\n-\t\tice_set_bit(i, tbl->avail);\n+\tice_bitmap_set(tbl->avail, first_e, last_e - first_e + 1);\n \n \tINIT_LIST_HEAD(&tbl->scens);\n out:\ndiff --git a/drivers/net/ice/base/ice_bitops.h b/drivers/net/ice/base/ice_bitops.h\nindex 3022116a4..8352b5dd7 100644\n--- a/drivers/net/ice/base/ice_bitops.h\n+++ b/drivers/net/ice/base/ice_bitops.h\n@@ -376,6 +376,25 @@ static inline void ice_cp_bitmap(ice_bitmap_t *dst, ice_bitmap_t *src, u16 size)\n }\n \n /**\n+ * ice_bitmap_set - set a number of bits in bitmap from a starting position\n+ * @dst: bitmap destination\n+ * @pos: first bit position to set\n+ * @num_bits: number of bits to set\n+ *\n+ * This function sets bits in a bitmap from pos to (pos + num_bits) - 1.\n+ * Note that this function assumes it is operating on a bitmap declared using\n+ * ice_declare_bitmap.\n+ */\n+static inline void\n+ice_bitmap_set(ice_bitmap_t *dst, u16 pos, u16 num_bits)\n+{\n+\tu16 i;\n+\n+\tfor (i = pos; i < num_bits; i++)\n+\t\tice_set_bit(i, dst);\n+}\n+\n+/**\n  * ice_cmp_bitmaps - compares two bitmaps.\n  * @bmp1: the bitmap to compare\n  * @bmp2: the bitmap to compare with bmp1\ndiff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c\nindex 25d79b5c4..a08390992 100644\n--- a/drivers/net/ice/base/ice_flex_pipe.c\n+++ b/drivers/net/ice/base/ice_flex_pipe.c\n@@ -1580,18 +1580,13 @@ ice_get_sw_fv_bitmap(struct ice_hw *hw, enum ice_prof_type req_profs,\n \tstruct ice_seg *ice_seg;\n \tstruct ice_fv *fv;\n \n-\tice_memset(&state, 0, sizeof(state), ICE_NONDMA_MEM);\n-\n \tif (req_profs == ICE_PROF_ALL) {\n-\t\tu16 i;\n-\n-\t\tfor (i = 0; i < ICE_MAX_NUM_PROFILES; i++)\n-\t\t\tice_set_bit(i, bm);\n+\t\tice_bitmap_set(bm, 0, ICE_MAX_NUM_PROFILES);\n \t\treturn;\n \t}\n \n+\tice_memset(&state, 0, sizeof(state), ICE_NONDMA_MEM);\n \tice_zero_bitmap(bm, ICE_MAX_NUM_PROFILES);\n-\n \tice_seg = hw->seg;\n \tdo {\n \t\tenum ice_prof_type prof_type;\ndiff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c\nindex 858a73222..41ebfedc6 100644\n--- a/drivers/net/ice/base/ice_switch.c\n+++ b/drivers/net/ice/base/ice_switch.c\n@@ -5940,8 +5940,7 @@ ice_find_free_recp_res_idx(struct ice_hw *hw, const ice_bitmap_t *profiles,\n \tice_zero_bitmap(used_idx, ICE_MAX_FV_WORDS);\n \tice_zero_bitmap(free_idx, ICE_MAX_FV_WORDS);\n \n-\tfor (count = 0; count < ICE_MAX_FV_WORDS; count++)\n-\t\tice_set_bit(count, possible_idx);\n+\tice_bitmap_set(possible_idx, 0, ICE_MAX_FV_WORDS);\n \n \t/* For each profile we are going to associate the recipe with, add the\n \t * recipes that are associated with that profile. This will give us\n",
    "prefixes": [
        "v2",
        "10/40"
    ]
}