From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40075.outbound.protection.outlook.com [40.107.4.75]) by dpdk.org (Postfix) with ESMTP id 549F11B376 for ; Thu, 18 Jan 2018 19:28:14 +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=brQ7X9bi0qnfh0dioOgaaZaF2Y2Cq2TA9I2hGm7hvZY=; b=IB+gU529Mwvb5QfE8Y+aYT8wpc41oHC19RHwK4gnCN+HZSdZ/k4i1LlJwMsydSRFbq85rw7ZWdDbVvSwaX/QZjnBRho/8K8HVUnZLU3KGQ+7xB9oR35jeV9Sju0Zf51jDaH+ZKmDLCxxmVIyYqNgxQJmmB8D3EEZoNJpiKhUaGU= Received: from AM6PR0502MB3797.eurprd05.prod.outlook.com (52.133.21.26) by AM6PR0502MB3958.eurprd05.prod.outlook.com (52.133.30.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Thu, 18 Jan 2018 18:28:12 +0000 Received: from AM6PR0502MB3797.eurprd05.prod.outlook.com ([fe80::6c28:c6b3:de94:a733]) by AM6PR0502MB3797.eurprd05.prod.outlook.com ([fe80::6c28:c6b3:de94:a733%13]) with mapi id 15.20.0428.014; Thu, 18 Jan 2018 18:28:12 +0000 From: Matan Azrad To: Stephen Hemminger CC: Ferruh Yigit , Thomas Monjalon , "dev@dpdk.org" , Adrien Mazarguil Thread-Topic: [PATCH v4 5/8] net/vdev_netvsc: implement core functionality Thread-Index: AQHTkInEAXoL0cybm02BR0ncYEA5v6N58qwA Date: Thu, 18 Jan 2018 18:28:12 +0000 Message-ID: References: <1515509253-17834-1-git-send-email-matan@mellanox.com> <1516265026-6469-1-git-send-email-matan@mellanox.com> <1516265026-6469-6-git-send-email-matan@mellanox.com> <20180118102539.02da1cff@xeon-e3> In-Reply-To: <20180118102539.02da1cff@xeon-e3> Accept-Language: en-US, he-IL Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=matan@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM6PR0502MB3958; 7:bZL8KDnEgKglmksjP69duEvNxw4QP5F5ne08+uk0dhTvSnDcLfh56vSM1Lk/bSNVyoph1rQ+Jb2O6Ki8f0DfMgjbX2p2EkhPODP29ifc4HNFC4fRipQ2ZeASXlWP0zX7Jebef8cKzmRnjZW8lT4FXtbesYy+85+H1TboiSSSDZaUhZK7UI1+wgR6sOEuqQxjDOMtHJbsY/+hjbYPl5nORv4iWkccH9E/8TA/Levixu7ymzrgliPwZ5W0YEPXFjhg x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: 8449ca7c-7e8c-4564-5f8c-08d55ea13b92 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(3008032)(48565401081)(2017052603307)(7153060)(7193020); SRVR:AM6PR0502MB3958; x-ms-traffictypediagnostic: AM6PR0502MB3958: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr 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)(93006095)(93001095)(3231023)(944501161)(3002001)(10201501046)(6055026)(6041268)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123560045)(6072148)(201708071742011); SRVR:AM6PR0502MB3958; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:AM6PR0502MB3958; x-forefront-prvs: 05568D1FF7 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(346002)(39860400002)(366004)(39380400002)(376002)(199004)(189003)(106356001)(97736004)(6246003)(5250100002)(66066001)(5660300001)(6916009)(2950100002)(74316002)(81156014)(33656002)(305945005)(93886005)(81166006)(53936002)(8676002)(229853002)(9686003)(6436002)(55016002)(2906002)(99286004)(54906003)(316002)(7736002)(76176011)(6506007)(25786009)(2900100001)(105586002)(3280700002)(102836004)(68736007)(8936002)(7696005)(6116002)(3660700001)(14454004)(3846002)(478600001)(86362001)(26005)(4326008); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR0502MB3958; H:AM6PR0502MB3797.eurprd05.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: LYNlG+RBGsN746QA8Zfscl0t9pw708FK8+xZfhp3yQJ+okrEwUq1z5MZipWMhT5c497KYBKlc3MaHiX0JRA7/g== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8449ca7c-7e8c-4564-5f8c-08d55ea13b92 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Jan 2018 18:28:12.3737 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0502MB3958 Subject: Re: [dpdk-dev] [PATCH v4 5/8] net/vdev_netvsc: implement core functionality 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: Thu, 18 Jan 2018 18:28:14 -0000 From: Stephen Hemminger, Thursday, January 18, 2018 8:26 PM > On Thu, 18 Jan 2018 08:43:43 +0000 > Matan Azrad wrote: >=20 > > + > > +/** > > + * Alarm callback that regularly probes system network interfaces. > > + * > > + * This callback runs at a frequency determined by > > +VDEV_NETVSC_PROBE_MS as > > + * long as an vdev_netvsc context instance exists. > > + * > > + * @param arg > > + * Ignored. > > + */ > > +static void > > +vdev_netvsc_alarm(__rte_unused void *arg) { > > + struct vdev_netvsc_ctx *ctx; > > + int ret; > > + > > + LIST_FOREACH(ctx, &vdev_netvsc_ctx_list, entry) { > > + ret =3D > vdev_netvsc_foreach_iface(vdev_netvsc_device_probe, ctx); > > + if (ret) > > + break; > > + } > > + if (!vdev_netvsc_ctx_count) > > + return; > > + ret =3D rte_eal_alarm_set(VDEV_NETVSC_PROBE_MS * 1000, > > + vdev_netvsc_alarm, NULL); > > + if (ret < 0) { > > + DRV_LOG(ERR, "unable to reschedule alarm callback: %s", > > + rte_strerror(-ret)); > > + } > > +} > > + >=20 > Not a fan of polling for network interface changes. > Alarms in core code make life difficult for applications. >=20 What is the connection to application? It is netvsc driver alarm. > Also, at least on current Azure infrastructure hotplug of netvsc devices = is not > supported. >=20 It detects the PCI device hotplug, no netvsc device. > Can we just wait until proper hotplug API from kernel (ie read netlink > uevent) is done? Why?