Show a patch.

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

{
    "id": 44107,
    "url": "http://patches.dpdk.org/api/patches/44107/?format=api",
    "web_url": "http://patches.dpdk.org/patch/44107/",
    "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"
    },
    "msgid": "<1535718368-15803-11-git-send-email-amo@semihalf.com>",
    "date": "2018-08-31T12:26:06",
    "name": "[v2,6/8] net/mvneta: add MAC filtering",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "5c7d37f7748cc424ad79b03c4a6226edbfcc89c1",
    "submitter": {
        "id": 1112,
        "url": "http://patches.dpdk.org/api/people/1112/?format=api",
        "name": "Andrzej Ostruszka",
        "email": "amo@semihalf.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@intel.com"
    },
    "mbox": "http://patches.dpdk.org/patch/44107/mbox/",
    "series": [
        {
            "id": 1131,
            "url": "http://patches.dpdk.org/api/series/1131/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1131",
            "date": "2018-08-31T12:25:56",
            "name": "Add Marvell NETA PMD",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/1131/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/44107/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/44107/checks/",
    "tags": {},
    "headers": {
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "X-Gm-Message-State": "APzg51Cd7AMMNcIodvwxOCkXTzu1RUxKY8NISfAA3d3607Q9eRfZZPJe\n\tse1RBCAleR/StkxemvYMg9ZCkv2b2XI=",
        "X-Google-Smtp-Source": "ANB0VdYVE3kh46cH4+6Nnv8EpafQfgHrpOnvdnsCWbdBavprbpLdRy2BBSTv2v+GogUUOU35NKZwuQ==",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "X-BeenThere": "dev@dpdk.org",
        "References": "<1535469030-18647-1-git-send-email-amo@semihalf.com>\n\t<1535718368-15803-1-git-send-email-amo@semihalf.com>",
        "Subject": "[dpdk-dev] [PATCH v2 6/8] net/mvneta: add MAC filtering",
        "Sender": "\"dev\" <dev-bounces@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 3CFB95F22;\n\tFri, 31 Aug 2018 14:26:34 +0200 (CEST)",
            "from mail-lj1-f193.google.com (mail-lj1-f193.google.com\n\t[209.85.208.193]) by dpdk.org (Postfix) with ESMTP id C237B5B16\n\tfor <dev@dpdk.org>; Fri, 31 Aug 2018 14:26:22 +0200 (CEST)",
            "by mail-lj1-f193.google.com with SMTP id y17-v6so9933121ljy.8\n\tfor <dev@dpdk.org>; Fri, 31 Aug 2018 05:26:22 -0700 (PDT)",
            "from amok.semihalf.local (31-172-191-173.noc.fibertech.net.pl.\n\t[31.172.191.173]) by smtp.googlemail.com with ESMTPSA id\n\tt4-v6sm1825422lfd.13.2018.08.31.05.26.21\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tFri, 31 Aug 2018 05:26:21 -0700 (PDT)"
        ],
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "X-Original-To": "patchwork@dpdk.org",
        "X-Mailer": "git-send-email 2.7.4",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "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;\n\tbh=zZUKuII3gZUqtcGWFIEmON5fwHH422k8MKD8drfQHNE=;\n\tb=B2hhdV/kEEYfJ9iwY9FiS3P4tEPkvS7dhlCVJNaW0kVRY8j0WxRT6UxQKAMbZ5CmvW\n\t6WCKIqz0KQnfbHpQeyz5xctEeEqrknwQmYtjlB2IQKJJDBOsfUcixQb3KTFY5Ewh0lDO\n\tu9x9aOsyxehJ2SFX7ac0AmgZW8hEl9ip560PZ7QX2zvoJjKxzLEtcPxoS+/a2TLgXLB8\n\tQ8fAv5dKOw0vTzvHMksJ5fJnWPuupz7nObpNwok3agMNOkwbDDSGCgmEyu5MRV1Bsfj3\n\tma8hZKnr48ctMHYU4A9lRnyhwu1asKcLAWHs2/kSkHvBN8hXtkSIl7/SqWkmsiKfR3jd\n\tUhJw==",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=semihalf-com.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=zZUKuII3gZUqtcGWFIEmON5fwHH422k8MKD8drfQHNE=;\n\tb=wLB/fM6w5jYLWnfJYlsIJaKzPwDyf7lEK4WfiW67qrslDZjjjjBAIWeEDfjnx0KNyQ\n\tGBPL4aQ0vQh6KO5A+kNj/aCa3/tQdsyf75iTDXPSNvVA6dgr3GtwoErWvGvXHzcPYNVr\n\tUejaiYsGP+rhc3q/b2SfSnoDP6RbNVpTT8eKmYFIZrmwQx1/K6ud/j4WPqYM6Uoh07QO\n\tCdsp5hK8i1DlNAVIYkUoVQs0tj2d9LE5lFvNxyIX/0orYdGgaRRRQhcauXAOBNBsoGH8\n\tIK1e/NU6cmqNq90RzrgzBxd2oRKTtGCQfiiYKz7yD7UYsA5L943F6w6c5G/b7DvsVaLB\n\tC8rA==",
        "Date": "Fri, 31 Aug 2018 14:26:06 +0200",
        "X-Received": "by 2002:a2e:2282:: with SMTP id\n\ti124-v6mr10772930lji.11.1535718382290; \n\tFri, 31 Aug 2018 05:26:22 -0700 (PDT)",
        "To": "dev@dpdk.org",
        "From": "Andrzej Ostruszka <amo@semihalf.com>",
        "In-Reply-To": "<1535718368-15803-1-git-send-email-amo@semihalf.com>",
        "Cc": "mw@semihalf.com, zr@semihalf.com, tdu@semihalf.com, nsamsono@marvell.com",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Message-Id": "<1535718368-15803-11-git-send-email-amo@semihalf.com>",
        "Return-Path": "<dev-bounces@dpdk.org>"
    },
    "content": "From: Zyta Szpak <zr@semihalf.com>\n\nAdd callbacks for adding/removing MAC addresses.\n\nSigned-off-by: Yelena Krivosheev <yelena@marvell.com>\nSigned-off-by: Natalie Samsonov <nsamsono@marvell.com>\nSigned-off-by: Zyta Szpak <zr@semihalf.com>\n---\n drivers/net/mvneta/mvneta_ethdev.c | 69 ++++++++++++++++++++++++++++++++++++++\n 1 file changed, 69 insertions(+)",
    "diff": "diff --git a/drivers/net/mvneta/mvneta_ethdev.c b/drivers/net/mvneta/mvneta_ethdev.c\nindex 68d363e..975375e 100644\n--- a/drivers/net/mvneta/mvneta_ethdev.c\n+++ b/drivers/net/mvneta/mvneta_ethdev.c\n@@ -1579,6 +1579,73 @@ mvneta_promiscuous_disable(struct rte_eth_dev *dev)\n }\n \n /**\n+ * DPDK callback to remove a MAC address.\n+ *\n+ * @param dev\n+ *   Pointer to Ethernet device structure.\n+ * @param index\n+ *   MAC address index.\n+ */\n+static void\n+mvneta_mac_addr_remove(struct rte_eth_dev *dev, uint32_t index)\n+{\n+\tstruct mvneta_priv *priv = dev->data->dev_private;\n+\tchar buf[ETHER_ADDR_FMT_SIZE];\n+\tint ret;\n+\n+\tif (!priv->ppio)\n+\t\treturn;\n+\n+\tret = neta_ppio_remove_mac_addr(priv->ppio,\n+\t\t\t\t       dev->data->mac_addrs[index].addr_bytes);\n+\tif (ret) {\n+\t\tether_format_addr(buf, sizeof(buf),\n+\t\t\t\t  &dev->data->mac_addrs[index]);\n+\t\tMVNETA_LOG(ERR, \"Failed to remove mac %s\", buf);\n+\t}\n+}\n+\n+/**\n+ * DPDK callback to add a MAC address.\n+ *\n+ * @param dev\n+ *   Pointer to Ethernet device structure.\n+ * @param mac_addr\n+ *   MAC address to register.\n+ * @param index\n+ *   MAC address index.\n+ * @param vmdq\n+ *   VMDq pool index to associate address with (unused).\n+ *\n+ * @return\n+ *   0 on success, negative error value otherwise.\n+ */\n+static int\n+mvneta_mac_addr_add(struct rte_eth_dev *dev, struct ether_addr *mac_addr,\n+\t\t  uint32_t index, uint32_t vmdq __rte_unused)\n+{\n+\tstruct mvneta_priv *priv = dev->data->dev_private;\n+\tchar buf[ETHER_ADDR_FMT_SIZE];\n+\tint ret;\n+\n+\tif (index == 0)\n+\t\t/* For setting index 0, mrvl_mac_addr_set() should be used.*/\n+\t\treturn -1;\n+\n+\tif (!priv->ppio)\n+\t\treturn 0;\n+\n+\tret = neta_ppio_add_mac_addr(priv->ppio, mac_addr->addr_bytes);\n+\tif (ret) {\n+\t\tether_format_addr(buf, sizeof(buf), mac_addr);\n+\t\tMVNETA_LOG(ERR, \"Failed to add mac %s\", buf);\n+\t\treturn -1;\n+\t}\n+\n+\treturn 0;\n+}\n+\n+/**\n  * DPDK callback to set the primary MAC address.\n  *\n  * @param dev\n@@ -1614,6 +1681,8 @@ static const struct eth_dev_ops mvneta_ops = {\n \t.link_update = mvneta_link_update,\n \t.promiscuous_enable = mvneta_promiscuous_enable,\n \t.promiscuous_disable = mvneta_promiscuous_disable,\n+\t.mac_addr_remove = mvneta_mac_addr_remove,\n+\t.mac_addr_add = mvneta_mac_addr_add,\n \t.mac_addr_set = mvneta_mac_addr_set,\n \t.mtu_set = mvneta_mtu_set,\n \t.dev_infos_get = mvneta_dev_infos_get,\n",
    "prefixes": [
        "v2",
        "6/8"
    ]
}