From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0076.outbound.protection.outlook.com [104.47.0.76]) by dpdk.org (Postfix) with ESMTP id 69AE41B019; Wed, 17 Jan 2018 18:44:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=bMGP5ZhWjbBslApR+AIpVB5VGtolkFrZ8GjpXjgqij4=; b=cFiJ6nH+kDURgzCWZrbPeZPDbQPM9fyYEZZ5zoi0cSYwZ6ZrXFzOLIbMCFhLA9qVpUPKAxTpO58GQAxupNpGje0GPX6eGCQ6GWUWX9xMxUjCgd5OKiXyQRpHDweiMpwi6m3+YMEEtuDEPbfG9thkCAJgo3B2SyH1H8PZjQIlPDM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; Received: from mellanox.com (209.116.155.178) by HE1PR0501MB2043.eurprd05.prod.outlook.com (2603:10a6:3:35::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.407.7; Wed, 17 Jan 2018 17:44:26 +0000 From: Yongseok Koh To: adrien.mazarguil@6wind.com, nelio.laranjeiro@6wind.com Cc: dev@dpdk.org, Yongseok Koh , stable@dpdk.org Date: Wed, 17 Jan 2018 09:44:13 -0800 Message-Id: <20180117174413.48395-1-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180115234800.3316-1-yskoh@mellanox.com> References: <20180115234800.3316-1-yskoh@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [209.116.155.178] X-ClientProxiedBy: BN6PR14CA0010.namprd14.prod.outlook.com (2603:10b6:404:79::20) To HE1PR0501MB2043.eurprd05.prod.outlook.com (2603:10a6:3:35::21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c685ace6-a286-44c5-f734-08d55dd1f4d9 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(48565401081)(2017052603307)(7153060)(7193020); SRVR:HE1PR0501MB2043; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0501MB2043; 3:GQ98PFx5VGSBplR78Mkinq9KeKuOcKMdAK4FjdIIwyfQ6uVd0pfBtL0i9BdbEnOBeuUVIityFEuBZxroad3fYH/eYHa/ZHuv9oidNXiybXpUYSlFTtDdpV3Bnb6gFJWF/S+RheBOGtApXU+rX2Opvo/d1m5kyg4tHw+mpekdjaLIfLm8K8IDWrIGnt79NS/fL72b60gYSTCvZHe39FS9YLia5xW1NAwx2eHkULDHKdGGO9sQOSzlnhHs/AHuYJL/; 25:HhGLFTcEmpjC10gIweoyL/vUoJnWeaP8rN6nZczXUHSkIknn53htrSPMsJ2okjDNdE2JV/d7XPYvzpKUoMkARlb7x8XIr4xJ+WSVBFzYCOGCBiUdhcYGNvb74pN7HQaEV5pFWHRSkv4MYqj0LkQ0XHFPh3X8OgBchd2/qAfiMc3WwEtIP9llNluhvPWCE6Tv6Knfp0Tx4AgtHyOCj1pGnGCjujfjRIieSkDTB8jOugMmeKOg06h5ofOHnh66QK/lLoZXtiARlKUC3wPQydakhy5PxxJcJRzjc1PGmPo6Z9McOJ/sSyVEa094CO0QuK4vhAqiFsHjoPJzbYe3Rbl1Vg==; 31:R3Qjl4+8P1AEyScp3lpV4pgY186My/QD5Ptkn0/N5WX0EQdi7UFnXZs1DW8HFCjnQJ3jyq4b0VNjMDYOel12QxSZTCZGrJRaddYgpLTGxZCfLi5pl0XQyHTF/sVuTuz/FCYtEDXyPYpzJoRoLYXUSfTqbAy8k7X3kEfFFBvGdVFVZw7ur8a55eiZqkCVDzU97pjZRQcqVoeJS9A/8dNSwsAvjCgIG+/h/IYKFc7B3uQ= X-MS-TrafficTypeDiagnostic: HE1PR0501MB2043: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; HE1PR0501MB2043; 20:dy4+Olc7MnGZrk/krBubKy8ppn/GwYb8qJV3XVqr+PrFF2amYaYRTW9yGmYILyT/5SegoYL+pIGVU7XGIMYfrblRYSyHziQ33p5T5ruWdmVob/8YC1zXnbeYE0V8cHaR0ikht6YAXEvc1/IpTZoY1egSbWjiWO8i4AAIQlHckQM0z+HhKYXBZvqrnQbm3uhLCH6xcASPiv7KNLeNXma6hDo+5mnSSRxZiqYdlSgtADpcyfH3snuw1pEk10b8zcDQr0ShQA++wYvmz2hNNqyuc4jXY82F9bix53wlEUDcYqfo4ZsQn76vvFLYr4axrc8ppFz5WBkmwuHd7gnAdN4WCBe4OUVPhipOguQZWqsjDUSzndawmyDo97wOt1JCvvGQRIoU8KpAwRsGKiNCuLRgj3H6XFi8dB5XuxRLfjQhrsjxvJofpS6EI0ofjnfWPQUaIeSKtpfcIoc5wPwJHLvi5qF2P6yCzzlN1xhVz/KZsr+M71frwkPaym7S+fR/6MeP; 4:M6TRbMxBvuMn9GtrU1wGZnmMqvaK1J67HTrLToFnYehQtIDus0UVgTKOMpZNzLSNu4joaw6AP7lStD4emnsuXPakw2X5Okwkp1MaCXUUPCZHLbWZMT45nMAen6TkdldamDqD6k3pdj5ml04WRo6DcqYE62pvF/LNp5sJ1+z3WUmgC85S40tZ4n4aCreUgxY5NhATuoQ78gImIZOH1l/GQvIM188kiY5Eo+ZztVcu34vYIjOYFNitehM/685EJJgr3yeqna0OrJ2PsCGpCUoA5g== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(3231023)(2400048)(944501161)(6055026)(6041268)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123558120)(20161123562045)(6072148)(201708071742011); SRVR:HE1PR0501MB2043; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:HE1PR0501MB2043; X-Forefront-PRVS: 0555EC8317 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(346002)(39380400002)(396003)(376002)(39860400002)(189003)(199004)(105586002)(59450400001)(81166006)(81156014)(8676002)(5660300001)(21086003)(7696005)(86362001)(52116002)(26005)(16586007)(51416003)(66066001)(76176011)(6116002)(3846002)(4326008)(36756003)(2950100002)(305945005)(55016002)(47776003)(386003)(106356001)(50466002)(68736007)(6666003)(25786009)(1076002)(16526018)(48376002)(2906002)(50226002)(7736002)(53936002)(478600001)(69596002)(316002)(8936002)(97736004); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0501MB2043; H:mellanox.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0501MB2043; 23:+mE9HPLBYsJGNW1WlV5Sl9QtQgKbngTBa/ftqic?= =?us-ascii?Q?OJcP8jWSjmgA0yA1wvgQqrlOIDbN+GYPrGGzLfCdFT42v10msPKWArfjumF8?= =?us-ascii?Q?HNAMu3MDn8JwtcjhMIJ64mOXIqrcvqyMfj1xl3RfQXYFuZEkAoDZ6c2zmuKd?= =?us-ascii?Q?i5ykxb3JAL/V5l8A8jT1S0hb3V0HEv0/hcVix+TrOVHvDdjfbTzMc7Ilp+nR?= =?us-ascii?Q?D6yeHm4hGkMVJLAnEEZAgz1NdaKy6BpbACn18/UaXur1AXzhQNuw04B+XvsX?= =?us-ascii?Q?QdxLzHq4JUK+sm4AFUlKMBfXPoWoKeL2wIBBRfBJSkof5u1GG0g4kBQaHX1u?= =?us-ascii?Q?hm34fm/qXIBPajrBU1Qw6IchVj6M85froOJ+tnEqlCd8VZgACy7f9s7+ij82?= =?us-ascii?Q?ZNQhebRdSb4/U6bJZv+gBjl72eIpwVawkEL7XLI/MS7L+Zer93BqJF8Z9Rfx?= =?us-ascii?Q?duiHcsXIt1hS03stSOPCye3XXzBPHuQcuYq0Y3jNbmfUG0n1cBV83kvYkafT?= =?us-ascii?Q?MakVHjYzo3ZmFypq48m07+Ez5cjK3sV9L0+EtZz1GiYWjc0xmZciO0xK6HNt?= =?us-ascii?Q?yyq87/eBIbFHo9sQIh1iwU2WZo41k46ZIceJSH7DfQezgVo3399Jk2y4eVtZ?= =?us-ascii?Q?QPmim71fbCvvGFmljYMKznRm4INgk/xf07W1v0ykvtrT+11l4/d6adj3Uvvn?= =?us-ascii?Q?P9po/vxrdaSDK73wWXXTYxqMIPXOBKEplm6x6IGpx9qc+BKvaj9bV0Kef2fQ?= =?us-ascii?Q?5lgCpgsgCCc5ox2mT5dDD8KRsQLAqxBgkO2oETlsSybkrKyW5TA6LBf+m3cb?= =?us-ascii?Q?f/3Ftc7PXK3DCwtofFry5r8HGReQHCq+r/4OA69PfK1Eqq+FI8kHuQRyl1YR?= =?us-ascii?Q?PUiy3qPGaSdft52MNNzdF/mQ/PapbMNMVW/IqqVHi1E/LEun9KuXFmp7VU/L?= =?us-ascii?Q?fZqD7OlkHkknkQeiSCPTWbax9E3g1PDcoFN5TnNUt37oQS1rbFODXMXNTBOW?= =?us-ascii?Q?yKNRzS9z3zB9/G9gV1uiaDwBHo2X3FJ7vsGN7mwvSAlQ67oEaTiT/L8atZS6?= =?us-ascii?Q?EcCXAsFSMmSdGePyB+f1sfisQCcZO5+xUy0mv/ucAmdm6LLzx2MAwqK1Iavy?= =?us-ascii?Q?yJw+J3Ee+dHa8eGtjVzo0wb3qxtqAF2pL?= X-Microsoft-Exchange-Diagnostics: 1; HE1PR0501MB2043; 6:wt2F2vRbM+6OASmIVBilom1SmHjhhklK9jE9UbX066cru2z9kCfUWSzMHKyzXoJH/IefGbnYAQTJXCn7zSfH6HXWc5ZqoPrGt4JSXvCAJGSmMSavwU+27+KphsMKvGJYh8lXgnXRNreIusTNfA2mHzJ6xKuy0GdDskvGe+ELfIeoAau7cDSYkD0HImxCcD2VSJEoZyk4iQ0lXecuNxkwQab5ELCjk3F/9yo6OCRTNhYHP23ydzUA1SRFyRR9/oMyp5VMNeUNiL0uxNmbAZQMCFZaucRfiPbHU7b4uCF/0WnhKZeKDBE6ZrA3LU8CGUpQCWTVKO02qEJkKOV+QOzKzwzl71yQ4cZJd5QUau1WfOc=; 5:NrEuw4Jj6Z7LVEZcronVZ3Y9pJEIBqb5hNly7FJuN6fUDN34yUuzApj4LaFm3s3v0yzRcCt5H2bKHUE2JixlZVrVMM5RNtFPaX4BdVd/VDTytDbiam27RkzQzzVR9hmL+GCvIICUGOlSpE/mTOqylmnLpJEMvvdS3Aw57pNGbv8=; 24:IvJG+2jzr40K6XOu9j/pQebiY4nd292krGunlliIDh83lxE6n9uQFY1rhoSD4VBVDpcSycUkkQEnzY6pLRrCoCUNXnfUENJBvuTskUj0Ymg=; 7:bqehZ3QvXXTxd0ESf8C/dIi7EEhkpKrARmGStEcKutVDmq6APsAA1JpoPSmAlGkVFHk2fn7BddzEzGm74/73h7pFSuwJly7B+bNyMkcCiM2mHUk2UK+Y3bCpsNBUZdeCWiO2hYVxCGgR1lo1HISqAkV4yNhaH4ZheQ9IIUHnVKHsfXjO3wEqVs+DG676Swk47gGAhBX4MbfQwYNSsU9bmy6o14qaN+3mahWAZ0Z2zzm198ilivUIiJWpskltfQzu SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jan 2018 17:44:26.7453 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c685ace6-a286-44c5-f734-08d55dd1f4d9 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0501MB2043 Subject: [dpdk-dev] [PATCH v2] net/mlx5: fix handling link status change event X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jan 2018 17:44:32 -0000 Even though link of a port gets down, device still can receive traffic. That is the reason why mlx5_set_link_up/down() switches rx/tx_pkt_burst(). However, if link gets down by an external command (e.g. ifconfig), it isn't effective. It is better to change burst functions when link status change is detected. Fixes: 62072098b54e ("mlx5: support setting link up or down") Cc: stable@dpdk.org Signed-off-by: Yongseok Koh --- v2: * fix comments for argument changes of functions. drivers/net/mlx5/mlx5.c | 1 - drivers/net/mlx5/mlx5.h | 1 + drivers/net/mlx5/mlx5_ethdev.c | 118 ++++++++++++++++++++++++++++++---------- drivers/net/mlx5/mlx5_trigger.c | 23 ++------ 4 files changed, 95 insertions(+), 48 deletions(-) diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 1c95f3520..fc2d59fee 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -869,7 +869,6 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) /* Bring Ethernet device up. */ DEBUG("forcing Ethernet interface up"); priv_set_flags(priv, ~IFF_UP, IFF_UP); - mlx5_link_update(priv->dev, 1); /* Store device configuration on private structure. */ priv->config = config; continue; diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h index e740a4e77..9a4a59bd4 100644 --- a/drivers/net/mlx5/mlx5.h +++ b/drivers/net/mlx5/mlx5.h @@ -225,6 +225,7 @@ int priv_set_flags(struct priv *, unsigned int, unsigned int); int mlx5_dev_configure(struct rte_eth_dev *); void mlx5_dev_infos_get(struct rte_eth_dev *, struct rte_eth_dev_info *); const uint32_t *mlx5_dev_supported_ptypes_get(struct rte_eth_dev *dev); +int priv_link_update(struct priv *, int); int mlx5_link_update(struct rte_eth_dev *, int); int mlx5_dev_set_mtu(struct rte_eth_dev *, uint16_t); int mlx5_dev_get_flow_ctrl(struct rte_eth_dev *, struct rte_eth_fc_conf *); diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c index 6f78adc4a..9a2ebd80c 100644 --- a/drivers/net/mlx5/mlx5_ethdev.c +++ b/drivers/net/mlx5/mlx5_ethdev.c @@ -885,25 +885,104 @@ mlx5_link_update_unlocked_gs(struct rte_eth_dev *dev, int wait_to_complete) } /** - * DPDK callback to retrieve physical link information. + * Enable receiving and transmitting traffic. * - * @param dev - * Pointer to Ethernet device structure. + * @param priv + * Pointer to private structure. + */ +static void +priv_link_start(struct priv *priv) +{ + struct rte_eth_dev *dev = priv->dev; + int err; + + dev->tx_pkt_burst = priv_select_tx_function(priv, dev); + dev->rx_pkt_burst = priv_select_rx_function(priv, dev); + err = priv_dev_traffic_enable(priv, dev); + if (err) + ERROR("%p: error occurred while configuring control flows: %s", + (void *)priv, strerror(err)); + err = priv_flow_start(priv, &priv->flows); + if (err) + ERROR("%p: error occurred while configuring flows: %s", + (void *)priv, strerror(err)); +} + +/** + * Disable receiving and transmitting traffic. + * + * @param priv + * Pointer to private structure. + */ +static void +priv_link_stop(struct priv *priv) +{ + struct rte_eth_dev *dev = priv->dev; + + priv_flow_stop(priv, &priv->flows); + priv_dev_traffic_disable(priv, dev); + dev->rx_pkt_burst = removed_rx_burst; + dev->tx_pkt_burst = removed_tx_burst; +} + +/** + * Retrieve physical link information and update rx/tx_pkt_burst callbacks + * accordingly. + * + * @param priv + * Pointer to private structure. * @param wait_to_complete * Wait for request completion (ignored). */ int -mlx5_link_update(struct rte_eth_dev *dev, int wait_to_complete) +priv_link_update(struct priv *priv, int wait_to_complete) { + struct rte_eth_dev *dev = priv->dev; struct utsname utsname; int ver[3]; + int ret; + struct rte_eth_link dev_link = dev->data->dev_link; if (uname(&utsname) == -1 || sscanf(utsname.release, "%d.%d.%d", &ver[0], &ver[1], &ver[2]) != 3 || KERNEL_VERSION(ver[0], ver[1], ver[2]) < KERNEL_VERSION(4, 9, 0)) - return mlx5_link_update_unlocked_gset(dev, wait_to_complete); - return mlx5_link_update_unlocked_gs(dev, wait_to_complete); + ret = mlx5_link_update_unlocked_gset(dev, wait_to_complete); + else + ret = mlx5_link_update_unlocked_gs(dev, wait_to_complete); + /* If lsc interrupt is disabled, should always be ready for traffic. */ + if (!dev->data->dev_conf.intr_conf.lsc) { + priv_link_start(priv); + return ret; + } + /* Re-select burst callbacks only if link status has been changed. */ + if (!ret && dev_link.link_status != dev->data->dev_link.link_status) { + if (dev->data->dev_link.link_status == ETH_LINK_UP) + priv_link_start(priv); + else + priv_link_stop(priv); + } + return ret; +} + +/** + * DPDK callback to retrieve physical link information. + * + * @param dev + * Pointer to Ethernet device structure. + * @param wait_to_complete + * Wait for request completion (ignored). + */ +int +mlx5_link_update(struct rte_eth_dev *dev, int wait_to_complete) +{ + struct priv *priv = dev->data->dev_private; + int ret; + + priv_lock(priv); + ret = priv_link_update(priv, wait_to_complete); + priv_unlock(priv); + return ret; } /** @@ -1113,7 +1192,7 @@ priv_link_status_update(struct priv *priv) { struct rte_eth_link *link = &priv->dev->data->dev_link; - mlx5_link_update(priv->dev, 0); + priv_link_update(priv, 0); if (((link->link_speed == 0) && link->link_status) || ((link->link_speed != 0) && !link->link_status)) { /* @@ -1312,8 +1391,6 @@ priv_dev_interrupt_handler_install(struct priv *priv, struct rte_eth_dev *dev) * * @param priv * Pointer to private data structure. - * @param dev - * Pointer to rte_eth_dev structure. * @param up * Nonzero for link up, otherwise link down. * @@ -1321,24 +1398,9 @@ priv_dev_interrupt_handler_install(struct priv *priv, struct rte_eth_dev *dev) * 0 on success, errno value on failure. */ static int -priv_dev_set_link(struct priv *priv, struct rte_eth_dev *dev, int up) +priv_dev_set_link(struct priv *priv, int up) { - int err; - - if (up) { - err = priv_set_flags(priv, ~IFF_UP, IFF_UP); - if (err) - return err; - dev->tx_pkt_burst = priv_select_tx_function(priv, dev); - dev->rx_pkt_burst = priv_select_rx_function(priv, dev); - } else { - err = priv_set_flags(priv, ~IFF_UP, ~IFF_UP); - if (err) - return err; - dev->rx_pkt_burst = removed_rx_burst; - dev->tx_pkt_burst = removed_tx_burst; - } - return 0; + return priv_set_flags(priv, ~IFF_UP, up ? IFF_UP : ~IFF_UP); } /** @@ -1357,7 +1419,7 @@ mlx5_set_link_down(struct rte_eth_dev *dev) int err; priv_lock(priv); - err = priv_dev_set_link(priv, dev, 0); + err = priv_dev_set_link(priv, 0); priv_unlock(priv); return err; } @@ -1378,7 +1440,7 @@ mlx5_set_link_up(struct rte_eth_dev *dev) int err; priv_lock(priv); - err = priv_dev_set_link(priv, dev, 1); + err = priv_dev_set_link(priv, 1); priv_unlock(priv); return err; } diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c index 1a20967a2..6f5c799b5 100644 --- a/drivers/net/mlx5/mlx5_trigger.c +++ b/drivers/net/mlx5/mlx5_trigger.c @@ -151,38 +151,23 @@ mlx5_dev_start(struct rte_eth_dev *dev) (void *)dev, strerror(err)); goto error; } - /* Update send callback. */ - dev->tx_pkt_burst = priv_select_tx_function(priv, dev); err = priv_rxq_start(priv); if (err) { ERROR("%p: RXQ allocation failed: %s", (void *)dev, strerror(err)); goto error; } - /* Update receive callback. */ - dev->rx_pkt_burst = priv_select_rx_function(priv, dev); - err = priv_dev_traffic_enable(priv, dev); - if (err) { - ERROR("%p: an error occurred while configuring control flows:" - " %s", - (void *)priv, strerror(err)); - goto error; - } - err = priv_flow_start(priv, &priv->flows); - if (err) { - ERROR("%p: an error occurred while configuring flows:" - " %s", - (void *)priv, strerror(err)); - goto error; - } err = priv_rx_intr_vec_enable(priv); if (err) { ERROR("%p: RX interrupt vector creation failed", (void *)priv); goto error; } - priv_dev_interrupt_handler_install(priv, dev); priv_xstats_init(priv); + /* Update link status and Tx/Rx callbacks for the first time. */ + memset(&dev->data->dev_link, 0, sizeof(struct rte_eth_link)); + priv_link_update(priv, 1); + priv_dev_interrupt_handler_install(priv, dev); priv_unlock(priv); return 0; error: -- 2.11.0