Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/77257/?format=api
http://patches.dpdk.org/api/patches/77257/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200911013038.19744-2-qi.z.zhang@intel.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": "<20200911013038.19744-2-qi.z.zhang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200911013038.19744-2-qi.z.zhang@intel.com", "date": "2020-09-11T01:30:34", "name": "[1/5] common/iavf: use pad byte to specify MAC type", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "587dccf0e4855619ac244166e146890aee2a1983", "submitter": { "id": 504, "url": "http://patches.dpdk.org/api/people/504/?format=api", "name": "Qi Zhang", "email": "qi.z.zhang@intel.com" }, "delegate": { "id": 1540, "url": "http://patches.dpdk.org/api/users/1540/?format=api", "username": "qzhan15", "first_name": "Qi", "last_name": "Zhang", "email": "qi.z.zhang@intel.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200911013038.19744-2-qi.z.zhang@intel.com/mbox/", "series": [ { "id": 12115, "url": "http://patches.dpdk.org/api/series/12115/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=12115", "date": "2020-09-11T01:30:33", "name": "iavf base code update", "version": 1, "mbox": "http://patches.dpdk.org/series/12115/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/77257/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/77257/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 47DE4A04B7;\n\tFri, 11 Sep 2020 03:26:54 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id A0E8B1C0CA;\n\tFri, 11 Sep 2020 03:26:46 +0200 (CEST)", "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n by dpdk.org (Postfix) with ESMTP id 946658F96\n for <dev@dpdk.org>; Fri, 11 Sep 2020 03:26:44 +0200 (CEST)", "from orsmga008.jf.intel.com ([10.7.209.65])\n by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 10 Sep 2020 18:26:44 -0700", "from dpdk51.sh.intel.com ([10.67.111.82])\n by orsmga008.jf.intel.com with ESMTP; 10 Sep 2020 18:26:42 -0700" ], "IronPort-SDR": [ "\n 5cJDDx//vfzvfvPm5qI9x8KVsYl4ixoF22OEmJRpiDR6NaMysGO9qgj6JyqXBHlTmT9vDpbKTh\n R4ecdVs5/OJw==", "\n yWvPH6lnB5JyVz+WTq5yXlL9U73g/L0KlhWOTIJSZ5warC5LiMWdGpLrKlRELjSOAo8BnQkAGc\n m7QnhAZQea8w==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9740\"; a=\"159614175\"", "E=Sophos;i=\"5.76,413,1592895600\"; d=\"scan'208\";a=\"159614175\"", "E=Sophos;i=\"5.76,413,1592895600\"; d=\"scan'208\";a=\"334362158\"" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "From": "Qi Zhang <qi.z.zhang@intel.com>", "To": "beilei.xing@intel.com", "Cc": "dev@dpdk.org, Qi Zhang <qi.z.zhang@intel.com>,\n Brett Creeley <brett.creeley@intel.com>", "Date": "Fri, 11 Sep 2020 09:30:34 +0800", "Message-Id": "<20200911013038.19744-2-qi.z.zhang@intel.com>", "X-Mailer": "git-send-email 2.13.6", "In-Reply-To": "<20200911013038.19744-1-qi.z.zhang@intel.com>", "References": "<20200911013038.19744-1-qi.z.zhang@intel.com>", "Subject": "[dpdk-dev] [PATCH 1/5] common/iavf: use pad byte to specify MAC type", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "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": "Currently, there is no way for a VF driver to specify that it wants to\nchange its device/primary unicast MAC address. This makes it\ndifficult/impossible for the PF driver to track the VF's device/primary\nunicast MAC address, which is used for VM/VF reboot and displaying on\nthe host. Fix this by using 2 bits of a pad byte in the\nvirtchnl_ether_addr structure so the VF can specify what type of MAC\nit's adding/deleting.\n\nBelow are the values that should be used by all VF drivers going\nforward.\n\nVIRTCHNL_ETHER_ADDR_LEGACY(0):\n- The type should only ever be 0 for legacy AVF drivers (i.e.\n drivers that don't support the new type bits). The PF drivers\n will track VF's device/primary unicast MAC using with best\n effort.\n\nVIRTCHNL_ETHER_ADDR_PRIMARY(1):\n- This type should only be used when the VF is changing their\n device/primary unicast MAC. It should be used for both delete\n and add cases related to the device/primary unicast MAC.\n\nVIRTCHNL_ETHER_ADDR_EXTRA(2):\n- This type should be used when the VF is adding and/or deleting\n MAC addresses that are not the device/primary unicast MAC. For\n example, extra unicast addresses and multicast addresses\n assuming the PF supports \"extra\" addresses at all.\n\nIf a PF is parsing the type field of the virtchnl_ether_addr, then it\nshould use the VIRTCHNL_ETHER_ADDR_TYPE_MASK to mask the first two bits\nof the type field since 0, 1, and 2 are the only valid values.\n\nSigned-off-by: Brett Creeley <brett.creeley@intel.com>\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\n---\n drivers/common/iavf/virtchnl.h | 29 ++++++++++++++++++++++++++++-\n 1 file changed, 28 insertions(+), 1 deletion(-)", "diff": "diff --git a/drivers/common/iavf/virtchnl.h b/drivers/common/iavf/virtchnl.h\nindex 79515ee8b..d93ef31ec 100644\n--- a/drivers/common/iavf/virtchnl.h\n+++ b/drivers/common/iavf/virtchnl.h\n@@ -435,9 +435,36 @@ VIRTCHNL_CHECK_STRUCT_LEN(12, virtchnl_queue_select);\n * PF removes the filters and returns status.\n */\n \n+/* VIRTCHNL_ETHER_ADDR_LEGACY\n+ * Prior to adding the @type member to virtchnl_ether_addr, there were 2 pad\n+ * bytes. Moving forward all VF drivers should not set type to\n+ * VIRTCHNL_ETHER_ADDR_LEGACY. This is only here to not break previous/legacy\n+ * behavior. The control plane function (i.e. PF) can use a best effort method\n+ * of tracking the primary/device unicast in this case, but there is no\n+ * guarantee and functionality depends on the implementation of the PF.\n+ */\n+\n+/* VIRTCHNL_ETHER_ADDR_PRIMARY\n+ * All VF drivers should set @type to VIRTCHNL_ETHER_ADDR_PRIMARY for the\n+ * primary/device unicast MAC address filter for VIRTCHNL_OP_ADD_ETH_ADDR and\n+ * VIRTCHNL_OP_DEL_ETH_ADDR. This allows for the underlying control plane\n+ * function (i.e. PF) to accurately track and use this MAC address for\n+ * displaying on the host and for VM/function reset.\n+ */\n+\n+/* VIRTCHNL_ETHER_ADDR_EXTRA\n+ * All VF drivers should set @type to VIRTCHNL_ETHER_ADDR_EXTRA for any extra\n+ * unicast and/or multicast filters that are being added/deleted via\n+ * VIRTCHNL_OP_DEL_ETH_ADDR/VIRTCHNL_OP_ADD_ETH_ADDR respectively.\n+ */\n struct virtchnl_ether_addr {\n \tu8 addr[VIRTCHNL_ETH_LENGTH_OF_ADDRESS];\n-\tu8 pad[2];\n+\tu8 type;\n+#define VIRTCHNL_ETHER_ADDR_LEGACY\t0\n+#define VIRTCHNL_ETHER_ADDR_PRIMARY\t1\n+#define VIRTCHNL_ETHER_ADDR_EXTRA\t2\n+#define VIRTCHNL_ETHER_ADDR_TYPE_MASK\t3 /* first two bits of type are valid */\n+\tu8 pad;\n };\n \n VIRTCHNL_CHECK_STRUCT_LEN(8, virtchnl_ether_addr);\n", "prefixes": [ "1/5" ] }{ "id": 77257, "url": "