get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 109358,
    "url": "https://patches.dpdk.org/api/patches/109358/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20220407105706.18889-7-kevinx.liu@intel.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": "<20220407105706.18889-7-kevinx.liu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220407105706.18889-7-kevinx.liu@intel.com",
    "date": "2022-04-07T10:56:33",
    "name": "[06/39] net/ice: support dcf promisc configuration",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "e0d3ef22ffea842bb95fe8781a653afb71ebce01",
    "submitter": {
        "id": 2440,
        "url": "https://patches.dpdk.org/api/people/2440/?format=api",
        "name": "Kevin Liu",
        "email": "kevinx.liu@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "https://patches.dpdk.org/api/users/1540/?format=api",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20220407105706.18889-7-kevinx.liu@intel.com/mbox/",
    "series": [
        {
            "id": 22387,
            "url": "https://patches.dpdk.org/api/series/22387/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=22387",
            "date": "2022-04-07T10:56:27",
            "name": "support full function of DCF",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/22387/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/109358/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/109358/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 4F5DAA0508;\n\tThu,  7 Apr 2022 04:58:43 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 113E642870;\n\tThu,  7 Apr 2022 04:58:31 +0200 (CEST)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n by mails.dpdk.org (Postfix) with ESMTP id 1CF9A42870\n for <dev@dpdk.org>; Thu,  7 Apr 2022 04:58:28 +0200 (CEST)",
            "from orsmga008.jf.intel.com ([10.7.209.65])\n by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 06 Apr 2022 19:58:28 -0700",
            "from intel-cd-odc-kevin.cd.intel.com ([10.240.178.195])\n by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 06 Apr 2022 19:58:25 -0700"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1649300309; x=1680836309;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=WOQHVMy6I/PNV1SH4Kmb0apkriJ+8tFdVGNa6R1TKVo=;\n b=O7NTBzxW23r6cJxED4GTgEiMoVwNtmXvq8lWCcd8fHap/UQgg9+tYYen\n AmNq+bnzPi5sCnV5JJs/gmJwMly8SOvjLiL2qGGFNBb+bpiOXvrZMVagL\n tC5fLacp3ISKfpVzgMTa6Qzh+9lxvVRhg2E9dmQdMdTlLgFC7xROafrb1\n xSaaLE6QZqaz55jzNe4D/q2A+jFhwLlh7SW3Xtp0fHRqxX2QiRLnG727H\n m9InubEeBE9LsbVnPLj3emLMPJrZdimjKocibp/MRZN0lL8kLl3BMFZlT\n zmRtU9AnkIEuXsA5gYOhtljoePHeLfZsS6CHH+HVDCbxoDc7dlZFvV71m g==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6200,9189,10309\"; a=\"248738333\"",
            "E=Sophos;i=\"5.90,241,1643702400\"; d=\"scan'208\";a=\"248738333\"",
            "E=Sophos;i=\"5.90,241,1643702400\"; d=\"scan'208\";a=\"570850478\""
        ],
        "From": "Kevin Liu <kevinx.liu@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "qiming.yang@intel.com, qi.z.zhang@intel.com, stevex.yang@intel.com,\n Alvin Zhang <alvinx.zhang@intel.com>, Kevin Liu <kevinx.liu@intel.com>",
        "Subject": "[PATCH 06/39] net/ice: support dcf promisc configuration",
        "Date": "Thu,  7 Apr 2022 10:56:33 +0000",
        "Message-Id": "<20220407105706.18889-7-kevinx.liu@intel.com>",
        "X-Mailer": "git-send-email 2.33.1",
        "In-Reply-To": "<20220407105706.18889-1-kevinx.liu@intel.com>",
        "References": "<20220407105706.18889-1-kevinx.liu@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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"
    },
    "content": "From: Alvin Zhang <alvinx.zhang@intel.com>\n\nSupport configuration of unicast and multicast promisc on dcf.\n\nSigned-off-by: Alvin Zhang <alvinx.zhang@intel.com>\nSigned-off-by: Kevin Liu <kevinx.liu@intel.com>\n---\n drivers/net/ice/ice_dcf_ethdev.c | 77 ++++++++++++++++++++++++++++++--\n drivers/net/ice/ice_dcf_ethdev.h |  3 ++\n 2 files changed, 76 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c\nindex 6a577a6582..87d281ee93 100644\n--- a/drivers/net/ice/ice_dcf_ethdev.c\n+++ b/drivers/net/ice/ice_dcf_ethdev.c\n@@ -727,27 +727,95 @@ ice_dcf_dev_info_get(struct rte_eth_dev *dev,\n }\n \n static int\n-ice_dcf_dev_promiscuous_enable(__rte_unused struct rte_eth_dev *dev)\n+dcf_config_promisc(struct ice_dcf_adapter *adapter,\n+\t\t   bool enable_unicast,\n+\t\t   bool enable_multicast)\n {\n+\tstruct ice_dcf_hw *hw = &adapter->real_hw;\n+\tstruct virtchnl_promisc_info promisc;\n+\tstruct dcf_virtchnl_cmd args;\n+\tint err;\n+\n+\tpromisc.flags = 0;\n+\tpromisc.vsi_id = hw->vsi_res->vsi_id;\n+\n+\tif (enable_unicast)\n+\t\tpromisc.flags |= FLAG_VF_UNICAST_PROMISC;\n+\n+\tif (enable_multicast)\n+\t\tpromisc.flags |= FLAG_VF_MULTICAST_PROMISC;\n+\n+\tmemset(&args, 0, sizeof(args));\n+\targs.v_op = VIRTCHNL_OP_CONFIG_PROMISCUOUS_MODE;\n+\targs.req_msg = (uint8_t *)&promisc;\n+\targs.req_msglen = sizeof(promisc);\n+\n+\terr = ice_dcf_execute_virtchnl_cmd(hw, &args);\n+\tif (err) {\n+\t\tPMD_DRV_LOG(ERR,\n+\t\t\t    \"fail to execute command VIRTCHNL_OP_CONFIG_PROMISCUOUS_MODE\");\n+\t\treturn err;\n+\t}\n+\n+\tadapter->promisc_unicast_enabled = enable_unicast;\n+\tadapter->promisc_multicast_enabled = enable_multicast;\n \treturn 0;\n }\n \n+static int\n+ice_dcf_dev_promiscuous_enable(__rte_unused struct rte_eth_dev *dev)\n+{\n+\tstruct ice_dcf_adapter *adapter = dev->data->dev_private;\n+\n+\tif (adapter->promisc_unicast_enabled) {\n+\t\tPMD_DRV_LOG(INFO, \"promiscuous has been enabled\");\n+\t\treturn 0;\n+\t}\n+\n+\treturn dcf_config_promisc(adapter, true,\n+\t\t\t\t  adapter->promisc_multicast_enabled);\n+}\n+\n static int\n ice_dcf_dev_promiscuous_disable(__rte_unused struct rte_eth_dev *dev)\n {\n-\treturn 0;\n+\tstruct ice_dcf_adapter *adapter = dev->data->dev_private;\n+\n+\tif (!adapter->promisc_unicast_enabled) {\n+\t\tPMD_DRV_LOG(INFO, \"promiscuous has been disabled\");\n+\t\treturn 0;\n+\t}\n+\n+\treturn dcf_config_promisc(adapter, false,\n+\t\t\t\t  adapter->promisc_multicast_enabled);\n }\n \n static int\n ice_dcf_dev_allmulticast_enable(__rte_unused struct rte_eth_dev *dev)\n {\n-\treturn 0;\n+\tstruct ice_dcf_adapter *adapter = dev->data->dev_private;\n+\n+\tif (adapter->promisc_multicast_enabled) {\n+\t\tPMD_DRV_LOG(INFO, \"allmulticast has been enabled\");\n+\t\treturn 0;\n+\t}\n+\n+\treturn dcf_config_promisc(adapter, adapter->promisc_unicast_enabled,\n+\t\t\t\t  true);\n }\n \n static int\n ice_dcf_dev_allmulticast_disable(__rte_unused struct rte_eth_dev *dev)\n {\n-\treturn 0;\n+\tstruct ice_dcf_adapter *adapter = dev->data->dev_private;\n+\n+\tif (!adapter->promisc_multicast_enabled) {\n+\t\tPMD_DRV_LOG(INFO, \"allmulticast has been disabled\");\n+\t\treturn 0;\n+\t}\n+\n+\treturn dcf_config_promisc(adapter, adapter->promisc_unicast_enabled,\n+\t\t\t\t  false);\n }\n \n static int\n@@ -1299,6 +1367,7 @@ ice_dcf_dev_init(struct rte_eth_dev *eth_dev)\n \t\treturn -1;\n \t}\n \n+\tdcf_config_promisc(adapter, false, false);\n \treturn 0;\n }\n \ndiff --git a/drivers/net/ice/ice_dcf_ethdev.h b/drivers/net/ice/ice_dcf_ethdev.h\nindex f2faf26f58..22e450527b 100644\n--- a/drivers/net/ice/ice_dcf_ethdev.h\n+++ b/drivers/net/ice/ice_dcf_ethdev.h\n@@ -33,6 +33,9 @@ struct ice_dcf_adapter {\n \tstruct ice_adapter parent; /* Must be first */\n \tstruct ice_dcf_hw real_hw;\n \n+\tbool promisc_unicast_enabled;\n+\tbool promisc_multicast_enabled;\n+\n \tint num_reprs;\n \tstruct ice_dcf_repr_info *repr_infos;\n };\n",
    "prefixes": [
        "06/39"
    ]
}