Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/745015/?format=api
{ "id": 745015, "url": "http://patchwork.ozlabs.org/api/patches/745015/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1490833375-2788-3-git-send-email-sridhar.samudrala@intel.com/", "project": { "id": 46, "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api", "name": "Intel Wired Ethernet development", "link_name": "intel-wired-lan", "list_id": "intel-wired-lan.osuosl.org", "list_email": "intel-wired-lan@osuosl.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<1490833375-2788-3-git-send-email-sridhar.samudrala@intel.com>", "list_archive_url": null, "date": "2017-03-30T00:22:50", "name": "[next-queue,v6,2/7] i40e: Introduce Port Representor netdevs and switchdev mode.", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "54e9718aeffcd175f69246d4acdf80a252c5bd0a", "submitter": { "id": 65219, "url": "http://patchwork.ozlabs.org/api/people/65219/?format=api", "name": "Samudrala, Sridhar", "email": "sridhar.samudrala@intel.com" }, "delegate": { "id": 68, "url": "http://patchwork.ozlabs.org/api/users/68/?format=api", "username": "jtkirshe", "first_name": "Jeff", "last_name": "Kirsher", "email": "jeffrey.t.kirsher@intel.com" }, "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1490833375-2788-3-git-send-email-sridhar.samudrala@intel.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/745015/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/745015/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@lists.osuosl.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Received": [ "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3vtlhr6ljKz9s79\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 30 Mar 2017 11:23:08 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 0D6E63005C;\n\tThu, 30 Mar 2017 00:23:07 +0000 (UTC)", "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id 7IKKJrd0OjYm; Thu, 30 Mar 2017 00:23:01 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id 1FE8E2EA94;\n\tThu, 30 Mar 2017 00:23:00 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 9EEEA1CE8BC\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 30 Mar 2017 00:22:57 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 99AF489046\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 30 Mar 2017 00:22:57 +0000 (UTC)", "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id HNU1g89SB-+c for <intel-wired-lan@lists.osuosl.org>;\n\tThu, 30 Mar 2017 00:22:56 +0000 (UTC)", "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id ABBAE8902A\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 30 Mar 2017 00:22:56 +0000 (UTC)", "from orsmga003.jf.intel.com ([10.7.209.27])\n\tby orsmga105.jf.intel.com with ESMTP; 29 Mar 2017 17:22:56 -0700", "from arch-p28.jf.intel.com ([10.166.187.27])\n\tby orsmga003.jf.intel.com with ESMTP; 29 Mar 2017 17:22:55 -0700" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.36,244,1486454400\"; d=\"scan'208\";a=\"949601318\"", "From": "Sridhar Samudrala <sridhar.samudrala@intel.com>", "To": "intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,\n\talexander.h.duyck@intel.com, anjali.singhai@intel.com,\n\tjakub.kicinski@netronome.com, gerlitz.or@gmail.com, jiri@resnulli.us, \n\tsridhar.samudrala@intel.com", "Date": "Wed, 29 Mar 2017 17:22:50 -0700", "Message-Id": "<1490833375-2788-3-git-send-email-sridhar.samudrala@intel.com>", "X-Mailer": "git-send-email 1.8.3.1", "In-Reply-To": "<1490833375-2788-1-git-send-email-sridhar.samudrala@intel.com>", "References": "<1490833375-2788-1-git-send-email-sridhar.samudrala@intel.com>", "Subject": "[Intel-wired-lan] [next-queue v6 PATCH 2/7] i40e: Introduce Port\n\tRepresentor netdevs and switchdev mode.", "X-BeenThere": "intel-wired-lan@lists.osuosl.org", "X-Mailman-Version": "2.1.18-1", "Precedence": "list", "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.lists.osuosl.org>", "List-Unsubscribe": "<http://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@lists.osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@lists.osuosl.org?subject=help>", "List-Subscribe": "<http://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "intel-wired-lan-bounces@lists.osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@lists.osuosl.org>" }, "content": "Port Representator netdevs are created for each PF and VF if the switch\nmode is set to 'switchdev'. These netdevs can be used to control and\nconfigure VFs and PFs when they are moved to a different namespace.\nThey enable exposing statistics, configure and monitor link state, mtu,\nfilters,fdb/vlan entries etc.\n\nSample script to create port representors\n# rmmod i40e; modprobe i40e\n# devlink dev eswitch set pci/0000:42:00.0 mode switchdev\n# echo 2 > /sys/class/net/p4p1/device/sriov_numvfs\n# ip l show\n122: p4p1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000\n link/ether 3c:fd:fe:a3:18:f8 brd ff:ff:ff:ff:ff:ff\n vf 0 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off\n vf 1 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off\n124: p4p1-pf: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000\n link/ether 72:8e:34:b2:d0:44 brd ff:ff:ff:ff:ff:ff\n125: p4p1-vf0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000\n link/ether 02:57:a0:18:2b:ce brd ff:ff:ff:ff:ff:ff\n126: p4p1-vf1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000\n link/ether 32:7c:77:5f:3e:e3 brd ff:ff:ff:ff:ff:ff\n127: p4p1_0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000\n link/ether 26:51:28:54:69:43 brd ff:ff:ff:ff:ff:ff\n128: p4p1_1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000\n\np4p1 is the PF. p4p1-pf is the port netdev for PF.\np4p1_0, p4p1_1 are VFs and p4p1-vf0, p4p1-vf1 are the port netdev's for the 2 VFs.\n\nSigned-off-by: Sridhar Samudrala <sridhar.samudrala@intel.com>\n---\n drivers/net/ethernet/intel/i40e/i40e.h | 19 +++\n drivers/net/ethernet/intel/i40e/i40e_main.c | 187 ++++++++++++++++++++-\n drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 9 +\n drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h | 6 +\n 4 files changed, 220 insertions(+), 1 deletion(-)", "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h\nindex f788125c..c865803 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e.h\n+++ b/drivers/net/ethernet/intel/i40e/i40e.h\n@@ -320,6 +320,17 @@ struct i40e_flex_pit {\n \tu8 pit_index;\n };\n \n+enum i40e_port_netdev_type {\n+\tI40E_PORT_NETDEV_PF,\n+\tI40E_PORT_NETDEV_VF\n+};\n+\n+/* Port representor netdev private structure */\n+struct i40e_port_netdev_priv {\n+\tenum i40e_port_netdev_type type;\t/* type - PF or VF */\n+\tvoid *f;\t\t\t\t/* ptr to PF or VF struct */\n+};\n+\n /* struct that defines the Ethernet device */\n struct i40e_pf {\n \tstruct pci_dev *pdev;\n@@ -328,6 +339,12 @@ struct i40e_pf {\n \tstruct msix_entry *msix_entries;\n \tbool fc_autoneg_status;\n \n+\t/* PF Port representor netdev that allows control and configuration of\n+\t * PFs when they are moved to a different namespace. Enables returning\n+\t * PF stats, configuring/monitoring link state, fdb/vlans, filters etc.\n+\t */\n+\tstruct net_device *port_netdev;\n+\n \tu16 eeprom_version;\n \tu16 num_vmdq_vsis; /* num vmdq vsis this PF has set up */\n \tu16 num_vmdq_qps; /* num queue pairs per vmdq pool */\n@@ -985,4 +1002,6 @@ bool i40e_dcb_need_reconfig(struct i40e_pf *pf,\n i40e_status i40e_set_npar_bw_setting(struct i40e_pf *pf);\n i40e_status i40e_commit_npar_bw_setting(struct i40e_pf *pf);\n void i40e_print_link_message(struct i40e_vsi *vsi, bool isup);\n+int i40e_alloc_port_netdev(void *f, enum i40e_port_netdev_type type);\n+void i40e_free_port_netdev(void *f, enum i40e_port_netdev_type type);\n #endif /* _I40E_H_ */\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c\nindex afcf14d..e441e39 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -9985,6 +9985,11 @@ struct i40e_vsi *i40e_vsi_setup(struct i40e_pf *pf, u8 type,\n \t\t\t\t\t ret);\n \t\t\t}\n \t\t}\n+\t\tif (pf->eswitch_mode == DEVLINK_ESWITCH_MODE_SWITCHDEV) {\n+\t\t\tret = i40e_alloc_port_netdev(pf, I40E_PORT_NETDEV_PF);\n+\t\t\tif (ret)\n+\t\t\t\tgoto err_port_netdev;\n+\t\t}\n \tcase I40E_VSI_VMDQ2:\n \t\tret = i40e_config_netdev(vsi);\n \t\tif (ret)\n@@ -10037,6 +10042,9 @@ struct i40e_vsi *i40e_vsi_setup(struct i40e_pf *pf, u8 type,\n \t\tvsi->netdev = NULL;\n \t}\n err_netdev:\n+\tif (pf->port_netdev)\n+\t\ti40e_free_port_netdev(pf, I40E_PORT_NETDEV_PF);\n+err_port_netdev:\n \ti40e_aq_delete_element(&pf->hw, vsi->seid, NULL);\n err_vsi:\n \ti40e_vsi_clear(vsi);\n@@ -10851,13 +10859,38 @@ static int i40e_devlink_eswitch_mode_get(struct devlink *devlink, u16 *mode)\n static int i40e_devlink_eswitch_mode_set(struct devlink *devlink, u16 mode)\n {\n \tstruct i40e_pf *pf = devlink_priv(devlink);\n-\tint err = 0;\n+\tstruct i40e_vf *vf;\n+\tint i, j, err = 0;\n \n \tif (mode == pf->eswitch_mode)\n \t\tgoto done;\n \n \tswitch (mode) {\n \tcase DEVLINK_ESWITCH_MODE_LEGACY:\n+\t\tfor (i = 0; i < pf->num_alloc_vfs; i++) {\n+\t\t\tvf = &pf->vf[i];\n+\t\t\ti40e_free_port_netdev(vf, I40E_PORT_NETDEV_VF);\n+\t\t}\n+\t\ti40e_free_port_netdev(pf, I40E_PORT_NETDEV_PF);\n+\t\tpf->eswitch_mode = mode;\n+\t\tbreak;\n+\tcase DEVLINK_ESWITCH_MODE_SWITCHDEV:\n+\t\terr = i40e_alloc_port_netdev(pf, I40E_PORT_NETDEV_PF);\n+\t\tif (err)\n+\t\t\tgoto done;\n+\t\tfor (i = 0; i < pf->num_alloc_vfs; i++) {\n+\t\t\tvf = &pf->vf[i];\n+\t\t\terr = i40e_alloc_port_netdev(vf, I40E_PORT_NETDEV_VF);\n+\t\t\tif (err) {\n+\t\t\t\tfor (j = 0; j < i; j++) {\n+\t\t\t\t\tvf = &pf->vf[j];\n+\t\t\t\t\ti40e_free_port_netdev(vf,\n+\t\t\t\t\t\t\tI40E_PORT_NETDEV_VF);\n+\t\t\t\t}\n+\t\t\t\ti40e_free_port_netdev(pf, I40E_PORT_NETDEV_PF);\n+\t\t\t\tgoto done;\n+\t\t\t}\n+\t\t}\n \t\tpf->eswitch_mode = mode;\n \t\tbreak;\n \tdefault:\n@@ -10874,6 +10907,157 @@ static int i40e_devlink_eswitch_mode_set(struct devlink *devlink, u16 mode)\n };\n \n /**\n+ * i40e_port_netdev_open\n+ * @dev: network interface device structure\n+ *\n+ * Called when port netdevice is brought up.\n+ **/\n+static int i40e_port_netdev_open(struct net_device *dev)\n+{\n+\treturn 0;\n+}\n+\n+/**\n+ * i40e_port_netdev_stop\n+ * @dev: network interface device structure\n+ *\n+ * Called when port netdevice is brought down.\n+ **/\n+static int i40e_port_netdev_stop(struct net_device *dev)\n+{\n+\treturn 0;\n+}\n+\n+static const struct net_device_ops i40e_port_netdev_ops = {\n+\t.ndo_open\t\t= i40e_port_netdev_open,\n+\t.ndo_stop\t\t= i40e_port_netdev_stop,\n+};\n+\n+/**\n+ * i40e_alloc_port_netdev\n+ * @f: pointer to the PF or VF structure\n+ * @type: port netdev type\n+ *\n+ * Create Port representor netdev\n+ **/\n+int i40e_alloc_port_netdev(void *f, enum i40e_port_netdev_type type)\n+{\n+\tstruct net_device *port_netdev;\n+\tchar netdev_name[IFNAMSIZ];\n+\tstruct i40e_port_netdev_priv *priv;\n+\tstruct i40e_pf *pf;\n+\tstruct i40e_vf *vf;\n+\tstruct i40e_vsi *vsi;\n+\tint err;\n+\n+\tswitch (type) {\n+\tcase I40E_PORT_NETDEV_PF:\n+\t\tpf = (struct i40e_pf *)f;\n+\t\tvsi = pf->vsi[pf->lan_vsi];\n+\n+\t\tsnprintf(netdev_name, IFNAMSIZ, \"%s-pf\", vsi->netdev->name);\n+\t\tport_netdev = alloc_netdev(sizeof(struct i40e_port_netdev_priv),\n+\t\t\t\t\t netdev_name, NET_NAME_UNKNOWN,\n+\t\t\t\t\t ether_setup);\n+\t\tif (!port_netdev) {\n+\t\t\tdev_err(&pf->pdev->dev,\n+\t\t\t\t\"alloc_netdev failed for PF:%s port netdev\\n\",\n+\t\t\t\tvsi->netdev->name);\n+\t\t\treturn -ENOMEM;\n+\t\t}\n+\t\tpf->port_netdev = port_netdev;\n+\t\tpriv = netdev_priv(port_netdev);\n+\t\tpriv->f = pf;\n+\t\tpriv->type = I40E_PORT_NETDEV_PF;\n+\t\tbreak;\n+\tcase I40E_PORT_NETDEV_VF:\n+\t\tvf = (struct i40e_vf *)f;\n+\t\tpf = vf->pf;\n+\t\tvsi = pf->vsi[pf->lan_vsi];\n+\n+\t\tsnprintf(netdev_name, IFNAMSIZ, \"%s-vf%d\", vsi->netdev->name,\n+\t\t\t vf->vf_id);\n+\t\tport_netdev = alloc_netdev(sizeof(struct i40e_port_netdev_priv),\n+\t\t\t\t\t netdev_name, NET_NAME_UNKNOWN,\n+\t\t\t\t\t ether_setup);\n+\t\tif (!port_netdev) {\n+\t\t\tdev_err(&pf->pdev->dev,\n+\t\t\t\t\"alloc_netdev failed for VF%d port netdev\\n\",\n+\t\t\t\tvf->vf_id);\n+\t\t\treturn -ENOMEM;\n+\t\t}\n+\t\tvf->port_netdev = port_netdev;\n+\t\tpriv = netdev_priv(port_netdev);\n+\t\tpriv->f = vf;\n+\t\tpriv->type = I40E_PORT_NETDEV_VF;\n+\t\tbreak;\n+\tdefault:\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tport_netdev->netdev_ops = &i40e_port_netdev_ops;\n+\teth_hw_addr_random(port_netdev);\n+\n+\tnetif_carrier_off(port_netdev);\n+\tnetif_tx_stop_all_queues(port_netdev);\n+\n+\terr = register_netdev(port_netdev);\n+\tif (err) {\n+\t\tdev_err(&pf->pdev->dev, \"register_netdev failed for port netdev: %s\\n\",\n+\t\t\tport_netdev->name);\n+\t\tfree_netdev(port_netdev);\n+\t\treturn err;\n+\t}\n+\n+\tdev_info(&pf->pdev->dev, \"%s Port representor %s created\\n\",\n+\t\t ((type == I40E_PORT_NETDEV_PF) ? \"PF\" : \"VF\"),\n+\t\t port_netdev->name);\n+\n+\treturn 0;\n+}\n+\n+/**\n+ * i40e_free_port_netdev\n+ * @pf: pointer to the PF or VF structure\n+ * @type: port netdev type\n+ *\n+ * Free Port representor netdev\n+ **/\n+void i40e_free_port_netdev(void *f, enum i40e_port_netdev_type type)\n+{\n+\tstruct i40e_pf *pf;\n+\tstruct i40e_vf *vf;\n+\n+\tswitch (type) {\n+\tcase I40E_PORT_NETDEV_PF:\n+\t\tpf = (struct i40e_pf *)f;\n+\n+\t\tif (!pf->port_netdev)\n+\t\t\treturn;\n+\t\tdev_info(&pf->pdev->dev, \"Freeing PF Port representor %s\\n\",\n+\t\t\t pf->port_netdev->name);\n+\t\tunregister_netdev(pf->port_netdev);\n+\t\tfree_netdev(pf->port_netdev);\n+\t\tpf->port_netdev = NULL;\n+\t\tbreak;\n+\tcase I40E_PORT_NETDEV_VF:\n+\t\tvf = (struct i40e_vf *)f;\n+\t\tpf = vf->pf;\n+\n+\t\tif (!vf->port_netdev)\n+\t\t\treturn;\n+\t\tdev_info(&pf->pdev->dev, \"Freeing VF Port representor %s\\n\",\n+\t\t\t vf->port_netdev->name);\n+\t\tunregister_netdev(vf->port_netdev);\n+\t\tfree_netdev(vf->port_netdev);\n+\t\tvf->port_netdev = NULL;\n+\t\tbreak;\n+\tdefault:\n+\t\tbreak;\n+\t}\n+}\n+\n+/**\n * i40e_probe - Device initialization routine\n * @pdev: PCI device information struct\n * @ent: entry in i40e_pci_tbl\n@@ -11474,6 +11658,7 @@ static void i40e_remove(struct pci_dev *pdev)\n \t\t\ti40e_switch_branch_release(pf->veb[i]);\n \t}\n \n+\ti40e_free_port_netdev(pf, I40E_PORT_NETDEV_PF);\n \t/* Now we can shutdown the PF's VSI, just before we kill\n \t * adminq and hmc.\n \t */\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c\nindex 65c95ff..e89f4c4 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c\n@@ -1081,6 +1081,9 @@ void i40e_free_vfs(struct i40e_pf *pf)\n \t\t\ti40e_free_vf_res(&pf->vf[i]);\n \t\t/* disable qp mappings */\n \t\ti40e_disable_vf_mappings(&pf->vf[i]);\n+\n+\t\tif (pf->eswitch_mode == DEVLINK_ESWITCH_MODE_SWITCHDEV)\n+\t\t\ti40e_free_port_netdev(&pf->vf[i], I40E_PORT_NETDEV_VF);\n \t}\n \n \tkfree(pf->vf);\n@@ -1148,6 +1151,12 @@ int i40e_alloc_vfs(struct i40e_pf *pf, u16 num_alloc_vfs)\n \t\t/* VF resources get allocated during reset */\n \t\ti40e_reset_vf(&vfs[i], false);\n \n+\t\tif (pf->eswitch_mode == DEVLINK_ESWITCH_MODE_SWITCHDEV) {\n+\t\t\tret = i40e_alloc_port_netdev(&vfs[i],\n+\t\t\t\t\t\t I40E_PORT_NETDEV_VF);\n+\t\t\tif (ret)\n+\t\t\t\tgoto err_alloc;\n+\t\t}\n \t}\n \tpf->num_alloc_vfs = num_alloc_vfs;\n \ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h\nindex 37af437..b24d0c6 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h\n+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h\n@@ -76,6 +76,12 @@ enum i40e_vf_capabilities {\n struct i40e_vf {\n \tstruct i40e_pf *pf;\n \n+\t/* VF Port representor netdev that allows control and configuration\n+\t * of VFs from the host. Enables returning VF stats, configuring link\n+\t * state, mtu, fdb/vlans, filters etc.\n+\t */\n+\tstruct net_device *port_netdev;\n+\n \t/* VF id in the PF space */\n \ts16 vf_id;\n \t/* all VF vsis connect to the same parent */\n", "prefixes": [ "next-queue", "v6", "2/7" ] }