get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 64292,
    "url": "http://patches.dpdk.org/api/patches/64292/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/57bc3225d6cc2dfa0423a86d8ca99aab4ab39e55.1578497959.git.dekelp@mellanox.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": "<57bc3225d6cc2dfa0423a86d8ca99aab4ab39e55.1578497959.git.dekelp@mellanox.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/57bc3225d6cc2dfa0423a86d8ca99aab4ab39e55.1578497959.git.dekelp@mellanox.com",
    "date": "2020-01-08T15:44:23",
    "name": "net/mlx5: fix set Rx hash fields only if needed",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "0a90316824259e27a076cfda9345ff43cbf640f3",
    "submitter": {
        "id": 1082,
        "url": "http://patches.dpdk.org/api/people/1082/?format=api",
        "name": "Dekel Peled",
        "email": "dekelp@mellanox.com"
    },
    "delegate": {
        "id": 3268,
        "url": "http://patches.dpdk.org/api/users/3268/?format=api",
        "username": "rasland",
        "first_name": "Raslan",
        "last_name": "Darawsheh",
        "email": "rasland@nvidia.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/57bc3225d6cc2dfa0423a86d8ca99aab4ab39e55.1578497959.git.dekelp@mellanox.com/mbox/",
    "series": [
        {
            "id": 8019,
            "url": "http://patches.dpdk.org/api/series/8019/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8019",
            "date": "2020-01-08T15:44:23",
            "name": "net/mlx5: fix set Rx hash fields only if needed",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/8019/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/64292/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/64292/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 5CD20A04F3;\n\tWed,  8 Jan 2020 16:45:36 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 98B161DA8C;\n\tWed,  8 Jan 2020 16:45:35 +0100 (CET)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id 107021DA89\n for <dev@dpdk.org>; Wed,  8 Jan 2020 16:45:33 +0100 (CET)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n dekelp@mellanox.com)\n with ESMTPS (AES256-SHA encrypted); 8 Jan 2020 17:45:30 +0200",
            "from mtl-vdi-280.wap.labs.mlnx. (mtl-vdi-280.wap.labs.mlnx\n [10.128.130.87])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 008FjUnR022245;\n Wed, 8 Jan 2020 17:45:30 +0200"
        ],
        "From": "Dekel Peled <dekelp@mellanox.com>",
        "To": "matan@mellanox.com, viacheslavo@mellanox.com",
        "Cc": "rasland@mellanox.com, orika@mellanox.com, dev@dpdk.org, stable@dpdk.org",
        "Date": "Wed,  8 Jan 2020 17:44:23 +0200",
        "Message-Id": "\n <57bc3225d6cc2dfa0423a86d8ca99aab4ab39e55.1578497959.git.dekelp@mellanox.com>",
        "X-Mailer": "git-send-email 1.7.1",
        "Subject": "[dpdk-dev] [PATCH] net/mlx5: fix set Rx hash fields only if needed",
        "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": "Previous fix added translation of Rx hash fields to PRM format.\n\nThis patch optimizes the fix, to perform value translation only\nif value is not zero.\nIn case value is zero, there is no need to translate it.\n\nFixes: 24753f9da454 (\"net/mlx5: fix setting of Rx hash fields\")\nCc: stable@dpdk.org\n\nSigned-off-by: Dekel Peled <dekelp@mellanox.com>\nAcked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>\n---\n drivers/net/mlx5/mlx5_rxq.c | 34 +++++++++++++++++++---------------\n 1 file changed, 19 insertions(+), 15 deletions(-)",
    "diff": "diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c\nindex ca25e32..c936a7f 100644\n--- a/drivers/net/mlx5/mlx5_rxq.c\n+++ b/drivers/net/mlx5/mlx5_rxq.c\n@@ -2460,7 +2460,6 @@ struct mlx5_hrxq *\n \t\t}\n \t} else { /* ind_tbl->type == MLX5_IND_TBL_TYPE_DEVX */\n \t\tstruct mlx5_devx_tir_attr tir_attr;\n-\t\tstruct mlx5_rx_hash_field_select *rx_hash_field_select;\n \t\tuint32_t i;\n \t\tuint32_t lro = 1;\n \n@@ -2474,23 +2473,27 @@ struct mlx5_hrxq *\n \t\tmemset(&tir_attr, 0, sizeof(tir_attr));\n \t\ttir_attr.disp_type = MLX5_TIRC_DISP_TYPE_INDIRECT;\n \t\ttir_attr.rx_hash_fn = MLX5_RX_HASH_FN_TOEPLITZ;\n-#ifdef HAVE_IBV_DEVICE_TUNNEL_SUPPORT\n \t\ttir_attr.tunneled_offload_en = !!tunnel;\n-\t\t/* Translate hash_fields bitmap to PRM format. */\n-\t\trx_hash_field_select = hash_fields & IBV_RX_HASH_INNER ?\n-\t\t\t\t       &tir_attr.rx_hash_field_selector_inner :\n-\t\t\t\t       &tir_attr.rx_hash_field_selector_outer;\n+\t\t/* If needed, translate hash_fields bitmap to PRM format. */\n+\t\tif (hash_fields) {\n+#ifdef HAVE_IBV_DEVICE_TUNNEL_SUPPORT\n+\t\t\tstruct mlx5_rx_hash_field_select *rx_hash_field_select =\n+\t\t\t\t\thash_fields & IBV_RX_HASH_INNER ?\n+\t\t\t\t\t&tir_attr.rx_hash_field_selector_inner :\n+\t\t\t\t\t&tir_attr.rx_hash_field_selector_outer;\n #else\n-\t\trx_hash_field_select = &tir_attr.rx_hash_field_selector_outer;\n+\t\t\tstruct mlx5_rx_hash_field_select *rx_hash_field_select =\n+\t\t\t\t\t&tir_attr.rx_hash_field_selector_outer;\n #endif\n-\t\t/* 1 bit: 0: IPv4, 1: IPv6. */\n-\t\trx_hash_field_select->l3_prot_type =\n-\t\t\t!!(hash_fields & MLX5_IPV6_IBV_RX_HASH);\n-\t\t/* 1 bit: 0: TCP, 1: UDP. */\n-\t\trx_hash_field_select->l4_prot_type =\n-\t\t\t!!(hash_fields & MLX5_UDP_IBV_RX_HASH);\n-\t\t/* Bitmask which sets which fields to use in RX Hash. */\n-\t\trx_hash_field_select->selected_fields =\n+\n+\t\t\t/* 1 bit: 0: IPv4, 1: IPv6. */\n+\t\t\trx_hash_field_select->l3_prot_type =\n+\t\t\t\t!!(hash_fields & MLX5_IPV6_IBV_RX_HASH);\n+\t\t\t/* 1 bit: 0: TCP, 1: UDP. */\n+\t\t\trx_hash_field_select->l4_prot_type =\n+\t\t\t\t!!(hash_fields & MLX5_UDP_IBV_RX_HASH);\n+\t\t\t/* Bitmask which sets which fields to use in RX Hash. */\n+\t\t\trx_hash_field_select->selected_fields =\n \t\t\t((!!(hash_fields & MLX5_L3_SRC_IBV_RX_HASH)) <<\n \t\t\t MLX5_RX_HASH_FIELD_SELECT_SELECTED_FIELDS_SRC_IP) |\n \t\t\t(!!(hash_fields & MLX5_L3_DST_IBV_RX_HASH)) <<\n@@ -2499,6 +2502,7 @@ struct mlx5_hrxq *\n \t\t\t MLX5_RX_HASH_FIELD_SELECT_SELECTED_FIELDS_L4_SPORT |\n \t\t\t(!!(hash_fields & MLX5_L4_DST_IBV_RX_HASH)) <<\n \t\t\t MLX5_RX_HASH_FIELD_SELECT_SELECTED_FIELDS_L4_DPORT;\n+\t\t}\n \t\tif (rxq_ctrl->obj->type == MLX5_RXQ_OBJ_TYPE_DEVX_HAIRPIN)\n \t\t\ttir_attr.transport_domain = priv->sh->td->id;\n \t\telse\n",
    "prefixes": []
}