get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 30588,
    "url": "http://patches.dpdk.org/api/patches/30588/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/e8d03f676b83a4e380f5890c6984f96ca4085648.1508417257.git.nelio.laranjeiro@6wind.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": "<e8d03f676b83a4e380f5890c6984f96ca4085648.1508417257.git.nelio.laranjeiro@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/e8d03f676b83a4e380f5890c6984f96ca4085648.1508417257.git.nelio.laranjeiro@6wind.com",
    "date": "2017-10-19T12:51:34",
    "name": "[dpdk-dev,6/6] net/mlx5: fix allmulti mode",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "1728b5501a146052403d159c3ab7242687db30ba",
    "submitter": {
        "id": 243,
        "url": "http://patches.dpdk.org/api/people/243/?format=api",
        "name": "Nélio Laranjeiro",
        "email": "nelio.laranjeiro@6wind.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/e8d03f676b83a4e380f5890c6984f96ca4085648.1508417257.git.nelio.laranjeiro@6wind.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/30588/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/30588/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 1B6641B222;\n\tThu, 19 Oct 2017 14:52:02 +0200 (CEST)",
            "from mail-wm0-f68.google.com (mail-wm0-f68.google.com\n\t[74.125.82.68]) by dpdk.org (Postfix) with ESMTP id 7636A1B202\n\tfor <dev@dpdk.org>; Thu, 19 Oct 2017 14:51:55 +0200 (CEST)",
            "by mail-wm0-f68.google.com with SMTP id k4so16203917wmc.1\n\tfor <dev@dpdk.org>; Thu, 19 Oct 2017 05:51:55 -0700 (PDT)",
            "from laranjeiro-vm.dev.6wind.com.\n\t(host.78.145.23.62.rev.coltfrance.com. [62.23.145.78])\n\tby smtp.gmail.com with ESMTPSA id\n\t69sm1024189wmp.11.2017.10.19.05.51.54\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 19 Oct 2017 05:51:54 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=6wind-com.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:in-reply-to:references;\n\tbh=BDyVKTaoYPfMcvpb71yHRYRzALYmNxJuGN6VxmuioB8=;\n\tb=ah+4LHCfBZM9z3MXDTeIwHh8Ggfqxm64ohJ5qxY3Z8UJeNkHq9a8TJHDAqO819YOYN\n\tOue8E9kQzJpeMDLT9dvoijrr6Otl+yD8HwRiKqQ75d2XTkxYLhm+UcAXG6VAIk7GtcMt\n\tPHaI68HCeZKWwHSpstkwMq21S6Uak44ALopgZOWSvbAvbMHnvZhG7GJ97v3WK5vpIQMh\n\tRWFD3Ib0vnsy0MHycfN2ZZHY63WNilf+g9EaWozuIJSDf7OCxU6e0gzCSUAx+WrOOZXW\n\t2ebqw4QrdRUcUohRTnKAks1G+DDGNMUhGEQyEW/+FbQvtgdEiST+nVkuxvLeb6VwWXK4\n\tD+yQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:in-reply-to:references;\n\tbh=BDyVKTaoYPfMcvpb71yHRYRzALYmNxJuGN6VxmuioB8=;\n\tb=HY5Q+E3CqlobHStxE+j+iLprp+iWlaz2wnm5jBduf6zyivP1U2UH83omCZ/Nq7KKtM\n\tbiJv3fZVQnojrXcRwB5cPwi0NP/mvZagbgya2IHpcQfv3gJEDOn7UIfW4WLpOQkvmfNR\n\t9ANla2fTshzlaMyrCU8V7NCu4pPtIjhimevsicWDvCP0vLrwnkhs1SWkitOI884iim+K\n\tMK9jIiD8EpyDnQKsw/gP/9bCPKjL7F5/HVT8lCMvfDfyjY70CcAJ/7xcsne0mmhKERy1\n\t6agKpE3AhgeziFIkece+bRLUaX25//SeAQVr0KRb24hv0lUD/W9MgsCtRkT4c6vf89vD\n\tbI3A==",
        "X-Gm-Message-State": "AMCzsaUOI0Ue6O6QGp0tVWyuVRTc/zHf54vSFiCGAT3m9viuL3AWydyr\n\tKPzx9UC4DeLXyDmxgJ6jYYlTYDQ5Sg==",
        "X-Google-Smtp-Source": "ABhQp+QUGTNadewy9jwY8OpAB3OxNOu5EkemeS+mcUasEKSUbVaVARoK1qmKp0VpKTBhLz9M0MbgKA==",
        "X-Received": "by 10.28.66.215 with SMTP id k84mr1729871wmi.143.1508417514913; \n\tThu, 19 Oct 2017 05:51:54 -0700 (PDT)",
        "From": "Nelio Laranjeiro <nelio.laranjeiro@6wind.com>",
        "To": "dev@dpdk.org",
        "Cc": "Yongseok Koh <yskoh@mellanox.com>,\n\tAdrien Mazarguil <adrien.mazarguil@6wind.com>",
        "Date": "Thu, 19 Oct 2017 14:51:34 +0200",
        "Message-Id": "<e8d03f676b83a4e380f5890c6984f96ca4085648.1508417257.git.nelio.laranjeiro@6wind.com>",
        "X-Mailer": "git-send-email 2.11.0",
        "In-Reply-To": [
            "<cover.1508417257.git.nelio.laranjeiro@6wind.com>",
            "<cover.1508417257.git.nelio.laranjeiro@6wind.com>"
        ],
        "References": [
            "<cover.1508417257.git.nelio.laranjeiro@6wind.com>",
            "<cover.1508417257.git.nelio.laranjeiro@6wind.com>"
        ],
        "Subject": "[dpdk-dev] [PATCH 6/6] net/mlx5: fix allmulti mode",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "All multi is not adding unicast flows which cause unicast packets to be\ndropped by the NIC.\n\nFixes: 6a6b6828fe6a (\"net/mlx5: use flow to enable all multi mode\")\n\nSigned-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>\n---\n drivers/net/mlx5/mlx5_trigger.c | 131 ++++++++++++++++++++--------------------\n 1 file changed, 66 insertions(+), 65 deletions(-)",
    "diff": "diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c\nindex 29167badd..edbed2f99 100644\n--- a/drivers/net/mlx5/mlx5_trigger.c\n+++ b/drivers/net/mlx5/mlx5_trigger.c\n@@ -251,6 +251,30 @@ mlx5_dev_stop(struct rte_eth_dev *dev)\n int\n priv_dev_traffic_enable(struct priv *priv, struct rte_eth_dev *dev)\n {\n+\tstruct rte_flow_item_eth bcast = {\n+\t\t.dst.addr_bytes = \"\\xff\\xff\\xff\\xff\\xff\\xff\",\n+\t};\n+\tstruct rte_flow_item_eth ipv6_multi_spec = {\n+\t\t.dst.addr_bytes = \"\\x33\\x33\\x00\\x00\\x00\\x00\",\n+\t};\n+\tstruct rte_flow_item_eth ipv6_multi_mask = {\n+\t\t.dst.addr_bytes = \"\\xff\\xff\\x00\\x00\\x00\\x00\",\n+\t};\n+\tstruct rte_flow_item_eth unicast = {\n+\t\t.src.addr_bytes = \"\\x00\\x00\\x00\\x00\\x00\\x00\",\n+\t};\n+\tstruct rte_flow_item_eth unicast_mask = {\n+\t\t.dst.addr_bytes = \"\\xff\\xff\\xff\\xff\\xff\\xff\",\n+\t};\n+\tconst unsigned int vlan_filter_n = priv->vlan_filter_n;\n+\tconst struct ether_addr cmp = {\n+\t\t.addr_bytes = \"\\x00\\x00\\x00\\x00\\x00\\x00\",\n+\t};\n+\tunsigned int i;\n+\tunsigned int j;\n+\tunsigned int unicast_flow = 0;\n+\tint ret;\n+\n \tif (priv->isolated)\n \t\treturn 0;\n \tif (dev->data->promiscuous) {\n@@ -261,82 +285,59 @@ priv_dev_traffic_enable(struct priv *priv, struct rte_eth_dev *dev)\n \t\t};\n \n \t\tclaim_zero(mlx5_ctrl_flow(dev, &promisc, &promisc));\n-\t} else if (dev->data->all_multicast) {\n+\t\treturn 0;\n+\t}\n+\tif (dev->data->all_multicast) {\n \t\tstruct rte_flow_item_eth multicast = {\n \t\t\t.dst.addr_bytes = \"\\x01\\x00\\x00\\x00\\x00\\x00\",\n-\t\t\t.src.addr_bytes = \"\\x01\\x00\\x00\\x00\\x00\\x00\",\n+\t\t\t.src.addr_bytes = \"\\x00\\x00\\x00\\x00\\x00\\x00\",\n \t\t\t.type = 0,\n \t\t};\n \n \t\tclaim_zero(mlx5_ctrl_flow(dev, &multicast, &multicast));\n-\t} else {\n-\t\tstruct rte_flow_item_eth bcast = {\n-\t\t\t.dst.addr_bytes = \"\\xff\\xff\\xff\\xff\\xff\\xff\",\n-\t\t};\n-\t\tstruct rte_flow_item_eth ipv6_multi_spec = {\n-\t\t\t.dst.addr_bytes = \"\\x33\\x33\\x00\\x00\\x00\\x00\",\n-\t\t};\n-\t\tstruct rte_flow_item_eth ipv6_multi_mask = {\n-\t\t\t.dst.addr_bytes = \"\\xff\\xff\\x00\\x00\\x00\\x00\",\n-\t\t};\n-\t\tstruct rte_flow_item_eth unicast = {\n-\t\t\t.src.addr_bytes = \"\\x00\\x00\\x00\\x00\\x00\\x00\",\n-\t\t};\n-\t\tstruct rte_flow_item_eth unicast_mask = {\n-\t\t\t.dst.addr_bytes = \"\\xff\\xff\\xff\\xff\\xff\\xff\",\n-\t\t};\n-\t\tconst unsigned int vlan_filter_n = priv->vlan_filter_n;\n-\t\tconst struct ether_addr cmp = {\n-\t\t\t.addr_bytes = \"\\x00\\x00\\x00\\x00\\x00\\x00\",\n-\t\t};\n-\t\tunsigned int i;\n-\t\tunsigned int j;\n-\t\tunsigned int unicast_flow = 0;\n-\t\tint ret;\n-\n-\t\tfor (i = 0; i != MLX5_MAX_MAC_ADDRESSES; ++i) {\n-\t\t\tstruct ether_addr *mac = &dev->data->mac_addrs[i];\n+\t}\n+\tfor (i = 0; i != MLX5_MAX_MAC_ADDRESSES; ++i) {\n+\t\tstruct ether_addr *mac = &dev->data->mac_addrs[i];\n \n-\t\t\tif (!memcmp(mac, &cmp, sizeof(*mac)))\n-\t\t\t\tcontinue;\n-\t\t\tmemcpy(&unicast.dst.addr_bytes,\n-\t\t\t       mac->addr_bytes,\n-\t\t\t       ETHER_ADDR_LEN);\n-\t\t\tfor (j = 0; j != vlan_filter_n; ++j) {\n-\t\t\t\tuint16_t vlan = priv->vlan_filter[j];\n+\t\tif (!memcmp(mac, &cmp, sizeof(*mac)))\n+\t\t\tcontinue;\n+\t\tmemcpy(&unicast.dst.addr_bytes,\n+\t\t       mac->addr_bytes,\n+\t\t       ETHER_ADDR_LEN);\n+\t\tfor (j = 0; j != vlan_filter_n; ++j) {\n+\t\t\tuint16_t vlan = priv->vlan_filter[j];\n \n-\t\t\t\tstruct rte_flow_item_vlan vlan_spec = {\n-\t\t\t\t\t.tci = rte_cpu_to_be_16(vlan),\n-\t\t\t\t};\n-\t\t\t\tstruct rte_flow_item_vlan vlan_mask = {\n-\t\t\t\t\t.tci = 0xffff,\n-\t\t\t\t};\n+\t\t\tstruct rte_flow_item_vlan vlan_spec = {\n+\t\t\t\t.tci = rte_cpu_to_be_16(vlan),\n+\t\t\t};\n+\t\t\tstruct rte_flow_item_vlan vlan_mask = {\n+\t\t\t\t.tci = 0xffff,\n+\t\t\t};\n \n-\t\t\t\tret = mlx5_ctrl_flow_vlan(dev, &unicast,\n-\t\t\t\t\t\t\t  &unicast_mask,\n-\t\t\t\t\t\t\t  &vlan_spec,\n-\t\t\t\t\t\t\t  &vlan_mask);\n-\t\t\t\tif (ret)\n-\t\t\t\t\tgoto error;\n-\t\t\t\tunicast_flow = 1;\n-\t\t\t}\n-\t\t\tif (!vlan_filter_n) {\n-\t\t\t\tret = mlx5_ctrl_flow(dev, &unicast,\n-\t\t\t\t\t\t     &unicast_mask);\n-\t\t\t\tif (ret)\n-\t\t\t\t\tgoto error;\n-\t\t\t\tunicast_flow = 1;\n-\t\t\t}\n+\t\t\tret = mlx5_ctrl_flow_vlan(dev, &unicast,\n+\t\t\t\t\t\t  &unicast_mask,\n+\t\t\t\t\t\t  &vlan_spec,\n+\t\t\t\t\t\t  &vlan_mask);\n+\t\t\tif (ret)\n+\t\t\t\tgoto error;\n+\t\t\tunicast_flow = 1;\n+\t\t}\n+\t\tif (!vlan_filter_n) {\n+\t\t\tret = mlx5_ctrl_flow(dev, &unicast,\n+\t\t\t\t\t     &unicast_mask);\n+\t\t\tif (ret)\n+\t\t\t\tgoto error;\n+\t\t\tunicast_flow = 1;\n \t\t}\n-\t\tif (!unicast_flow)\n-\t\t\treturn 0;\n-\t\tret = mlx5_ctrl_flow(dev, &bcast, &bcast);\n-\t\tif (ret)\n-\t\t\tgoto error;\n-\t\tret = mlx5_ctrl_flow(dev, &ipv6_multi_spec, &ipv6_multi_mask);\n-\t\tif (ret)\n-\t\t\tgoto error;\n \t}\n+\tif (!unicast_flow)\n+\t\treturn 0;\n+\tret = mlx5_ctrl_flow(dev, &bcast, &bcast);\n+\tif (ret)\n+\t\tgoto error;\n+\tret = mlx5_ctrl_flow(dev, &ipv6_multi_spec, &ipv6_multi_mask);\n+\tif (ret)\n+\t\tgoto error;\n \treturn 0;\n error:\n \treturn rte_errno;\n",
    "prefixes": [
        "dpdk-dev",
        "6/6"
    ]
}