From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 22C55A0C4B; Sat, 6 Nov 2021 21:52:04 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AB0A440151; Sat, 6 Nov 2021 21:52:03 +0100 (CET) Received: from na01-obe.outbound.protection.outlook.com (mail-cusazon11021026.outbound.protection.outlook.com [52.101.62.26]) by mails.dpdk.org (Postfix) with ESMTP id C250840040 for ; Sat, 6 Nov 2021 21:52:02 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nad2F9XSkh+BjdxIR9QO/ShQZZabCHr6F4WpLfilfujzIKx/iKRoQ7yeIiVnPJxu7kHCOYC/9WPErq6YlpoRVmnnMiATZlxdZORQUccuaKpTRv698JxquI20B9I/JjfSaee6XNcBWc2LY/Bp9V5CqkXfdx5d/BPc6MeoDFR/jhIpJjnXTIkjK1pY5w94VAKI6BJN1CN/Y+cT1SasPaS5dCYn5YYI7TCuVusL8W29M/R/p/wYrravFKenLRnkvIBEHS8Gx479b0BzB3NfBiggIlBX8b0eQo4YcKiPor8IEOVrB/ZJJBSifTnfRiJa4lkrKymR1UiIFQDJvdVvEPFQnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ZJwAiNpxab7JVDEzeotkKItq4Q2XNLkwpf6LnHUWZuw=; b=UJG6h6Yu1n8G3RV0kIKYTDFxfaQVOYmeSDXbCnYJ1mJZbdoJSNMBL21/ExNqxNpiXFl2A+Y3pnprDF9rWtNFW5Jy+qibWr0AS0XDMMP1FfQ4hFUQYmd1xPkQexk3OI0jzqnvmI6PDl7KFFA37eBY0Z2pv7hTXcO00RWBUUow1Bn1//y8q4Az0EdK176erWbdVk9qHmBQYIDBaT+aQi1o1qOjQ/n+QDgKgKyJf5R73sz8tv6ROcQeATdOp/YzwaTlQjlf2nKH3qyHHXaW1CxeK9rZJvFiEGgAAg8rc/ameoo1rG5nuedvAP0evrbwXyNDZHcQLloTeYn47m4VPdCfbw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZJwAiNpxab7JVDEzeotkKItq4Q2XNLkwpf6LnHUWZuw=; b=BW9ii69J4Qw2RpwH8i5Y8vYQiFdNyOWFBfae1GJgqTJ1s/p4J6+GRbCp6ZKlbpnEKyak6yygEek3lAPNgK/un2gGgG4eeZ68aDf6Tu9YCJV0mrQGiInkD3FizMFrsbgysYKE+cEhf16c7NRumTgbPA8XZ6bm0bODJzSJF0WUxSw= Received: from BY5PR21MB1506.namprd21.prod.outlook.com (2603:10b6:a03:23d::12) by SJ0PR21MB2056.namprd21.prod.outlook.com (2603:10b6:a03:395::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.3; Sat, 6 Nov 2021 20:51:59 +0000 Received: from BY5PR21MB1506.namprd21.prod.outlook.com ([fe80::1db2:a482:d774:93ea]) by BY5PR21MB1506.namprd21.prod.outlook.com ([fe80::1db2:a482:d774:93ea%3]) with mapi id 15.20.4713.000; Sat, 6 Nov 2021 20:51:54 +0000 From: Long Li To: Srikanth Kaka , Stephen Hemminger CC: "dev@dpdk.org" , Vag Singh , Anand Thulasiram Thread-Topic: [PATCH 08/11] net/netvsc: moving event monitoring support Thread-Index: AQHXs6WlXomxNVQuxEq/jnfcYxVEQKv3OOGg Date: Sat, 6 Nov 2021 20:51:54 +0000 Message-ID: References: <20210927134231.11177-1-srikanth.k@oneconvergence.com> <20210927134231.11177-9-srikanth.k@oneconvergence.com> In-Reply-To: <20210927134231.11177-9-srikanth.k@oneconvergence.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=2b318f3c-4536-4c99-91e5-b43e07e291cb; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=Internal; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2021-11-06T20:51:35Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microsoft.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: df1fca10-8e2a-4d10-ff86-08d9a16743e3 x-ms-traffictypediagnostic: SJ0PR21MB2056: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4125; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Omcksn9ysYwafI5i6HrC/dPGHAGNCxU5RBYBbtf67zlG0Hp+9dAQ35J0kjpqyfQjwvfPTpydJjUjl5HYxLjtMLP234qPmPJYapgD6mdE9S/tcFgwX/0+0zBbdKUry/fMp1b5uD950UgxrYT/hRpRKOvwp0HPUtMWoOLR+ridP6i1duHndKh1g78V4AriK6PHDzEkLBIs398eHRQ9PHAMFKEaAE7blR7yq8G7JPH/Ms5kkenLVcjkmzagxSk7GfRqeF2YCWN5jqsiZvH4CExYoP8xmXdxxi/lkYVLCizVTZhciXLOgASkm+WyrLuRsFSmLkGP+rUMKC+UeOZoI1c413ULRWXg/ZVnHGq9OOx+JnjZ7uvbHkCCx0PEx4XbxvhjeKf6FYKfIYPiBU81pirS7SmaLcXZAcGyUIjW3gj/x7mHtfCFnXaDIxu+xntqOsj+SZn5SpTo5unepcOcbrvyaCY5KY88B7yYf/nh8HDAe1EvRm7QTatS7j/S/ItEfAg4G2esX1ypnkWEYun7bAuMUe2CwtaV3xK1wOy+tyhk6xwREWDhRUP8d3Z7mjU16d1eKz/Kwn/t0TvfukD2T402AF1btk6x7Nx56kAWpUmpUFRyhxyUl5e6kJomcwrLVY+F+kI8R9QVuU4H/rIWkpkkbSBxH/tigVnkUxxtwThLf8MEkEl80kjJ9zNug/3uElqda0Pu/JWOfHctay6TZESNhjb6ciZTw81EPW3HsgIdESq1HEUFyM+nlz3vBMUF3QPT x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR21MB1506.namprd21.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(2906002)(33656002)(6636002)(66946007)(8676002)(9686003)(55016002)(10290500003)(71200400001)(8936002)(26005)(66476007)(66556008)(64756008)(66446008)(186003)(508600001)(110136005)(316002)(54906003)(966005)(76116006)(52536014)(4326008)(6506007)(82960400001)(82950400001)(5660300002)(7696005)(38100700002)(83380400001)(38070700005)(122000001)(86362001)(8990500004)(10090945008); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?jKgDmxryhFY43ei5Ni69/1E861UdLe/tu30YLYEMvvBDo+P9d7R+FJghuvTW?= =?us-ascii?Q?OaCK5Y2Y00DwgEBDUv0z8512RLD8OzbmpYOSqLjWsC3rZ4v1B5nkq8g4CxPz?= =?us-ascii?Q?9bkGJn3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/UNVVSfEIKD6fAnH/fmm?= =?us-ascii?Q?knmOO9OLA5r+XeK7EFqwUy2SsxnKYTqMSBp+CL+9al5HSmFjin0YIOFKgxWw?= =?us-ascii?Q?W/yD177KZCq9k38Ph70MEmiczNd35eG2lXQIeQf7i0C7yrbBx7gYujQweskC?= =?us-ascii?Q?QIUaa3Nm/vXODyp+cmUyJLQd1yqFK2dQ2VuHhSoODnn43AugOb1yLk13Wpq9?= =?us-ascii?Q?lAPe+c3uSk6ftJjs/RqOephNPbe32blVbS/AzC3GX3cpg79RNmkIjnCacff0?= =?us-ascii?Q?89GdUDJyatlpb0miUTb1Wl1/BlFlvw/oV3w7m8z6qYgDI6pBbOPc7TEYwjmq?= =?us-ascii?Q?tRhlJzyl6SveOXBaeBxS8ABiqBSwyXRf2AnyYaxu3KmQyOSbdzhkR2lzKWap?= =?us-ascii?Q?jDSBfmyUInW+f0HvgRlv9XrgDP4Lb2p313dBKsMJIObe+69U2KjbI8pIwlVf?= =?us-ascii?Q?amzV4AaTpzGOt9G7r33S2V0KxLbwSwG7yqlaxZsw6Cj6kyzFdPsuugyG9wJM?= =?us-ascii?Q?Pcor32WB9oYRZ+8oKoC11jjouhCyCsAQeaVJf6J2L9ZZuMoyqJFQBkDTU/0a?= =?us-ascii?Q?6kMBYMe1i3haW/dQUDiPFXkjqn/jAriWjxMS7M001hg2+3aNKINPxFlkNoVS?= =?us-ascii?Q?hg=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BY5PR21MB1506.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: df1fca10-8e2a-4d10-ff86-08d9a16743e3 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Nov 2021 20:51:54.1319 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: pj88hH8c3yDkf4NzmFxWIk5eQgZMEMIuNtllC3SEG0vD5H4jqWHKggpAbPGHlZIP6G2IqxipxHbYPG1+Ple+Aw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR21MB2056 Subject: Re: [dpdk-dev] [PATCH 08/11] net/netvsc: moving event monitoring support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > Subject: [PATCH 08/11] net/netvsc: moving event monitoring support >=20 > [You don't often get email from srikanth.k@oneconvergence.com. Learn why > this is important at http://aka.ms/LearnAboutSenderIdentification.] >=20 > Event monitoring is not yet supported on FreeBSD, hence moving it the OS > specific files >=20 > Signed-off-by: Srikanth Kaka > Signed-off-by: Vag Singh > Signed-off-by: Anand Thulasiram Reviewed-by: Long Li > --- > drivers/net/netvsc/freebsd/hn_os.c | 14 ++++++++++++++ > drivers/net/netvsc/hn_ethdev.c | 7 +++---- > drivers/net/netvsc/hn_os.h | 6 ++++++ > drivers/net/netvsc/linux/hn_os.c | 19 +++++++++++++++++++ > 4 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 > drivers/net/netvsc/freebsd/hn_os.c > create mode 100644 drivers/net/netvsc/hn_os.h create mode 100644 > drivers/net/netvsc/linux/hn_os.c >=20 > diff --git a/drivers/net/netvsc/freebsd/hn_os.c > b/drivers/net/netvsc/freebsd/hn_os.c > new file mode 100644 > index 0000000000..3bd67e06c8 > --- /dev/null > +++ b/drivers/net/netvsc/freebsd/hn_os.c > @@ -0,0 +1,14 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright(c) 2016-2021 Microsoft Corporation */ > + > +#include > + > +#include "hn_logs.h" > +#include "hn_os.h" > + > +int eth_hn_os_dev_event(void) > +{ > + PMD_DRV_LOG(DEBUG, "rte_dev_event_monitor_start not supported on > FreeBSD"); > + return 0; > +} > diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethde= v.c > index 6f9053c4d5..61d7d3daeb 100644 > --- a/drivers/net/netvsc/hn_ethdev.c > +++ b/drivers/net/netvsc/hn_ethdev.c > @@ -39,6 +39,7 @@ > #include "hn_rndis.h" > #include "hn_nvs.h" > #include "ndis.h" > +#include "hn_os.h" >=20 > #define HN_TX_OFFLOAD_CAPS (DEV_TX_OFFLOAD_IPV4_CKSUM | \ > DEV_TX_OFFLOAD_TCP_CKSUM | \ @@ -1244,11 +12= 45,9 @@ > static int eth_hn_probe(struct rte_vmbus_driver *drv __rte_unused, >=20 > PMD_INIT_FUNC_TRACE(); >=20 > - ret =3D rte_dev_event_monitor_start(); > - if (ret) { > - PMD_DRV_LOG(ERR, "Failed to start device event monitoring= "); > + ret =3D eth_hn_os_dev_event(); > + if (ret) > return ret; > - } >=20 > eth_dev =3D eth_dev_vmbus_allocate(dev, sizeof(struct hn_data)); > if (!eth_dev) > diff --git a/drivers/net/netvsc/hn_os.h b/drivers/net/netvsc/hn_os.h new = file > mode 100644 index 0000000000..618c53cdcd > --- /dev/null > +++ b/drivers/net/netvsc/hn_os.h > @@ -0,0 +1,6 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright (c) 2009-2021 Microsoft Corp. > + * All rights reserved. > + */ > + > +int eth_hn_os_dev_event(void); > diff --git a/drivers/net/netvsc/linux/hn_os.c b/drivers/net/netvsc/linux/= hn_os.c > new file mode 100644 > index 0000000000..862dc190c1 > --- /dev/null > +++ b/drivers/net/netvsc/linux/hn_os.c > @@ -0,0 +1,19 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright(c) 2016-2021 Microsoft Corporation */ > + > +#include > + > +#include "hn_logs.h" > +#include "hn_os.h" > + > +int eth_hn_os_dev_event(void) > +{ > + int ret; > + > + ret =3D rte_dev_event_monitor_start(); > + if (ret) > + PMD_DRV_LOG(ERR, "Failed to start device event > + monitoring"); > + > + return ret; > +} > -- > 2.30.2