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 382C7A034E; Thu, 17 Feb 2022 17:30:41 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9D24D4117E; Thu, 17 Feb 2022 17:29:38 +0100 (CET) Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by mails.dpdk.org (Postfix) with ESMTP id C5D07411EB for ; Thu, 17 Feb 2022 17:29:30 +0100 (CET) Received: by mail-pl1-f182.google.com with SMTP id u5so5011148ple.3 for ; Thu, 17 Feb 2022 08:29:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ywkCXuVm3b/XC3yTDXUPChmPv9rAtVkvYsTqd5gxtdc=; b=es8ie4XfinpDqiteHkKfxWENQtxs/wWdsLL2dedUCZL+uiCmq6RCxljb/+YM978HOz p9W40q+GadtygBYKxPIA/YPYrnSFww660swHZ8EEF8cTbdcESKVHeShT+BtsHrIU3+V5 4hTvKTPZlpYicTa9N0FoDxT+4PVILk0K4oJKA73xpVesLOJxKJvjeYYAG3+YT25rnVxy /5jarfWV8oA87uZImCzpioCSX4m58v1/fOaXk0M7iQfrAjq8jmIhNzhxKGFW2ufuqTc6 99p/5rQqXRfT805Xy0ZUGKcsEkoo2VBYezWAReH3XTzs2QndZI2gg6w+/Imeahn0+KBi QfBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ywkCXuVm3b/XC3yTDXUPChmPv9rAtVkvYsTqd5gxtdc=; b=PL7eqMeNNg++Z2R0UWnAy4fxBp5LgTgmBzhKQfEEogU4dj/uCvWIvriKMTJ3HTm2/X 4OhwvlOeLcJhGj9qTTEDqqUG2K67Ro+DdGFhpwe43Vns916fLIctoHmBFEKngyKmZXHh 682ysHBmbapCY8gxUqD/P56S8t2LqLTvBiVWrk1hFawN5arJJfC9r437XmKxhgrC2be1 MocZh0Y8/MWLrFuC9xIuS31TEa2H2szhvtPhsFUgqv4QRBqDG+K7CvaeVwx/Ut9VZbK4 AiCc4G+7cZSOQnjSGuEv+RCUE8vFyHLlSkh41Hs53C7CxgDtncVsmjcZwxCvFa+2upN8 cu3Q== X-Gm-Message-State: AOAM530gE4PbvqIxdO87fUFjA7TVJcMqnHnq3mWfpVY70GmHsyjUxxcH 3zW0eBGVGPvKeEEUSStizqMAdA== X-Google-Smtp-Source: ABdhPJwY8Yedf/2Tq4u54JKjaotfr9wgdyhPawWVMy4/GXsCgBuUXpAP2k/5YjHkblplSfcvUNubNg== X-Received: by 2002:a17:90a:67c7:b0:1b9:b5ed:3f19 with SMTP id g7-20020a17090a67c700b001b9b5ed3f19mr7980780pjm.90.1645115370020; Thu, 17 Feb 2022 08:29:30 -0800 (PST) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id h5sm139805pfi.18.2022.02.17.08.29.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Feb 2022 08:29:29 -0800 (PST) Date: Thu, 17 Feb 2022 08:29:26 -0800 From: Stephen Hemminger To: Srikanth Kaka Cc: sthemmin@microsoft.com, longli@microsoft.com, dev@dpdk.org, vag.singh@oneconvergence.com, avelu@juniper.net Subject: Re: [PATCH v3 01/15] bus/vmbus: scan and get the network device Message-ID: <20220217082926.2578571b@hermes.local> In-Reply-To: <20220217160613.70161-2-srikanth.k@oneconvergence.com> References: <20210927134231.11177-1-srikanth.k@oneconvergence.com> <20220217160613.70161-1-srikanth.k@oneconvergence.com> <20220217160613.70161-2-srikanth.k@oneconvergence.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Thu, 17 Feb 2022 21:35:59 +0530 Srikanth Kaka wrote: > +/* > + * GUID associated with network devices > + * {f8615163-df3e-46c5-913f-f2d2f965ed0e} > + */ > +static const rte_uuid_t vmbus_nic_uuid = { > + 0xf8, 0x61, 0x51, 0x63, > + 0xdf, 0x3e, > + 0x46, 0xc5, > + 0x91, 0x3f, > + 0xf2, 0xd2, 0xf9, 0x65, 0xed, 0xe > +}; > + > +extern struct rte_vmbus_bus rte_vmbus_bus; > + > +/* Parse UUID. Caller must pass NULL terminated string */ > +static int > +parse_sysfs_uuid(const char *filename, rte_uuid_t uu) > +{ > + char in[BUFSIZ]; > + > + memcpy(in, filename, BUFSIZ); > + if (rte_uuid_parse(in, uu) < 0) { > + VMBUS_LOG(ERR, "%s not a valid UUID", in); > + return -1; > + } > + > + return 0; > +} > + > +/* S Since this code is copy/paste from the Linux version, could you please put it in either common paraent directory or in a new place unix/? Two copies means bugs have to be fixed twice.