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 E5ED2A0542; Mon, 29 Aug 2022 17:19:18 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D9A7440DF7; Mon, 29 Aug 2022 17:19:18 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id A75EF4069F for ; Mon, 29 Aug 2022 17:19:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661786356; x=1693322356; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=gX8ATEFB+BZQwOqlOe5kvQ0N0MF8CGW4IvzEvUJQxlk=; b=gYd3bLZ3rdtFeXOhecWdifQJYFrmWFuO66iCxRW37sSdmCzP2kdaejyj EyCeQ26Kt+tis/L3OJ2SCynypfjAj8+uuLyu7Du3n6wWacVOXiLuBT1ca aLjidWltkgpZ3v+twiijFUFYKZvqqqq34dvPslE/3gB1JIrsdMsBk/ebs uKbRDNnAEIp4Nqke7eIWDpsYLaIa0ucL0rmGypUFDGgRnrSTMNFtLLQ6L dluR5odRLJVc+MvpbTPmZc9pdtyKhlDAYsfWs2YMLpErO8WFAlX0gUv4p Tbptpbd5qBx6PbWQvKTjXUQOptBwm7uHfPL+ts5+nOwB6v7dgxd2dDE3w g==; X-IronPort-AV: E=McAfee;i="6500,9779,10454"; a="296196031" X-IronPort-AV: E=Sophos;i="5.93,272,1654585200"; d="scan'208";a="296196031" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Aug 2022 08:19:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,272,1654585200"; d="scan'208";a="588198065" Received: from silpixa00401385.ir.intel.com (HELO silpixa00401385.ger.corp.intel.com) ([10.237.222.145]) by orsmga006.jf.intel.com with ESMTP; 29 Aug 2022 08:19:06 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Subject: [RFC PATCH 0/3] Split logging out of EAL Date: Mon, 29 Aug 2022 16:18:58 +0100 Message-Id: <20220829151901.376754-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Following recent discussion on-list about EAL needing to be broken down a bit, here is an RFC where logging functionality is split out of EAL into a separate library. Most parts of this work is fairly straight forward - there are only two complications: 1. The logging functions use "fnmatch", which is not available on windows, and so has a compatibility fallback in EAL. 2. There are individual logging files for each supported OS. For #1, there were really two options to avoid the circular dependency - either move fnmatch into the log library, or to create a new lower-level library for such back function fallbacks. For this RFC I've taken the second option as a better solution. Ideally, more of EAL compat functions should be moved to such a library if we create one, but for now, it's only the one function that was needed to be moved. For #2, this was fixed using standard naming and the build system to only build the appropriately named file for each OS. The alternative of creating a subdir per-OS seems overkill for the single-file situation. NOTE: this is an early RFC based on work I did some time back, and is intended just to inspire further discussion and work about splitting EAL, more than necessarily being a patchset for future merging. Bruce Richardson (3): os: begin separating some OS compatibility from EAL log: separate logging functions out of EAL telemetry: use standard logging lib/eal/common/eal_private.h | 7 ---- lib/eal/common/meson.build | 1 - lib/eal/freebsd/eal.c | 6 +-- lib/eal/include/meson.build | 1 - lib/eal/linux/eal.c | 6 +-- lib/eal/linux/meson.build | 1 - lib/eal/meson.build | 2 +- lib/eal/version.map | 17 -------- lib/eal/windows/meson.build | 2 - lib/kvargs/meson.build | 3 +- lib/{eal/common => log}/eal_common_log.c | 1 - lib/{eal/common => log}/eal_log.h | 11 ++++++ .../linux/eal_log.c => log/eal_log_linux.c} | 0 .../eal_log.c => log/eal_log_windows.c} | 0 lib/log/meson.build | 8 ++++ lib/{eal/include => log}/rte_log.h | 0 lib/log/version.map | 39 +++++++++++++++++++ lib/meson.build | 12 +++--- lib/os/freebsd/fnmatch.c | 3 ++ lib/os/linux/fnmatch.c | 3 ++ lib/os/meson.build | 8 ++++ lib/os/os.c | 3 ++ lib/os/version.map | 7 ++++ lib/{eal => os}/windows/fnmatch.c | 0 .../windows/include => os/windows}/fnmatch.h | 0 lib/telemetry/meson.build | 3 +- lib/telemetry/telemetry.c | 12 +++--- lib/telemetry/telemetry_internal.h | 3 +- 28 files changed, 100 insertions(+), 59 deletions(-) rename lib/{eal/common => log}/eal_common_log.c (99%) rename lib/{eal/common => log}/eal_log.h (80%) rename lib/{eal/linux/eal_log.c => log/eal_log_linux.c} (100%) rename lib/{eal/windows/eal_log.c => log/eal_log_windows.c} (100%) create mode 100644 lib/log/meson.build rename lib/{eal/include => log}/rte_log.h (100%) create mode 100644 lib/log/version.map create mode 100644 lib/os/freebsd/fnmatch.c create mode 100644 lib/os/linux/fnmatch.c create mode 100644 lib/os/meson.build create mode 100644 lib/os/os.c create mode 100644 lib/os/version.map rename lib/{eal => os}/windows/fnmatch.c (100%) rename lib/{eal/windows/include => os/windows}/fnmatch.h (100%) -- 2.34.1