get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 27325,
    "url": "http://patches.dpdk.org/api/patches/27325/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/0ce4226fc8542df33039a93b04a6638d8f44d921.1501598384.git.adrien.mazarguil@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": "<0ce4226fc8542df33039a93b04a6638d8f44d921.1501598384.git.adrien.mazarguil@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/0ce4226fc8542df33039a93b04a6638d8f44d921.1501598384.git.adrien.mazarguil@6wind.com",
    "date": "2017-08-01T16:54:00",
    "name": "[dpdk-dev,v1,13/48] net/mlx4: drop MAC flows affecting all Rx queues",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "084575be5b52c9b850a2d4328b5404cc76281075",
    "submitter": {
        "id": 165,
        "url": "http://patches.dpdk.org/api/people/165/?format=api",
        "name": "Adrien Mazarguil",
        "email": "adrien.mazarguil@6wind.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/0ce4226fc8542df33039a93b04a6638d8f44d921.1501598384.git.adrien.mazarguil@6wind.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/27325/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/27325/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 38BB9A12A;\n\tTue,  1 Aug 2017 18:55:28 +0200 (CEST)",
            "from mail-wm0-f50.google.com (mail-wm0-f50.google.com\n\t[74.125.82.50]) by dpdk.org (Postfix) with ESMTP id 4A18CA0C0\n\tfor <dev@dpdk.org>; Tue,  1 Aug 2017 18:55:09 +0200 (CEST)",
            "by mail-wm0-f50.google.com with SMTP id t201so20374237wmt.0\n\tfor <dev@dpdk.org>; Tue, 01 Aug 2017 09:55:09 -0700 (PDT)",
            "from 6wind.com (host.78.145.23.62.rev.coltfrance.com.\n\t[62.23.145.78]) by smtp.gmail.com with ESMTPSA id\n\tp72sm16921464wmb.1.2017.08.01.09.55.07\n\tfor <dev@dpdk.org> (version=TLS1_2 cipher=AES128-SHA bits=128/128);\n\tTue, 01 Aug 2017 09:55:07 -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:subject:date:message-id:in-reply-to:references;\n\tbh=j3VEYiFsIAR6up3bjttygxYNByGItUJTsHnsplRK6l4=;\n\tb=cfAc7CBfeAPBlxuA9iRI1qm0cnvwz4OdXs+TYO0B/SC28G5wJhMK6aIdM70EVn85xi\n\tnfwi+mgj63RpDI5najiXKgWq8uHUlqeVbh/MzRtB1fqZIQNdRkG2mHe4f3lDZSpCxLlz\n\tfA/30t/Jk4zRYCCndj5qs+H4kt7zAvT49uYF/gUMzUj0JWqCeCjHqFraa1YwA/nmZrB0\n\ts0oOpq39q3VK7Sb+wLIE2AgzSbQFpcRLr7OHK13rY4X6S/SZyd6wSdAEuP7lr4l4Rbd6\n\tFStWqVtmVMz8FOwq0ELClkq0oQ/G3VvCMrHuYfrvltvcERZtTjnkYAQNwp5AXngN2FjR\n\tAr1Q==",
        "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:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=j3VEYiFsIAR6up3bjttygxYNByGItUJTsHnsplRK6l4=;\n\tb=BwzwV9wDHKLWBJ5AFnUKomy274qzvn9BhjX5IHXeX+hEcZaj/nHj8ts4jstU+WxO55\n\tHA1/AnO1XDwct9OzG0csTtFsl+JkoYbn5fOPSJCgCLxd47J3+AR/iE0JCX6KuErFt6mY\n\tHVeNs+NpxZ3yc4StAJO9zdlADKg7DOb/lQmX2TSmiApJKbuMtEA1+tiqAWn+63vhQnXb\n\tGkjcpcTO4Nok5HkDo5oo8uP6c0NuVV2vik7RvE70KIPCPoHiPRbouPEA4xHWD/RR5dt6\n\tuahRwgbDTvAnYRLzhqve33F0LBCSZDBvE0oKt+LpErYGk+v6Ux/D3BDH41WCCuIX2nMQ\n\t9FFQ==",
        "X-Gm-Message-State": "AIVw113iepwhUwZO7wPbupmZA/R6qUooc1l9teVYdb4HJiZ5E3DHj4ez\n\tmGHDgZDu4yCver4ktJQ=",
        "X-Received": "by 10.28.131.193 with SMTP id f184mr1992249wmd.117.1501606508535;\n\tTue, 01 Aug 2017 09:55:08 -0700 (PDT)",
        "From": "Adrien Mazarguil <adrien.mazarguil@6wind.com>",
        "To": "dev@dpdk.org",
        "Date": "Tue,  1 Aug 2017 18:54:00 +0200",
        "Message-Id": "<0ce4226fc8542df33039a93b04a6638d8f44d921.1501598384.git.adrien.mazarguil@6wind.com>",
        "X-Mailer": "git-send-email 2.1.4",
        "In-Reply-To": "<cover.1501598383.git.adrien.mazarguil@6wind.com>",
        "References": "<cover.1501598383.git.adrien.mazarguil@6wind.com>",
        "Subject": "[dpdk-dev] [PATCH v1 13/48] net/mlx4: drop MAC flows affecting all\n\tRx queues",
        "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": "Configuring several Rx queues enables RSS, which causes an additional\nspecial parent queue to be created to manage them.\n\nMAC flows are associated with the queue supposed to receive packets; either\nthe parent one in case of RSS or the single orphan otherwise.\n\nFor historical reasons the current implementation supports another scenario\nwith multiple orphans, in which case MAC flows are configured on all of\nthem. This is harmless but useless since it cannot happen.\n\nRemoving this feature allows dissociating the remaining MAC flow from Rx\nqueues and store it inside the private structure where it belongs.\n\nSigned-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>\n---\n drivers/net/mlx4/mlx4.c | 215 +++++++++++--------------------------------\n drivers/net/mlx4/mlx4.h |   2 +-\n 2 files changed, 57 insertions(+), 160 deletions(-)",
    "diff": "diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c\nindex dd42c96..c11e789 100644\n--- a/drivers/net/mlx4/mlx4.c\n+++ b/drivers/net/mlx4/mlx4.c\n@@ -515,6 +515,9 @@ rxq_setup(struct rte_eth_dev *dev, struct rxq *rxq, uint16_t desc,\n static void\n rxq_cleanup(struct rxq *rxq);\n \n+static void\n+priv_mac_addr_del(struct priv *priv);\n+\n /**\n  * Create RSS parent queue.\n  *\n@@ -641,6 +644,7 @@ dev_configure(struct rte_eth_dev *dev)\n \t\tfor (i = 0; (i != priv->rxqs_n); ++i)\n \t\t\tif ((*priv->rxqs)[i] != NULL)\n \t\t\t\treturn EINVAL;\n+\t\tpriv_mac_addr_del(priv);\n \t\tpriv_parent_list_cleanup(priv);\n \t\tpriv->rss = 0;\n \t\tpriv->rxqs_n = 0;\n@@ -2065,46 +2069,57 @@ rxq_free_elts(struct rxq *rxq)\n }\n \n /**\n- * Unregister a MAC address from a RX queue.\n+ * Unregister a MAC address.\n  *\n- * @param rxq\n- *   Pointer to RX queue structure.\n+ * @param priv\n+ *   Pointer to private structure.\n  */\n static void\n-rxq_mac_addr_del(struct rxq *rxq)\n+priv_mac_addr_del(struct priv *priv)\n {\n #ifndef NDEBUG\n-\tstruct priv *priv = rxq->priv;\n-\tconst uint8_t (*mac)[ETHER_ADDR_LEN] =\n-\t\t(const uint8_t (*)[ETHER_ADDR_LEN])\n-\t\tpriv->mac.addr_bytes;\n+\tuint8_t (*mac)[ETHER_ADDR_LEN] = &priv->mac.addr_bytes;\n #endif\n-\tif (!rxq->mac_flow)\n+\n+\tif (!priv->mac_flow)\n \t\treturn;\n \tDEBUG(\"%p: removing MAC address %02x:%02x:%02x:%02x:%02x:%02x\",\n-\t      (void *)rxq,\n+\t      (void *)priv,\n \t      (*mac)[0], (*mac)[1], (*mac)[2], (*mac)[3], (*mac)[4], (*mac)[5]);\n-\tclaim_zero(ibv_destroy_flow(rxq->mac_flow));\n-\trxq->mac_flow = NULL;\n+\tclaim_zero(ibv_destroy_flow(priv->mac_flow));\n+\tpriv->mac_flow = NULL;\n }\n \n /**\n- * Register a MAC address in a RX queue.\n+ * Register a MAC address.\n  *\n- * @param rxq\n- *   Pointer to RX queue structure.\n+ * In RSS mode, the MAC address is registered in the parent queue,\n+ * otherwise it is registered in queue 0.\n+ *\n+ * @param priv\n+ *   Pointer to private structure.\n  *\n  * @return\n  *   0 on success, errno value on failure.\n  */\n static int\n-rxq_mac_addr_add(struct rxq *rxq)\n+priv_mac_addr_add(struct priv *priv)\n {\n+\tuint8_t (*mac)[ETHER_ADDR_LEN] = &priv->mac.addr_bytes;\n+\tstruct rxq *rxq;\n \tstruct ibv_flow *flow;\n-\tstruct priv *priv = rxq->priv;\n-\tconst uint8_t (*mac)[ETHER_ADDR_LEN] =\n-\t\t\t(const uint8_t (*)[ETHER_ADDR_LEN])\n-\t\t\tpriv->mac.addr_bytes;\n+\n+\t/* If device isn't started, this is all we need to do. */\n+\tif (!priv->started)\n+\t\treturn 0;\n+\tif (priv->isolated)\n+\t\treturn 0;\n+\tif (priv->rss)\n+\t\trxq = LIST_FIRST(&priv->parents);\n+\telse if (*priv->rxqs && (*priv->rxqs)[0])\n+\t\trxq = (*priv->rxqs)[0];\n+\telse\n+\t\treturn 0;\n \n \t/* Allocate flow specification on the stack. */\n \tstruct __attribute__((packed)) {\n@@ -2114,8 +2129,8 @@ rxq_mac_addr_add(struct rxq *rxq)\n \tstruct ibv_flow_attr *attr = &data.attr;\n \tstruct ibv_flow_spec_eth *spec = &data.spec;\n \n-\tif (rxq->mac_flow)\n-\t\trxq_mac_addr_del(rxq);\n+\tif (priv->mac_flow)\n+\t\tpriv_mac_addr_del(priv);\n \t/*\n \t * No padding must be inserted by the compiler between attr and spec.\n \t * This layout is expected by libibverbs.\n@@ -2142,7 +2157,7 @@ rxq_mac_addr_add(struct rxq *rxq)\n \t\t}\n \t};\n \tDEBUG(\"%p: adding MAC address %02x:%02x:%02x:%02x:%02x:%02x\",\n-\t      (void *)rxq,\n+\t      (void *)priv,\n \t      (*mac)[0], (*mac)[1], (*mac)[2], (*mac)[3], (*mac)[4], (*mac)[5]);\n \t/* Create related flow. */\n \terrno = 0;\n@@ -2156,60 +2171,8 @@ rxq_mac_addr_add(struct rxq *rxq)\n \t\t\treturn errno;\n \t\treturn EINVAL;\n \t}\n-\tassert(rxq->mac_flow == NULL);\n-\trxq->mac_flow = flow;\n-\treturn 0;\n-}\n-\n-/**\n- * Register a MAC address.\n- *\n- * In RSS mode, the MAC address is registered in the parent queue,\n- * otherwise it is registered in each queue directly.\n- *\n- * @param priv\n- *   Pointer to private structure.\n- * @param mac\n- *   MAC address to register.\n- *\n- * @return\n- *   0 on success, errno value on failure.\n- */\n-static int\n-priv_mac_addr_add(struct priv *priv, const uint8_t (*mac)[ETHER_ADDR_LEN])\n-{\n-\tunsigned int i;\n-\tint ret;\n-\n-\tpriv->mac = (struct ether_addr){\n-\t\t{\n-\t\t\t(*mac)[0], (*mac)[1], (*mac)[2],\n-\t\t\t(*mac)[3], (*mac)[4], (*mac)[5]\n-\t\t}\n-\t};\n-\t/* If device isn't started, this is all we need to do. */\n-\tif (!priv->started) {\n-\t\tgoto end;\n-\t}\n-\tif (priv->rss) {\n-\t\tret = rxq_mac_addr_add(LIST_FIRST(&priv->parents));\n-\t\tif (ret)\n-\t\t\treturn ret;\n-\t\tgoto end;\n-\t}\n-\tfor (i = 0; (i != priv->rxqs_n); ++i) {\n-\t\tif ((*priv->rxqs)[i] == NULL)\n-\t\t\tcontinue;\n-\t\tret = rxq_mac_addr_add((*priv->rxqs)[i]);\n-\t\tif (!ret)\n-\t\t\tcontinue;\n-\t\t/* Failure, rollback. */\n-\t\twhile (i != 0)\n-\t\t\tif ((*priv->rxqs)[(--i)] != NULL)\n-\t\t\t\trxq_mac_addr_del((*priv->rxqs)[i]);\n-\t\treturn ret;\n-\t}\n-end:\n+\tassert(priv->mac_flow == NULL);\n+\tpriv->mac_flow = flow;\n \treturn 0;\n }\n \n@@ -2253,9 +2216,6 @@ rxq_cleanup(struct rxq *rxq)\n \t\t\t\t\t\trxq->if_cq,\n \t\t\t\t\t\t&params));\n \t}\n-\tif (rxq->qp != NULL && !rxq->priv->isolated) {\n-\t\trxq_mac_addr_del(rxq);\n-\t}\n \tif (rxq->qp != NULL)\n \t\tclaim_zero(ibv_destroy_qp(rxq->qp));\n \tif (rxq->cq != NULL)\n@@ -2894,12 +2854,6 @@ rxq_rehash(struct rte_eth_dev *dev, struct rxq *rxq)\n \t\tDEBUG(\"%p: nothing to do\", (void *)dev);\n \t\treturn 0;\n \t}\n-\t/* Remove attached flows if RSS is disabled (no parent queue). */\n-\tif (!priv->rss && !priv->isolated) {\n-\t\trxq_mac_addr_del(&tmpl);\n-\t\t/* Update original queue in case of failure. */\n-\t\trxq->mac_flow = NULL;\n-\t}\n \t/* From now on, any failure will render the queue unusable.\n \t * Reinitialize QP. */\n \tif (!tmpl.qp)\n@@ -2933,12 +2887,6 @@ rxq_rehash(struct rte_eth_dev *dev, struct rxq *rxq)\n \t\tassert(err > 0);\n \t\treturn err;\n \t}\n-\t/* Reconfigure flows. Do not care for errors. */\n-\tif (!priv->rss && !priv->isolated) {\n-\t\trxq_mac_addr_add(&tmpl);\n-\t\t/* Update original queue in case of failure. */\n-\t\trxq->mac_flow = NULL;\n-\t}\n \t/* Allocate pool. */\n \tpool = rte_malloc(__func__, (mbuf_n * sizeof(*pool)), 0);\n \tif (pool == NULL) {\n@@ -3081,15 +3029,6 @@ rxq_create_qp(struct rxq *rxq,\n \t\t      strerror(ret));\n \t\treturn ret;\n \t}\n-\tif (!priv->isolated && (parent || !priv->rss)) {\n-\t\t/* Configure MAC and broadcast addresses. */\n-\t\tret = rxq_mac_addr_add(rxq);\n-\t\tif (ret) {\n-\t\t\tERROR(\"QP flow attachment failed: %s\",\n-\t\t\t      strerror(ret));\n-\t\t\treturn ret;\n-\t\t}\n-\t}\n \tif (!parent) {\n \t\tret = ibv_post_recv(rxq->qp,\n \t\t\t\t    (rxq->sp ?\n@@ -3359,6 +3298,8 @@ mlx4_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,\n \t\t\treturn -EEXIST;\n \t\t}\n \t\t(*priv->rxqs)[idx] = NULL;\n+\t\tif (idx == 0)\n+\t\t\tpriv_mac_addr_del(priv);\n \t\trxq_cleanup(rxq);\n \t} else {\n \t\trxq = rte_calloc_socket(\"RXQ\", 1, sizeof(*rxq), 0, socket);\n@@ -3418,6 +3359,8 @@ mlx4_rx_queue_release(void *dpdk_rxq)\n \t\t\tDEBUG(\"%p: removing RX queue %p from list\",\n \t\t\t      (void *)priv->dev, (void *)rxq);\n \t\t\t(*priv->rxqs)[i] = NULL;\n+\t\t\tif (i == 0)\n+\t\t\t\tpriv_mac_addr_del(priv);\n \t\t\tbreak;\n \t\t}\n \trxq_cleanup(rxq);\n@@ -3449,9 +3392,6 @@ static int\n mlx4_dev_start(struct rte_eth_dev *dev)\n {\n \tstruct priv *priv = dev->data->dev_private;\n-\tunsigned int i = 0;\n-\tunsigned int r;\n-\tstruct rxq *rxq;\n \tint ret;\n \n \tpriv_lock(priv);\n@@ -3461,28 +3401,9 @@ mlx4_dev_start(struct rte_eth_dev *dev)\n \t}\n \tDEBUG(\"%p: attaching configured flows to all RX queues\", (void *)dev);\n \tpriv->started = 1;\n-\tif (priv->isolated) {\n-\t\trxq = NULL;\n-\t\tr = 1;\n-\t} else if (priv->rss) {\n-\t\trxq = LIST_FIRST(&priv->parents);\n-\t\tr = 1;\n-\t} else {\n-\t\trxq = (*priv->rxqs)[0];\n-\t\tr = priv->rxqs_n;\n-\t}\n-\t/* Iterate only once when RSS is enabled. */\n-\tdo {\n-\t\t/* Ignore nonexistent RX queues. */\n-\t\tif (rxq == NULL)\n-\t\t\tcontinue;\n-\t\tret = rxq_mac_addr_add(rxq);\n-\t\tif (!ret)\n-\t\t\tcontinue;\n-\t\tWARN(\"%p: QP flow attachment failed: %s\",\n-\t\t     (void *)dev, strerror(ret));\n+\tret = priv_mac_addr_add(priv);\n+\tif (ret)\n \t\tgoto err;\n-\t} while ((--r) && ((rxq = (*priv->rxqs)[++i]), i));\n \tret = priv_dev_link_interrupt_handler_install(priv, dev);\n \tif (ret) {\n \t\tERROR(\"%p: LSC handler install failed\",\n@@ -3511,12 +3432,7 @@ mlx4_dev_start(struct rte_eth_dev *dev)\n \treturn 0;\n err:\n \t/* Rollback. */\n-\twhile (i != 0) {\n-\t\trxq = (*priv->rxqs)[i--];\n-\t\tif (rxq != NULL) {\n-\t\t\trxq_mac_addr_del(rxq);\n-\t\t}\n-\t}\n+\tpriv_mac_addr_del(priv);\n \tpriv->started = 0;\n \tpriv_unlock(priv);\n \treturn -ret;\n@@ -3534,9 +3450,6 @@ static void\n mlx4_dev_stop(struct rte_eth_dev *dev)\n {\n \tstruct priv *priv = dev->data->dev_private;\n-\tunsigned int i = 0;\n-\tunsigned int r;\n-\tstruct rxq *rxq;\n \n \tpriv_lock(priv);\n \tif (!priv->started) {\n@@ -3545,24 +3458,8 @@ mlx4_dev_stop(struct rte_eth_dev *dev)\n \t}\n \tDEBUG(\"%p: detaching flows from all RX queues\", (void *)dev);\n \tpriv->started = 0;\n-\tif (priv->isolated) {\n-\t\trxq = NULL;\n-\t\tr = 1;\n-\t} else if (priv->rss) {\n-\t\trxq = LIST_FIRST(&priv->parents);\n-\t\tr = 1;\n-\t} else {\n-\t\trxq = (*priv->rxqs)[0];\n-\t\tr = priv->rxqs_n;\n-\t}\n \tmlx4_priv_flow_stop(priv);\n-\t/* Iterate only once when RSS is enabled. */\n-\tdo {\n-\t\t/* Ignore nonexistent RX queues. */\n-\t\tif (rxq == NULL)\n-\t\t\tcontinue;\n-\t\trxq_mac_addr_del(rxq);\n-\t} while ((--r) && ((rxq = (*priv->rxqs)[++i]), i));\n+\tpriv_mac_addr_del(priv);\n \tpriv_unlock(priv);\n }\n \n@@ -3647,6 +3544,7 @@ mlx4_dev_close(struct rte_eth_dev *dev)\n \tDEBUG(\"%p: closing device \\\"%s\\\"\",\n \t      (void *)dev,\n \t      ((priv->ctx != NULL) ? priv->ctx->device->name : \"\"));\n+\tpriv_mac_addr_del(priv);\n \t/* Prevent crashes when queues are still in use. This is unfortunately\n \t * still required for DPDK 1.3 because some programs (such as testpmd)\n \t * never release them before closing the device. */\n@@ -4036,6 +3934,8 @@ mlx4_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)\n \t} else\n \t\tDEBUG(\"adapter port %u MTU set to %u\", priv->port, mtu);\n \tpriv->mtu = mtu;\n+\t/* Remove MAC flow. */\n+\tpriv_mac_addr_del(priv);\n \t/* Temporarily replace RX handler with a fake one, assuming it has not\n \t * been copied elsewhere. */\n \tdev->rx_pkt_burst = removed_rx_burst;\n@@ -4064,11 +3964,6 @@ mlx4_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)\n \t\t\t\trx_func = mlx4_rx_burst_sp;\n \t\t\tbreak;\n \t\t}\n-\t\t/* Reenable non-RSS queue attributes. No need to check\n-\t\t * for errors at this stage. */\n-\t\tif (!priv->rss && !priv->isolated) {\n-\t\t\trxq_mac_addr_add(rxq);\n-\t\t}\n \t\t/* Scattered burst function takes priority. */\n \t\tif (rxq->sp)\n \t\t\trx_func = mlx4_rx_burst_sp;\n@@ -4076,6 +3971,8 @@ mlx4_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)\n \t/* Burst functions can now be called again. */\n \trte_wmb();\n \tdev->rx_pkt_burst = rx_func;\n+\t/* Restore MAC flow. */\n+\tret = priv_mac_addr_add(priv);\n out:\n \tpriv_unlock(priv);\n \tassert(ret >= 0);\n@@ -5125,9 +5022,9 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)\n \t\t     mac.addr_bytes[2], mac.addr_bytes[3],\n \t\t     mac.addr_bytes[4], mac.addr_bytes[5]);\n \t\t/* Register MAC address. */\n-\t\tclaim_zero(priv_mac_addr_add(priv,\n-\t\t\t\t\t     (const uint8_t (*)[ETHER_ADDR_LEN])\n-\t\t\t\t\t     mac.addr_bytes));\n+\t\tpriv->mac = mac;\n+\t\tif (priv_mac_addr_add(priv))\n+\t\t\tgoto port_error;\n #ifndef NDEBUG\n \t\t{\n \t\t\tchar ifname[IF_NAMESIZE];\ndiff --git a/drivers/net/mlx4/mlx4.h b/drivers/net/mlx4/mlx4.h\nindex addc2d5..23ffc87 100644\n--- a/drivers/net/mlx4/mlx4.h\n+++ b/drivers/net/mlx4/mlx4.h\n@@ -166,7 +166,6 @@ struct rxq {\n \tstruct ibv_exp_qp_burst_family *if_qp; /* QP burst interface. */\n \tstruct ibv_exp_cq_family *if_cq; /* CQ interface. */\n \tstruct ibv_comp_channel *channel;\n-\tstruct ibv_flow *mac_flow; /* Flow associated with MAC address. */\n \tunsigned int port_id; /* Port ID for incoming packets. */\n \tunsigned int elts_n; /* (*elts)[] length. */\n \tunsigned int elts_head; /* Current index in (*elts)[]. */\n@@ -243,6 +242,7 @@ struct priv {\n \tstruct ibv_device_attr device_attr; /* Device properties. */\n \tstruct ibv_pd *pd; /* Protection Domain. */\n \tstruct ether_addr mac; /* MAC address. */\n+\tstruct ibv_flow *mac_flow; /* Flow associated with MAC address. */\n \t/* Device properties. */\n \tuint16_t mtu; /* Configured MTU. */\n \tuint8_t port; /* Physical port number. */\n",
    "prefixes": [
        "dpdk-dev",
        "v1",
        "13/48"
    ]
}