get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 94728,
    "url": "https://patches.dpdk.org/api/patches/94728/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210623044702.4240-33-ndabilpuram@marvell.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<20210623044702.4240-33-ndabilpuram@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210623044702.4240-33-ndabilpuram@marvell.com",
    "date": "2021-06-23T04:46:32",
    "name": "[v4,32/62] net/cnxk: add MAC address set ops",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "d113f0129175ab056479d4e6f6f962dd88492399",
    "submitter": {
        "id": 1202,
        "url": "https://patches.dpdk.org/api/people/1202/?format=api",
        "name": "Nithin Dabilpuram",
        "email": "ndabilpuram@marvell.com"
    },
    "delegate": {
        "id": 310,
        "url": "https://patches.dpdk.org/api/users/310/?format=api",
        "username": "jerin",
        "first_name": "Jerin",
        "last_name": "Jacob",
        "email": "jerinj@marvell.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20210623044702.4240-33-ndabilpuram@marvell.com/mbox/",
    "series": [
        {
            "id": 17449,
            "url": "https://patches.dpdk.org/api/series/17449/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=17449",
            "date": "2021-06-23T04:46:00",
            "name": "Marvell CNXK Ethdev Driver",
            "version": 4,
            "mbox": "https://patches.dpdk.org/series/17449/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/94728/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/94728/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 DA8FBA0C41;\n\tWed, 23 Jun 2021 06:51:06 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 56D8C410FC;\n\tWed, 23 Jun 2021 06:49:07 +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 C05D44117B\n for <dev@dpdk.org>; Wed, 23 Jun 2021 06:49:05 +0200 (CEST)",
            "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id\n 15N4k9oo025587 for <dev@dpdk.org>; Tue, 22 Jun 2021 21:49:05 -0700",
            "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0b-0016f401.pphosted.com with ESMTP id 39bptj1gqh-3\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Tue, 22 Jun 2021 21:49:05 -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.18;\n Tue, 22 Jun 2021 21:49:03 -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.18 via Frontend\n Transport; Tue, 22 Jun 2021 21:49:03 -0700",
            "from hyd1588t430.marvell.com (unknown [10.29.52.204])\n by maili.marvell.com (Postfix) with ESMTP id DC6D15B6947;\n Tue, 22 Jun 2021 21:49:00 -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 : in-reply-to : references : mime-version :\n content-type; s=pfpt0220; bh=znKvxQJGsgBYABnPdk/1UuihzkMWlLLY5ilkf2qae9Y=;\n b=MFZVtuUZRTJbQjYUWKNrBWkIobgAXw8wKiWoD07lEeBWIECGvaxEUXtViaCw09Eoivw9\n 1LKGu748dRvkhV3AZWvmKh9WKYK6HVPIEdPgmJVcc9QA0jVQ+WC0AwxbxHVoWVownaZ7\n M+yqdS7dbX96Y4IXSJ80LNafKNIJoR8ClFgjpelNT1bdPsHt+gDQEErF9FUpBMNxQvQ5\n Y7Hr8LQSEFjNcsDj7WbAWkhX07ZWk20pdR8Zw0ifyYokuSpSlOI/2blceU6wQ/bTIF4M\n 2SlFVycqdTgdUxrYbOwgiyXRGE102PulUmLJF4iNmv37Gqv2B5zG+bGU/oTcbr9QbO4Z zA==",
        "From": "Nithin Dabilpuram <ndabilpuram@marvell.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<jerinj@marvell.com>, <skori@marvell.com>, <skoteshwar@marvell.com>,\n <pbhagavatula@marvell.com>, <kirankumark@marvell.com>,\n <psatheesh@marvell.com>, <asekhar@marvell.com>, <hkalra@marvell.com>",
        "Date": "Wed, 23 Jun 2021 10:16:32 +0530",
        "Message-ID": "<20210623044702.4240-33-ndabilpuram@marvell.com>",
        "X-Mailer": "git-send-email 2.8.4",
        "In-Reply-To": "<20210623044702.4240-1-ndabilpuram@marvell.com>",
        "References": "<20210306153404.10781-1-ndabilpuram@marvell.com>\n <20210623044702.4240-1-ndabilpuram@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "dcUB0f3an9TpQ_dyqZv14PVfM_Wops4N",
        "X-Proofpoint-GUID": "dcUB0f3an9TpQ_dyqZv14PVfM_Wops4N",
        "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790\n definitions=2021-06-23_01:2021-06-22,\n 2021-06-23 signatures=0",
        "Subject": "[dpdk-dev] [PATCH v4 32/62] net/cnxk: add MAC address set ops",
        "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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "From: Sunil Kumar Kori <skori@marvell.com>\n\nDefault mac address set operation is implemented for\ncn9k and cn10k platforms.\n\nSigned-off-by: Sunil Kumar Kori <skori@marvell.com>\n---\n drivers/net/cnxk/cnxk_ethdev.c     |  1 +\n drivers/net/cnxk/cnxk_ethdev.h     |  2 ++\n drivers/net/cnxk/cnxk_ethdev_ops.c | 29 +++++++++++++++++++++++++++++\n 3 files changed, 32 insertions(+)",
    "diff": "diff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c\nindex d4587f0..58d2f7d 100644\n--- a/drivers/net/cnxk/cnxk_ethdev.c\n+++ b/drivers/net/cnxk/cnxk_ethdev.c\n@@ -1046,6 +1046,7 @@ cnxk_nix_dev_start(struct rte_eth_dev *eth_dev)\n \n /* CNXK platform independent eth dev ops */\n struct eth_dev_ops cnxk_eth_dev_ops = {\n+\t.mac_addr_set = cnxk_nix_mac_addr_set,\n \t.dev_infos_get = cnxk_nix_info_get,\n \t.link_update = cnxk_nix_link_update,\n \t.tx_queue_release = cnxk_nix_tx_queue_release,\ndiff --git a/drivers/net/cnxk/cnxk_ethdev.h b/drivers/net/cnxk/cnxk_ethdev.h\nindex 50c75e1..a5380a5 100644\n--- a/drivers/net/cnxk/cnxk_ethdev.h\n+++ b/drivers/net/cnxk/cnxk_ethdev.h\n@@ -218,6 +218,8 @@ extern struct eth_dev_ops cnxk_eth_dev_ops;\n int cnxk_nix_probe(struct rte_pci_driver *pci_drv,\n \t\t   struct rte_pci_device *pci_dev);\n int cnxk_nix_remove(struct rte_pci_device *pci_dev);\n+int cnxk_nix_mac_addr_set(struct rte_eth_dev *eth_dev,\n+\t\t\t  struct rte_ether_addr *addr);\n int cnxk_nix_info_get(struct rte_eth_dev *eth_dev,\n \t\t      struct rte_eth_dev_info *dev_info);\n int cnxk_nix_configure(struct rte_eth_dev *eth_dev);\ndiff --git a/drivers/net/cnxk/cnxk_ethdev_ops.c b/drivers/net/cnxk/cnxk_ethdev_ops.c\nindex 4a45956..87cf4ee 100644\n--- a/drivers/net/cnxk/cnxk_ethdev_ops.c\n+++ b/drivers/net/cnxk/cnxk_ethdev_ops.c\n@@ -69,3 +69,32 @@ cnxk_nix_info_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *devinfo)\n \t\t\t    RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP;\n \treturn 0;\n }\n+\n+int\n+cnxk_nix_mac_addr_set(struct rte_eth_dev *eth_dev, struct rte_ether_addr *addr)\n+{\n+\tstruct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);\n+\tstruct roc_nix *nix = &dev->nix;\n+\tint rc;\n+\n+\t/* Update mac address at NPC */\n+\trc = roc_nix_npc_mac_addr_set(nix, addr->addr_bytes);\n+\tif (rc)\n+\t\tgoto exit;\n+\n+\t/* Update mac address at CGX for PFs only */\n+\tif (!roc_nix_is_vf_or_sdp(nix)) {\n+\t\trc = roc_nix_mac_addr_set(nix, addr->addr_bytes);\n+\t\tif (rc) {\n+\t\t\t/* Rollback to previous mac address */\n+\t\t\troc_nix_npc_mac_addr_set(nix, dev->mac_addr);\n+\t\t\tgoto exit;\n+\t\t}\n+\t}\n+\n+\t/* Update mac address to cnxk ethernet device */\n+\trte_memcpy(dev->mac_addr, addr->addr_bytes, RTE_ETHER_ADDR_LEN);\n+\n+exit:\n+\treturn rc;\n+}\n",
    "prefixes": [
        "v4",
        "32/62"
    ]
}