get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 126980,
    "url": "http://patchwork.dpdk.org/api/patches/126980/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230518100452.2190793-1-psatheesh@marvell.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20230518100452.2190793-1-psatheesh@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230518100452.2190793-1-psatheesh@marvell.com",
    "date": "2023-05-18T10:04:51",
    "name": "[1/2] common/cnxk: fix setting channel mask for SDP interfaces",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "e3b19a67b872f53aad9c622a19c6c118c6d9e0be",
    "submitter": {
        "id": 1663,
        "url": "http://patchwork.dpdk.org/api/people/1663/?format=api",
        "name": "Satheesh Paul Antonysamy",
        "email": "psatheesh@marvell.com"
    },
    "delegate": {
        "id": 310,
        "url": "http://patchwork.dpdk.org/api/users/310/?format=api",
        "username": "jerin",
        "first_name": "Jerin",
        "last_name": "Jacob",
        "email": "jerinj@marvell.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20230518100452.2190793-1-psatheesh@marvell.com/mbox/",
    "series": [
        {
            "id": 28058,
            "url": "http://patchwork.dpdk.org/api/series/28058/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=28058",
            "date": "2023-05-18T10:04:51",
            "name": "[1/2] common/cnxk: fix setting channel mask for SDP interfaces",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/28058/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/126980/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/126980/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id A9EB142B3A;\n\tThu, 18 May 2023 12:05:11 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 8191140E25;\n\tThu, 18 May 2023 12:05:11 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173])\n by mails.dpdk.org (Postfix) with ESMTP id 7EE7B4014F;\n Thu, 18 May 2023 12:05:09 +0200 (CEST)",
            "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id\n 34I965dY024724; Thu, 18 May 2023 03:05:08 -0700",
            "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3qmyexbkcx-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Thu, 18 May 2023 03:05:08 -0700",
            "from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48;\n Thu, 18 May 2023 03:04:57 -0700",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend\n Transport; Thu, 18 May 2023 03:04:57 -0700",
            "from satheeshpaullabpc.. (unknown [10.28.34.33])\n by maili.marvell.com (Postfix) with ESMTP id BFB8A3F708F;\n Thu, 18 May 2023 03:04:55 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : mime-version : content-transfer-encoding :\n content-type; s=pfpt0220; bh=tbLOhV/v0mEb87KMV9H4GEXcWlxvXp9+reHL2eiCXGg=;\n b=j/eTttVhqhOJm9xvCt755ErzowTOEOANQaYebdej1uaIh9WHMZag7rZofo5lN0lq/Lg9\n FgDkNz2obZcdRI74lR28fv4C/d2rBdIijCaSDeT4jmg/jIeKYr7Qxy2tghuypuXWO2Dg\n qeW94A7aP7oQ7Pw7c3X/Dtk8GmH/zlMmMD+T8BJRFpalV1eOBAsDjoWpyacSJ2ILaUtZ\n U/p1awtDRLXcVrR8Ub/4Hea7WyfJ1XCYcwP6ixSgbnHfzcx2MV8YNyxFf7ML9Uuzmjq9\n JeSMVQGNRdhYkj4COM8VSUnbi7bqW+a7t72iD/OYs/FBiFyZU17/7fISUYuN2jQu+CRt jQ==",
        "From": "<psatheesh@marvell.com>",
        "To": "Nithin Dabilpuram <ndabilpuram@marvell.com>, Kiran Kumar K\n <kirankumark@marvell.com>, Sunil Kumar Kori <skori@marvell.com>, Satha Rao\n <skoteshwar@marvell.com>",
        "CC": "<dev@dpdk.org>, Satheesh Paul <psatheesh@marvell.com>, <stable@dpdk.org>",
        "Subject": "[dpdk-dev] [PATCH 1/2] common/cnxk: fix setting channel mask for SDP\n interfaces",
        "Date": "Thu, 18 May 2023 15:34:51 +0530",
        "Message-ID": "<20230518100452.2190793-1-psatheesh@marvell.com>",
        "X-Mailer": "git-send-email 2.39.2",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-GUID": "WQX2JIngjT2iG_tEJdBL2290ZIZSQ3eM",
        "X-Proofpoint-ORIG-GUID": "WQX2JIngjT2iG_tEJdBL2290ZIZSQ3eM",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.170.22\n definitions=2023-05-18_07,2023-05-17_02,2023-02-09_01",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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"
    },
    "content": "From: Satheesh Paul <psatheesh@marvell.com>\n\nChannel mask for SDP interfaces are by default set to\na constant value. Fix this by setting mask calculated\nfrom the channel base and channel count configured in\nNIX LF.\n\nFixes: f13756633330 (\"common/cnxk: support setting channel mask for SDP interfaces\")\nCc: stable@dpdk.org\n\nSigned-off-by: Satheesh Paul <psatheesh@marvell.com>\nReviewed-by: Kiran Kumar K <kirankumark@marvell.com>\n---\n drivers/common/cnxk/roc_npc.c | 40 ++++++++++++++++++++++++++---------\n 1 file changed, 30 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/drivers/common/cnxk/roc_npc.c b/drivers/common/cnxk/roc_npc.c\nindex ba75207955..d556b4c3a5 100644\n--- a/drivers/common/cnxk/roc_npc.c\n+++ b/drivers/common/cnxk/roc_npc.c\n@@ -1388,12 +1388,39 @@ npc_inline_dev_ipsec_action_free(struct npc *npc, struct roc_npc_flow *flow)\n \treturn 1;\n }\n \n+static void\n+roc_npc_sdp_channel_get(struct roc_npc *roc_npc, uint16_t *chan_base, uint16_t *chan_mask)\n+{\n+\tstruct roc_nix *roc_nix = roc_npc->roc_nix;\n+\tstruct nix *nix = roc_nix_to_nix_priv(roc_nix);\n+\tuint16_t num_chan, range, num_bits = 0;\n+\tuint16_t mask = 0;\n+\n+\t*chan_base = nix->rx_chan_base;\n+\tnum_chan = nix->rx_chan_cnt - 1;\n+\tif (num_chan) {\n+\t\trange = *chan_base ^ (*chan_base + num_chan);\n+\t\tnum_bits = (sizeof(uint32_t) * 8) - __builtin_clz(range) - 1;\n+\t\t/* Set mask for (15 - numbits) MSB bits */\n+\t\t*chan_mask = (uint16_t)~GENMASK(num_bits, 0);\n+\t} else {\n+\t\t*chan_mask = (uint16_t)GENMASK(15, 0);\n+\t}\n+\n+\tmask = (uint16_t)GENMASK(num_bits, 0);\n+\tif (mask > num_chan + 1)\n+\t\tplt_warn(\n+\t\t\t\"npc: SDP channel base:%x, channel count:%x. channel mask:%x covers more than channel count\",\n+\t\t\t*chan_base, nix->rx_chan_cnt, *chan_mask);\n+}\n+\n struct roc_npc_flow *\n roc_npc_flow_create(struct roc_npc *roc_npc, const struct roc_npc_attr *attr,\n \t\t    const struct roc_npc_item_info pattern[],\n \t\t    const struct roc_npc_action actions[], int *errcode)\n {\n \tstruct npc *npc = roc_npc_to_npc_priv(roc_npc);\n+\tuint16_t sdp_chan_base = 0, sdp_chan_mask = 0;\n \tstruct roc_npc_flow *flow, *flow_iter;\n \tstruct npc_parse_state parse_state;\n \tstruct npc_flow_list *list;\n@@ -1406,16 +1433,9 @@ roc_npc_flow_create(struct roc_npc *roc_npc, const struct roc_npc_attr *attr,\n \t\t\tnpc->sdp_channel = roc_npc->sdp_channel;\n \t\t\tnpc->sdp_channel_mask = roc_npc->sdp_channel_mask;\n \t\t} else {\n-\t\t\t/* By default set the channel and mask to cover\n-\t\t\t * the whole SDP channel range.\n-\t\t\t */\n-\t\t\tif (roc_model_is_cn10k()) {\n-\t\t\t\tnpc->sdp_channel = (uint16_t)CN10K_SDP_CH_START;\n-\t\t\t\tnpc->sdp_channel_mask = (uint16_t)CN10K_SDP_CH_MASK;\n-\t\t\t} else {\n-\t\t\t\tnpc->sdp_channel = (uint16_t)NIX_CHAN_SDP_CH_START;\n-\t\t\t\tnpc->sdp_channel_mask = (uint16_t)NIX_CHAN_SDP_CH_START;\n-\t\t\t}\n+\t\t\troc_npc_sdp_channel_get(roc_npc, &sdp_chan_base, &sdp_chan_mask);\n+\t\t\tnpc->sdp_channel = sdp_chan_base;\n+\t\t\tnpc->sdp_channel_mask = sdp_chan_mask;\n \t\t}\n \t}\n \n",
    "prefixes": [
        "1/2"
    ]
}