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 8DDD141B8D; Tue, 31 Jan 2023 10:40:16 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 786D340DFB; Tue, 31 Jan 2023 10:40:16 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id A00174067B for ; Tue, 31 Jan 2023 10:40:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675158014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wgbfLdaMTm28LUDZSn37oY4q6bA7rgOpxQH+ahFpfOg=; b=ZFNYvku70abd0RA7ybQbPMkBxwRbqbcetmnctnoQHQsgqMyi16SQWPTDClTJM6UdHHtVXv cYNFdBurNSZxqGfUcibLcLn2KlmO7ce+5arGJz/MhQzZzfxwPMfL5cw1OuvjR4513P2HMF CNT7J6QTY4RsgCC3ZVXRnfZTJwZ6GVg= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-53-ZQWp6EHtMViHhyTHUDsQTw-1; Tue, 31 Jan 2023 04:40:10 -0500 X-MC-Unique: ZQWp6EHtMViHhyTHUDsQTw-1 Received: by mail-wm1-f71.google.com with SMTP id n7-20020a05600c3b8700b003dc55dcb298so3138276wms.8 for ; Tue, 31 Jan 2023 01:40:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-transfer-encoding:mime-version:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=AVSose/w8+Tl+RX3UOofcjxtRSwd8sVxKmcApNPaGxQ=; b=wk0qexhTgIA7SXsNXIaC/R1UcWtDJjh0vwgt/cGS6lKeIfDe2GMfQWWTLK5X0Gc4xi u9g5QnMMaYS+vRn9xmn8MfZAVHLl3CHR8/2I8/tDFXGBRwyinQ936JOknSLpVPV1CGs2 ST6502BZIpaQohhcDR+UhGAtFAfvR5XmAA9AnM5+34PAOD/yjdGMJOP3dMOjB+xadSJc K7nV3lfbUYIiYBniGItwPJUkaqv1OfB14n6mgM0fkHM355Pt8VL6IiQv8cw3srQ7VBpm 28o0jmjQNZu+4LLwh/SbDKhh5Ex5jOhSgbaybsIAcoazjuKuaEmkM+8gE+MyOXUK112h oppw== X-Gm-Message-State: AFqh2kqQD53ap+ihlHg0xQmiju/KnfK41iSKS8k4rjrqaDGpDxy4fKbX N/SKXlUqcI/Ukcm+SKQywo9xXBQAwUotMgdA9pK4zuThf1UM8Oy4yIGu9pDMSgUBD0VP2rcjGkD AA0c= X-Received: by 2002:a05:600c:4f45:b0:3cf:68d3:3047 with SMTP id m5-20020a05600c4f4500b003cf68d33047mr52550941wmq.41.1675158009363; Tue, 31 Jan 2023 01:40:09 -0800 (PST) X-Google-Smtp-Source: AMrXdXvsNntna0jrYxsFHk/+C+4mZSX8zn5GuAe8Pqb3iqQlLUb0SyuxoE+KTsxyGWlIlR//sVDuTw== X-Received: by 2002:a05:600c:4f45:b0:3cf:68d3:3047 with SMTP id m5-20020a05600c4f4500b003cf68d33047mr52550927wmq.41.1675158009160; Tue, 31 Jan 2023 01:40:09 -0800 (PST) Received: from localhost (2a01cb000f483e0055ae3800781b5cbc.ipv6.abo.wanadoo.fr. [2a01:cb00:f48:3e00:55ae:3800:781b:5cbc]) by smtp.gmail.com with ESMTPSA id l11-20020a05600c2ccb00b003cf71b1f66csm17766821wmc.0.2023.01.31.01.40.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 31 Jan 2023 01:40:08 -0800 (PST) Mime-Version: 1.0 Date: Tue, 31 Jan 2023 10:40:08 +0100 Message-Id: Cc: , =?utf-8?q?Morten_Br=C3=B8rup?= , "Kevin Laatz" Subject: Re: [PATCH v7 1/5] eal: add lcore info in telemetry From: "Robin Jarry" To: "Stephen Hemminger" X-Mailer: aerc/0.14.0-48-g7439c9c5a409-dirty References: <20230126152045.1036904-1-rjarry@redhat.com> <20230126152045.1036904-2-rjarry@redhat.com> <20230126090330.13014fbf@hermes.local> In-Reply-To: <20230126090330.13014fbf@hermes.local> X-Mimecast-Spam-Score: 1 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8; format=Flowed 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 Hi Stephen, Stephen Hemminger, Jan 26, 2023 at 18:03: > Alternatively, you could should check for lcore out of range. > > Simplified as: > =09struct lcore_telemetry_info info =3D { .d =3D d }; > =09char *endptr; // init not really needed > > =09if (params =3D=3D NULL) // length check can be handled later > =09=09return -EINVAL; > > =09info.lcore_id =3D strtoul(params, &endptr, 10); > > if (*params =3D=3D '\0' || *endptr !=3D '\0 || > info.lcore_id >=3D RTE_MAX_LCORE) > return -EINVAL; Ok that may be more exhaustive. But even if the lcore_id is out of=20 range, it will not be matched by the callback. Do you think it warrants sending a v8 of the whole series just for this?