get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 57942,
    "url": "http://patches.dpdk.org/api/patches/57942/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190826105105.19121-42-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": "<20190826105105.19121-42-qi.z.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190826105105.19121-42-qi.z.zhang@intel.com",
    "date": "2019-08-26T10:50:43",
    "name": "[41/63] net/ice/base: move and add some help function and macros",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "fd4fc2217088d7ed4ccb8e54196aa13a73aec038",
    "submitter": {
        "id": 504,
        "url": "http://patches.dpdk.org/api/people/504/?format=api",
        "name": "Qi Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "http://patches.dpdk.org/api/users/1540/?format=api",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190826105105.19121-42-qi.z.zhang@intel.com/mbox/",
    "series": [
        {
            "id": 6119,
            "url": "http://patches.dpdk.org/api/series/6119/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=6119",
            "date": "2019-08-26T10:50:02",
            "name": "net/ice/base: update base code",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/6119/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/57942/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/57942/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 40F8A1C1DD;\n\tMon, 26 Aug 2019 12:50:52 +0200 (CEST)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id D5AE21C0D9\n\tfor <dev@dpdk.org>; Mon, 26 Aug 2019 12:49:40 +0200 (CEST)",
            "from orsmga003.jf.intel.com ([10.7.209.27])\n\tby orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t26 Aug 2019 03:49:40 -0700",
            "from dpdk51.sh.intel.com ([10.67.110.245])\n\tby orsmga003.jf.intel.com with ESMTP; 26 Aug 2019 03:49:38 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.64,431,1559545200\"; d=\"scan'208\";a=\"182402390\"",
        "From": "Qi Zhang <qi.z.zhang@intel.com>",
        "To": "wenzhuo.lu@intel.com,\n\tqiming.yang@intel.com",
        "Cc": "dev@dpdk.org, xiaolong.ye@intel.com, Qi Zhang <qi.z.zhang@intel.com>,\n\tBruce Allan <bruce.w.allan@intel.com>,\n\tPaul M Stillwell Jr <paul.m.stillwell.jr@intel.com>",
        "Date": "Mon, 26 Aug 2019 18:50:43 +0800",
        "Message-Id": "<20190826105105.19121-42-qi.z.zhang@intel.com>",
        "X-Mailer": "git-send-email 2.13.6",
        "In-Reply-To": "<20190826105105.19121-1-qi.z.zhang@intel.com>",
        "References": "<20190826105105.19121-1-qi.z.zhang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 41/63] net/ice/base: move and add some help\n\tfunction and macros",
        "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "ice_ilog2 computes the integer log base 2 of the value (0 is undefined)\nice_is_pow2 returns true if the value is a power of 2 (0 is not a power\nof 2).  Move the functions to ice_type.h and wrap them so that components\ncan strip or conditionally-compile out these implementations in lieu of\ntheir own via osdep/other.\nThe patch also add help macro ROUND_UP and IS_ETHER_ADDR_EQUAL.\n\nSigned-off-by: Bruce Allan <bruce.w.allan@intel.com>\nSigned-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\n---\n drivers/net/ice/base/ice_flow.c   |  9 ---------\n drivers/net/ice/base/ice_switch.c | 15 ---------------\n drivers/net/ice/base/ice_type.h   | 39 +++++++++++++++++++++++++++++++++++++++\n 3 files changed, 39 insertions(+), 24 deletions(-)",
    "diff": "diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c\nindex 9e93a1078..477cf5dfe 100644\n--- a/drivers/net/ice/base/ice_flow.c\n+++ b/drivers/net/ice/base/ice_flow.c\n@@ -360,15 +360,6 @@ struct ice_flow_prof_params {\n \tice_declare_bitmap(ptypes, ICE_FLOW_PTYPE_MAX);\n };\n \n-/**\n- * ice_is_pow2 - check if integer value is a power of 2\n- * @val: unsigned integer to be validated\n- */\n-static bool ice_is_pow2(u64 val)\n-{\n-\treturn (val && !(val & (val - 1)));\n-}\n-\n #define ICE_FLOW_SEG_HDRS_L2_MASK\t\\\n \t(ICE_FLOW_SEG_HDR_ETH | ICE_FLOW_SEG_HDR_VLAN)\n #define ICE_FLOW_SEG_HDRS_L3_MASK\t\\\ndiff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c\nindex b4f50e0e5..ef3a919ec 100644\n--- a/drivers/net/ice/base/ice_switch.c\n+++ b/drivers/net/ice/base/ice_switch.c\n@@ -1849,21 +1849,6 @@ static void ice_fill_sw_info(struct ice_hw *hw, struct ice_fltr_info *fi)\n }\n \n /**\n- * ice_ilog2 - Calculates integer log base 2 of a number\n- * @n: number on which to perform operation\n- */\n-static int ice_ilog2(u64 n)\n-{\n-\tint i;\n-\n-\tfor (i = 63; i >= 0; i--)\n-\t\tif (((u64)1 << i) & n)\n-\t\t\treturn i;\n-\n-\treturn -1;\n-}\n-\n-/**\n  * ice_fill_sw_rule - Helper function to fill switch rule structure\n  * @hw: pointer to the hardware structure\n  * @f_info: entry containing packet forwarding information\ndiff --git a/drivers/net/ice/base/ice_type.h b/drivers/net/ice/base/ice_type.h\nindex 541e29851..403fb7668 100644\n--- a/drivers/net/ice/base/ice_type.h\n+++ b/drivers/net/ice/base/ice_type.h\n@@ -22,6 +22,16 @@\n #define ICE_BYTES_PER_DWORD\t4\n #define ICE_MAX_TRAFFIC_CLASS\t8\n \n+/**\n+ * ROUND_UP - round up to next arbitrary multiple (not a power of 2)\n+ * @a: value to round up\n+ * @b: arbitrary multiple\n+ *\n+ * Round up to the next multiple of the arbitrary b.\n+ * Note, when b is a power of 2 use ICE_ALIGN() instead.\n+ */\n+#define ROUND_UP(a, b)\t((b) * DIVIDE_AND_ROUND_UP((a), (b)))\n+\n #define MIN_T(_t, _a, _b)\tmin((_t)(_a), (_t)(_b))\n \n #define IS_ASCII(_ch)\t((_ch) < 0x80)\n@@ -36,6 +46,30 @@\n #include \"ice_flex_type.h\"\n #include \"ice_protocol_type.h\"\n \n+/**\n+ * ice_is_pow2 - check if integer value is a power of 2\n+ * @val: unsigned integer to be validated\n+ */\n+static inline bool ice_is_pow2(u64 val)\n+{\n+\treturn (val && !(val & (val - 1)));\n+}\n+\n+/**\n+ * ice_ilog2 - Calculates integer log base 2 of a number\n+ * @n: number on which to perform operation\n+ */\n+static inline int ice_ilog2(u64 n)\n+{\n+\tint i;\n+\n+\tfor (i = 63; i >= 0; i--)\n+\t\tif (((u64)1 << i) & n)\n+\t\t\treturn i;\n+\n+\treturn -1;\n+}\n+\n static inline bool ice_is_tc_ena(ice_bitmap_t bitmap, u8 tc)\n {\n \treturn ice_is_bit_set(&bitmap, tc);\n@@ -104,6 +138,11 @@ static inline u32 ice_round_to_num(u32 N, u32 R)\n \n \n \n+#define IS_ETHER_ADDR_EQUAL(addr1, addr2) \\\n+\t(((bool)((((u16 *)(addr1))[0] == ((u16 *)(addr2))[0]))) && \\\n+\t ((bool)((((u16 *)(addr1))[1] == ((u16 *)(addr2))[1]))) && \\\n+\t ((bool)((((u16 *)(addr1))[2] == ((u16 *)(addr2))[2]))))\n+\n enum ice_aq_res_ids {\n \tICE_NVM_RES_ID = 1,\n \tICE_SPD_RES_ID,\n",
    "prefixes": [
        "41/63"
    ]
}