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 2B65344156; Tue, 4 Jun 2024 18:17:46 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0605240A6D; Tue, 4 Jun 2024 18:17:46 +0200 (CEST) Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by mails.dpdk.org (Postfix) with ESMTP id 70BDD4026E for ; Tue, 4 Jun 2024 18:17:44 +0200 (CEST) Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-1f6342c5fa8so33317275ad.1 for ; Tue, 04 Jun 2024 09:17:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1717517863; x=1718122663; 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=jk0IWWfZW6BjZrSEQaRkodljjaof0yfDtIboyKi6YfM=; b=xJnlT8EUyWLTu8VccjXWW2GqlM5mrchv4CfUZdlrGIFrcDEXEc8K/5R3RLmt5IsVyw wcY2W4E7OhEtCFC7A0Vjg0+qaXcWlZQlX1Jl/IoLh3EWQYlaUmqEgXDPEJJRB5FnPj8L cPS2tnVI5lROsCupWh4WLvFNjsGre5G1yYf1kSPjiOQLYHKlYuOCgvITpz/sq+hVfpjs 7Vx+g9EE7jm1aDVdt8vmWdsG2MpHv/KxM35mSR0jamspctEejl1XDG7aXT3MAIZaFDYN Hk4majqI/sGof+Sd0IPkBc1ul06AZKeJBUEntAg+EMQl0/EqyeL8dLaYV32Jil1d80bp 2wsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717517863; x=1718122663; 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=jk0IWWfZW6BjZrSEQaRkodljjaof0yfDtIboyKi6YfM=; b=JSAPAyDxiujozIvrQt6BAf9CTJf3HCK8bEXbA5g1/3Giod7+S/70Mah4QnKcyBZadZ JwJwkTNC2bvPeU2aoLHfLZ2DcWvmwrRSlF0Z9nGCaXdBAG75OHmgCmvXr3JV4Gf8+X1C 9zOnkPzSKPDEo3Ce8hRk2lgvWCLZto987o4jOZxIHWHRTeLMlh4SX4WEjQuIOGB3o/Cg p4IPZu5D/jXZyHXs80QZ1DvnoSK6i6plR9uP8ZKRGqSNMZ5iF25mF5DU3O6ya7jZUScE DjPESb2btT8kSPU3njm+BIow4ou7wYD5LI/U1fTucVrF0n/DnUWlRZJrglKSrfXNkD7b trpA== X-Gm-Message-State: AOJu0YyZHXcuwE54uJMVAlXMSzxm9dB8+2GCQVVWBcgwE0OF+bxEvT0T 7ZejPXCcDNVRVey9az1ve19eeTaK9H707xPaGY6/nM2h96rdzKN33mbkjIffX+s= X-Google-Smtp-Source: AGHT+IFeSfveHzE7Mbc8+jr508rsaExgN9oVGTIorY+6r+ZGTOeHcz+cqIg4UQiITChRTk5QBISHOQ== X-Received: by 2002:a17:902:d2d2:b0:1f6:857b:b5c with SMTP id d9443c01a7336-1f6857b4df3mr51662365ad.32.1717517863433; Tue, 04 Jun 2024 09:17:43 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f63232e0d2sm85209765ad.40.2024.06.04.09.17.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 09:17:43 -0700 (PDT) Date: Tue, 4 Jun 2024 09:17:41 -0700 From: Stephen Hemminger To: Shaiq Wani Cc: dev@dpdk.org, bruce.richardson@intel.com Subject: Re: [PATCH v4] net/cpfl: get running host ID for CPFL PMD Message-ID: <20240604091741.3855caf0@hermes.local> In-Reply-To: <20240530093958.801348-1-shaiq.wani@intel.com> References: <20240524040553.487093-1-shaiq.wani@intel.com> <20240530093958.801348-1-shaiq.wani@intel.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, 30 May 2024 09:39:58 +0000 Shaiq Wani wrote: > + if (uname(&unamedata) != 0) > + PMD_INIT_LOG(ERR, "Cannot fetch node_name for host\n"); > + 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? Also, please put one blank line between functions, it makes code easier to read.