From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0059BA04A5; Wed, 17 Jun 2020 08:40:23 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D2D952B83; Wed, 17 Jun 2020 08:40:23 +0200 (CEST) Received: from mail-il1-f182.google.com (mail-il1-f182.google.com [209.85.166.182]) by dpdk.org (Postfix) with ESMTP id 4847F1E2B for ; Wed, 17 Jun 2020 08:40:22 +0200 (CEST) Received: by mail-il1-f182.google.com with SMTP id e11so1089935ilr.4 for ; Tue, 16 Jun 2020 23:40:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7fJtoENuuzC2zYE9y5bR5j/goDFbi89TOybVLyHNjuE=; b=e+3C2H4QHytzzxMIufwo4nYfRXgpZ7IvVGEVybsVlRQV/1vXCd+8sio3HIL3rVU5gv fslenHUqwy+qN+5jUPNsPv+9xTuGAO8rjFnq5uDnZC8gzUAtwDFb0OEV6ZxafN+FUypN DbfOgXDbGOp/BYMiheomwLH+ITb/7onWFqcvTdh8OnWk5D1vPIoqrkShQAzk7/d5AXLc kPZlDTwXSH9oof7jCpxfIY4NwRxbemq0NOw0Kum0vjWRwdUBFdlCkKHGpvWO2FGSFnoa 8505/JoTmyuHXyds1gSjwegAMPrhx+pQCVcJ7lui205DOhwHhJ2XdtbVCkGqcXDye/// ATjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7fJtoENuuzC2zYE9y5bR5j/goDFbi89TOybVLyHNjuE=; b=eBQhGJ6KzbUtiSDDc5Zyd2iWiGM9/zpQ9C3inWaTCPaIWYHpZXLmxM8CyLh7vrbqIs X8ro6kfT86t0hGzdrlkprR05clFeQT1VWAeuzM3DBTW8CkBvOZZ6qmUOoXIOKs6GPNS6 qrBsrb9Lspz+rLGGY5rC2uT9STOxeRuqBmizYNWasJYG/P85/j3u/Jo63eldk1Hdq045 7olx0Qx+4SwI7I5jKJQx9rV/XNqOrXcDzoKnONSj870Qc6zsicBiSaZe5ROqFReH0mHh /t4V1Bhz+KHtXLq6CHUxiRdMTrkeKvVcsvHlamgVaLAdcaNgJnZdr7xGtdawYXmbZZZS dLhw== X-Gm-Message-State: AOAM531ViBXT3S1aVVo0SA5GiTgTC8Kfjw6CtFGy8XMMJPmvwRoXsuvO YJ0EDjOaPX0Ynznbcv+ChjFuWYHA7hLjBe24Ylw= X-Google-Smtp-Source: ABdhPJz1y4p7Gd3+//NDOblM0iLMQqWY2+QBib9X1oxg9RWvWr23n5TxyfhohK5HN+E38lYzenlFUTHE3y63sa8eSxk= X-Received: by 2002:a92:dc47:: with SMTP id x7mr7225652ilq.130.1592376021674; Tue, 16 Jun 2020 23:40:21 -0700 (PDT) MIME-Version: 1.0 References: <2698909.XInfi7kW1d@thomas> In-Reply-To: <2698909.XInfi7kW1d@thomas> From: Jerin Jacob Date: Wed, 17 Jun 2020 12:10:05 +0530 Message-ID: To: Thomas Monjalon Cc: Jerin Kollanukkaran , Olivier Matz , "david.marchand@redhat.com" , dpdk-dev , Andrew Rybchenko Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] rte_log simplification using constructor scheme X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, Jun 9, 2020 at 1:55 AM Thomas Monjalon wrote: > > 27/05/2020 18:05, Jerin Kollanukkaran: > > +#define RTE_LOG_REGISTER(type, name, level) \ > > +int type; \ > > +RTE_INIT(__##type) \ > > +{ \ > > + type = rte_log_register(RTE_STR(name)); \ > > + if (type >= 0) \ > > + rte_log_set_level(type, RTE_LOG_##level); \ > > +} > > We should consider using rte_log_register_type_and_pick_level() > which works for drivers loaded later in the init sequence. I sent the first version[1] based on the current driver usage to avoid any behavior change. (Major work is changing the drivers, we can decide the RTE_LOG_REGISTER definition in next versions) [1] http://patches.dpdk.org/patch/71650/ I will send the v2 based on the consensus. Please comment on http://patches.dpdk.org/patch/71650/. > I feel rte_log_register() could be deprecated. No strong opinion on this. @Olivier Matz , Thoughts? > The other question around log level is about the default level. > Do we want to allow having different default log levels per log type? Currently, drivers are using various levels per log type. I can send the v2 based on the consensus. > >