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 AE816A00C3; Fri, 13 May 2022 12:30:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5728040DF7; Fri, 13 May 2022 12:30:59 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 3D08A40DDE for ; Fri, 13 May 2022 12:30:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652437857; 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: in-reply-to:in-reply-to:references:references; bh=hMCyqwqHaueQAzmJfHZx3o4EzuZpQt5K18CcJXrfOIs=; b=gjJ1zWNTPEp0WbmahfG/r6JvQvGfYS50htyKFSph11famZ9BDUmZya9+d0L++fNA5Mw58R V03jUnjM3swi6pjxuao6+iUWxV0ZBG1JQMqC6YWWs+RxyLbI4nakEUE+O7VWwt2i3xFo1z +uBwx2owbk4GY+snzZYnNfiHBpJNj1I= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-222-FNM9ZPTsMhqXRD5AUYmkLw-1; Fri, 13 May 2022 06:30:54 -0400 X-MC-Unique: FNM9ZPTsMhqXRD5AUYmkLw-1 Received: by mail-lf1-f71.google.com with SMTP id 21-20020ac24d55000000b00473e75f3331so3389993lfp.15 for ; Fri, 13 May 2022 03:30:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hMCyqwqHaueQAzmJfHZx3o4EzuZpQt5K18CcJXrfOIs=; b=q74Ke0GBPa2H2b+HrDLo+ksIQQRJVq+zkI3ESakhtWwhNBJuWuYcDxzDHTt7DbvKdz eb7HMpmq6hlmp9OJWOFF0Tkf/XM7mE8XdDbwEatbB5velzeb/CIgz0qmMeJnDNpjv8Ca bc/w5cSRxHiYk0h3GzJlI2NM0D5m/7qx5Sld/D3e7Uy4B0V/jfsTfb82SZxjnyxXp56c APMNveiDLj3BGwjsK1LA+9Zq5N+5fa6VEAqZfC1+zFktjWXw9vu3uFD9NTmmsOOoSR0U yivp1pVNOCNl2OrH7YuLdg3g2ZHRjoMpeWLizgSwicwRKvPLeFUWNvAat7rAcUTNSjen muxQ== X-Gm-Message-State: AOAM530EAG6OjQ9hOTRkVypZ8cidPF407fW6QekgdPM4nX1/WiL9iOr8 RCU5+XHJSB5mXw2Es+Sd/vZyo0Q0KwvArLY6sD/yZyOMWRnjk2OIY4t5GwhlLj7v5luYJ+JaMCZ lgtrWgXiJk/NwfIjekKQ= X-Received: by 2002:a05:6512:3183:b0:473:dffc:18ac with SMTP id i3-20020a056512318300b00473dffc18acmr2901800lfe.217.1652437853219; Fri, 13 May 2022 03:30:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3+NJDZ/ltt8IbicH6+/nfeZPj6Wk3GsYN3yNdyT1VWq8KUIiPRH6dvbDp2/cvCUscGlYcwgYVByWA4hU5XcI= X-Received: by 2002:a05:6512:3183:b0:473:dffc:18ac with SMTP id i3-20020a056512318300b00473dffc18acmr2901792lfe.217.1652437853007; Fri, 13 May 2022 03:30:53 -0700 (PDT) MIME-Version: 1.0 References: <20220513075718.18674-1-david.marchand@redhat.com> <20220513075718.18674-2-david.marchand@redhat.com> In-Reply-To: <20220513075718.18674-2-david.marchand@redhat.com> From: David Marchand Date: Fri, 13 May 2022 12:30:41 +0200 Message-ID: Subject: Re: [RFC PATCH 1/4] app/testpmd: register driver specific commands To: dev Cc: Thomas Monjalon , Xiaoyun Li , Aman Singh , Yuying Zhang , Bruce Richardson Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" 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 Fri, May 13, 2022 at 9:57 AM David Marchand wrote: > + TAILQ_FOREACH(parser, &cmdline_parsers, next) { > + for (i = 0; parser->ctx[i] != NULL; i++) { > + ctx = realloc(main_ctx, (count + i + 1) * sizeof(*ctx)); > + if (ctx == NULL) > + goto err; > + ctx[count + i] = parser->ctx[i]; Strange I did not catch it earlier... - ctx[count + i] = parser->ctx[i]; + main_ctx = ctx; + main_ctx[count + i] = builtin_ctx[i]; > + } > + count += i; > + } -- David Marchand