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 4488E44162; Wed, 5 Jun 2024 20:05:26 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 312F940687; Wed, 5 Jun 2024 20:05:26 +0200 (CEST) Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) by mails.dpdk.org (Postfix) with ESMTP id A7C3D402E1 for ; Wed, 5 Jun 2024 20:05:25 +0200 (CEST) Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-1f480624d0dso1384535ad.1 for ; Wed, 05 Jun 2024 11:05:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1717610725; x=1718215525; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=8VFhXd3NL8iSG8MUeB1erhCSLWRfZC5Ne23PT+exAjU=; b=cOlMU2881ex57tij/rBeNrY+/DLnmZaTSlbG5fnkx7ojlQudso580ZSDvAbVVeYSDo pb8gXGU7iqO6LQvUKxh2lEo+f/9XG5tu2lm6rTXMikUTwL5UMI3miTMM0gzfScbmUaGw SZxFa1Wg6kev3k4hIL/rEKu11/e6aSXVWW7kkMe3PrrNHcLwB4Fcvh5jpIQPUkZ+SERA EpiJRWuBJQ0wwU2x0pCBeT8HKmVMx6cxd3DEJj+jnaVH5yNfQ8hgCsrRU8TNt96GaEFC i4xawVI4xX5JCQ2wPouC7di3vO0Bf/zxZgFcgPVdSud3sYjp9lS3kGOnT/8F6XO4U0FC LUNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717610725; x=1718215525; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8VFhXd3NL8iSG8MUeB1erhCSLWRfZC5Ne23PT+exAjU=; b=dIZaTTdBAqfbQVoM5Gz50GLUtQKglSQrs2Oeq9zRW39Cckz6dXIf9VTspkNzpVyUye rYvtRJc1P0STV8wqUtF6YT1frJ3IYVf0UGL2KATxYWrNY8aPhiQszguYfJjfEMNW5X3Z X1NFtTAgRB5PROqwQbn3fDJP/AmGR+u20Z8RrRhJ0/MG+BZah/9uDsljPdoLMm/0Ruxd QC+2iqAwDBHDT3a1Sgwvi25XkDlzHKaG9EJhFF9fmEH4NYBY3asz2wF3XkpxbFecAB9T yWYSX1yW2uHmeeigQ9jlmykdvl7cb53zhKb3gZNKORnV75Lb8VaoAvZbwQpGbvMjMn5g 4fXQ== X-Gm-Message-State: AOJu0Yzstc7G0dBvbI6/kIgJNUT9KpKNSM7TlX7m15lF45YmlY9Ow2XW Ax+XAbFbO0x/1ALQivFbxGwR3tbVC5zhrXPehRbsL8zlOJnrt3FAxZW/HyG5YYE= X-Google-Smtp-Source: AGHT+IH/w4CKfJDuAXBzy0UrFEGfonIPuQXMrLBn7Lp8Wx3XLrdv/H4yqgyzaNA0YoO3HB1yQ2zvRQ== X-Received: by 2002:a17:903:182:b0:1f6:628a:1971 with SMTP id d9443c01a7336-1f6a5a80de1mr41202935ad.57.1717610724730; Wed, 05 Jun 2024 11:05:24 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f6323dd862sm104735655ad.147.2024.06.05.11.05.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 11:05:24 -0700 (PDT) Date: Wed, 5 Jun 2024 11:05:22 -0700 From: Stephen Hemminger To: "Wani, Shaiq" Cc: "dev@dpdk.org" , "Richardson, Bruce" Subject: Re: [PATCH v4] net/cpfl: get running host ID for CPFL PMD Message-ID: <20240605110522.784bb637@hermes.local> In-Reply-To: References: <20240524040553.487093-1-shaiq.wani@intel.com> <20240530093958.801348-1-shaiq.wani@intel.com> <20240604091741.3855caf0@hermes.local> 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 Wed, 5 Jun 2024 05:48:39 +0000 "Wani, Shaiq" wrote: > > + if (uname(&unamedata) != 0) > > + PMD_INIT_LOG(ERR, "Cannot fetch node_name for host\n"); No newline needed. > > + else if (strstr(unamedata.nodename, "ipu-imc")) > > + PMD_INIT_LOG(ERR, "CPFL PMD cannot be running on IMC."); > > + else if (strstr(unamedata.nodename, "ipu-acc")) > > + host_id = CPFL_HOST_ID_ACC; > > The nodename in uname is the same as the hostname. > This can be changed by user, is that ok? > > We are making an assumption that user will not have hostname as ipu-acc or ipu-imc. > If this is okay, I will upload a new patch taking care of the blank line between the functions. > > Also, please put one blank line between functions, it makes code easier to read. > The blank line is not important, but there is something that is worth adding. Could you add something to the NIC documentation and/or release notes if necessary.