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 10F5845BA3; Tue, 22 Oct 2024 17:23:27 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D29564029B; Tue, 22 Oct 2024 17:23:26 +0200 (CEST) Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by mails.dpdk.org (Postfix) with ESMTP id 35FE64029A for ; Tue, 22 Oct 2024 17:23:25 +0200 (CEST) Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-71e3fce4a60so3893349b3a.0 for ; Tue, 22 Oct 2024 08:23:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1729610604; x=1730215404; 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=GLC14b+HCu9YRFDF2YtpiftqHXC64waffi/3tKw12y8=; b=IGbBOS1ikUCw+kHc7Ht0c+i3/CeHMFwd2mB+AVAsxc6uZiyPjgkESltutLTNFCHVIA AnsEmr43xV9HYfW1W/BK+9ujDxSZLgKg/FTzxj+xWxFDVP3jFWmrjI/+ZrxwpWcBdfXS kAvUPmUCw0q2DE4mJNffQOud4hFnZUVI3ukBVxKY3sClx6+gaadc8n6vpVVu5EJbl6+0 crOMr2KDxRMeEAx2kZVE74I06qhVpAa9hj0h+4mDUlwXMRwvXuUnzDoWXOUjX5VHDPgS M8zAuD9GjZPa+KITfMWk4IitgM6gn6zy6358nnkPmvxEMKT5bEdQfp72ZNyvtddIbOcp eUSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729610604; x=1730215404; 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=GLC14b+HCu9YRFDF2YtpiftqHXC64waffi/3tKw12y8=; b=jP9p0mLQ0R1jBBRtO9nCIjAQ3DzxqC80jFOMmOSbL9rTHLTKsVG0uMPeRcIADo1wha af6Uj8NLh4kRdImvyIRfP+F8GBZ191J0CDukv3rXJ/RKBXSW13f4anwX1G9YPtS1o10b 9CHRJ0HDnXIofUSXFkv9No/vpNvlaDG7yw2SZZjNIxjyZ7T17vfaIhheDDxhdEUDykjU Z21kzUX5v6h4Juzg5wSSB4vEmMcRRn2bU3wTraWmc4rr3JM6HQsOmJBHwMrapT4Dd30A eRagpww9h8w9AA95jO+QHZOCWYu+7sm+TxZONIfowhXuDpW+5hzoJfeK3Q8BxIWm12ql ej4g== X-Gm-Message-State: AOJu0YwMz2T4z+OT1TgTS+KANAXMHTdqKbtpxA5rBAsanZ2/O+fcOlFf J2Y3g0LxE29HjHSihdRXqL5twKNkNuWtuPgaLSN8NnBlNBny9nJ312XBFUwz2Xc= X-Google-Smtp-Source: AGHT+IFMaKrHfUzhOoFaMjcsEN4rPsSdr20sBnvQEPoGMif/fSqQtaHhCFFMixcpWVOgCghQ0/+8qw== X-Received: by 2002:a05:6a00:854:b0:71e:77e6:ad89 with SMTP id d2e1a72fcca58-71ea32d421bmr16578029b3a.13.1729610604338; Tue, 22 Oct 2024 08:23:24 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71ec1407f63sm4869439b3a.204.2024.10.22.08.23.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2024 08:23:23 -0700 (PDT) Date: Tue, 22 Oct 2024 08:23:22 -0700 From: Stephen Hemminger To: Mingjin Ye Cc: dev@dpdk.org Subject: Re: [RFC] net/ice: add devargs to control link update Message-ID: <20241022082322.44e0004b@hermes.local> In-Reply-To: <20241022062043.1833554-1-mingjinx.ye@intel.com> References: <20241022062043.1833554-1-mingjinx.ye@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 Tue, 22 Oct 2024 06:20:43 +0000 Mingjin Ye wrote: > +static int > +ice_parse_clean_subtask_period(__rte_unused const char *key, > + const char *value, void *args) > +{ > + int *num = (int *)args; Cast of void * unnecessary in C. You probably want period to be unsigned not signed. > + int tmp; > + > + errno = 0; > + tmp = atoi(value); > + if (tmp < 0) { > + PMD_DRV_LOG(WARNING, "%s: \"%s\" is not greater than or equal to zero", > + key, value); > + return -1; > + } > + > + *num = tmp; > + > + return 0; > +} Prefer strtoul() when parsing values, it allows for better error handling.