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 1DF1FA00C2; Thu, 8 Dec 2022 05:07:21 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0162D40E28; Thu, 8 Dec 2022 05:07:21 +0100 (CET) Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) by mails.dpdk.org (Postfix) with ESMTP id E37F540DDC for ; Thu, 8 Dec 2022 05:07:19 +0100 (CET) Received: by mail-pj1-f43.google.com with SMTP id w4-20020a17090ac98400b002186f5d7a4cso3423642pjt.0 for ; Wed, 07 Dec 2022 20:07:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; 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=d47UHdtQjyxOoOyZdJEp3Pf+2NYK/XJk6Rgmk9RwBX8=; b=RqoOHRaqOZyTSq33H+8uSE6eVgCIBngX9yk7bFmpNUVXslSKhe5Igr5b6hHX4LzwcI KHVcZmDrasBGJKvCrQopFjyipebm3lvYuSDu/3TDodT5TDg6/M23cFxOhM6jGb/dQ41a jurnCkGZW5QokvmQ/3UxdoQRAliZRA5qw40Myn2KdmOKgnFZPlHjsbwH7ev2nQTbxx6g GAhy/lnafbb/8QJVkKWwTuqQXoLcOai4VG3xgdA735xyf+5o86mz67ocztUAGYCvHEM8 lM9J9b1Ek/3vj2VfSga84ziTsNly4DAKDUOIUhL6o/+VwB6qSOWAEHAp2+VYz2lG85pR Mv/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=d47UHdtQjyxOoOyZdJEp3Pf+2NYK/XJk6Rgmk9RwBX8=; b=xn7EHs2sBjgNydYtHcpb3CFM+NkMUDaVTWC2o1DnmV/fLDh/wJMaqH2coNxBBEv49q nSQdLOJsHPDZBRmGCxI4BdILAoRQQN/7ZuGbfSRAzFS3cRmD6cGCu1D8klZz5L1m4Ey+ fxdNxgR12L0xL6Ftas1Gz0nnon7RY9sccQCoL0RREC4VhEv4ksPoW3HQ/YPNW12bfLae xUQaC/3h1xu2QskB1D2wYNIbEgL3FxVrIJQ6/Yz2/4eXT7xynNNywtdtyIMqJ6Unu9k9 jtLv72nP5IQ59EELeqU+gfpWxgDO7DZHzH3mplizA5CAyy8x2J3aR+a+nsZx6ObBC32w XGAQ== X-Gm-Message-State: ANoB5plQBCrVfzi01ronwU97t3VHne8VkE/NzDa5XUALbZodmDU7aTTK /nFVFwXRDUkNrLGpSQD5MppzfzW25f2IgkMQLkI= X-Google-Smtp-Source: AA0mqf7hMuHG3KWUj+b7rENO9bNuuv9MYYuX5NGWZ486yEaes9CNgbmand8KvtRus4w0GvRQ9X5MFA== X-Received: by 2002:a17:902:74c5:b0:187:dc9:ef64 with SMTP id f5-20020a17090274c500b001870dc9ef64mr1454388plt.60.1670472438967; Wed, 07 Dec 2022 20:07:18 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id jw17-20020a170903279100b001868d4600b8sm15348445plb.158.2022.12.07.20.07.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Dec 2022 20:07:18 -0800 (PST) Date: Wed, 7 Dec 2022 20:07:16 -0800 From: Stephen Hemminger To: Tyler Retzlaff Cc: dev@dpdk.org, thomas@monjalon.net, david.marchand@redhat.com, olivier.matz@6wind.com Subject: Re: [PATCH 1/5] eal: add lcore set name and get name API Message-ID: <20221207200716.704ea76a@hermes.local> In-Reply-To: <20221207223331.GA26293@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <1670439617-9054-1-git-send-email-roretzla@linux.microsoft.com> <1670439617-9054-2-git-send-email-roretzla@linux.microsoft.com> <20221207130341.30d6f22f@hermes.local> <20221207223331.GA26293@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> 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, 7 Dec 2022 14:33:31 -0800 Tyler Retzlaff wrote: > On Wed, Dec 07, 2022 at 01:03:41PM -0800, Stephen Hemminger wrote: > > On Wed, 7 Dec 2022 11:00:13 -0800 > > Tyler Retzlaff wrote: > > > > > +static char lcore_names[RTE_MAX_LCORE][RTE_LCORE_NAME_MAX_LEN]; > > > > This copy would redundant on Linux. > > > > > + > > > +int > > > +rte_lcore_set_name(unsigned int lcore_id, const char *name) > > > +{ > > > + if (unlikely(lcore_id >= RTE_MAX_LCORE)) > > > + return -EINVAL; > > > + > > > + if (strlen(name) >= RTE_LCORE_NAME_MAX_LEN) > > > + return -ERANGE; > > > + > > > + (void)strcpy(&lcore_names[lcore_id][0], name); > > > > Why the void cast? > > it's a common convention used in various open source projects indicating > the that ignoring the return value is intentional as opposed to being > sloppy or accidental. > > if it's a violation of dpdk style i'll remove it. but i have come across > a lot of dpdk code where i honestly can't tell if it is on purpose or > just sloppyness. (sticks out in code reviews too). I think it is an old BSD lint ism. Haven't seen it used in years.