From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0085.outbound.protection.outlook.com [104.47.42.85]) by dpdk.org (Postfix) with ESMTP id 44DB91BB46 for ; Fri, 8 Jun 2018 19:25:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=I2/IoIHc7sjkvoqdb8j4sVGLluEpeVt7PnqUeb6ANJM=; b=Pyvk42+zFfCcvbAQRc6i1OyosZXKR8It+wfWAyCGtT3mv0QwBKtLs+btb7og8NMH3fOBTg8kEwsmwDWO22Ybx0uynQTDZ/Qwh9DSFXlimfDC4DogMDAEdZ3rwdKsiIfuezBSGrpXnMMCNjVpq2OqUPyEgcK0aP3Pu0lfd92sKfY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Anoob.Joseph@cavium.com; Received: from ajoseph83.caveonetworks.com.caveonetworks.com (115.113.156.2) by DM6PR07MB4906.namprd07.prod.outlook.com (2603:10b6:5:a3::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.841.17; Fri, 8 Jun 2018 17:25:04 +0000 From: Anoob Joseph To: Bruce Richardson , Jerin Jacob , Pablo de Lara Cc: Anoob Joseph , Hemant Agrawal , Narayana Prasad , Nikhil Rao , Pavan Nikhilesh , Sunil Kumar Kori , dev@dpdk.org Date: Fri, 8 Jun 2018 22:54:01 +0530 Message-Id: <1528478659-15859-3-git-send-email-anoob.joseph@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1528478659-15859-1-git-send-email-anoob.joseph@caviumnetworks.com> References: <1528478659-15859-1-git-send-email-anoob.joseph@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [115.113.156.2] X-ClientProxiedBy: BM1PR0101CA0050.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:19::12) To DM6PR07MB4906.namprd07.prod.outlook.com (2603:10b6:5:a3::11) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:DM6PR07MB4906; X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB4906; 3:VMoWJFiNr9n8UtvK8/CKWvme2uFAl/MvsCu665e6MocQDd4wlA+IBhb5Kt7Mwl+SASAkSGxqEtzY7hMjOgq7XOZ2np8sBBg9TD/r9ZaYVb35SpzgI2DSBkutUB2ZJriYNUFSB9ZUpJjyb8+p48EBfBws+F7HpidjcK/uSkuzDUzoD9hCVIK9n6s122h5XPkoqZ+pY5zfuAxLXF/EmCbbU2Mi1Deq0xzSCevi/Wv8BlQjt8yFgtHXr7mbUDj/AgGt; 25:VFqR0L3CVS5sKe1MglTsFipfMq0ycuiKF1QuVUDHgMaJAs81nv44A/xgcxzeHdeQkd91ymzLdaqDsufDLX+U3wztC9Q2i/tAg7ELdS9vkRGyu54gJFZ8HXDYZSOqtvas781vPy81hXpq9lq5707+vrea3FsfERCuO9TlGFPMBjh9qRk5HRku/8y1FUpZv+ytRkwn0bjOfYfB2ZTiDRj5dCLN0eB+xxIxXbeog2oubJIQ5OU4oWDwuLOK5d0Trac9/rZM0i0hGTCMuFYFNfsk/+j2R7nAPG7FCL7f6BWRiX33W00kVSPZfTxmSUadmoQeOpf6WvOMBS1pInqnxIpTLA==; 31:XkC110OATp1XV8CVlLTZAWxmrW6IXyn078XYzQe6clXRW04YCVPkWG8FWVmaV2Ffixqc1UEI0Tz889bgeW19DmuVTm7saK/sivEVRH7fvgaorff9GzLRxyx+3zX6vbKe9TNl7Qc3DiXSwLk0Kczk8hqAaOMWWDPKZuQKHXEoxNzpn+zua5F8Dmbn052RQEOMSNYED0FGmoMlwz4AdysNRtq8iX14KFi8blbJ+2k5Oqg= X-MS-TrafficTypeDiagnostic: DM6PR07MB4906: X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB4906; 20:8gPFT+YVnqVIw//dQQ96OtqYMLkOu28eibB/os7mfPqORgV0GgCL7sr/0r24uTEXrNRxrqjoCfGWfvq7LTULZ4wctkMAvAa7UQlg+9ZW7RAXBSANSomA7/KsOgY+rndczBEnR1j2WCvurRomf4DEi/t/aofpPwIoSslzpa+9Otn2GwzDLpO7D8R3iQYDtEEQJKr+KaMx5Cfjd99j523mWI3VewaxFfFQorn2rrwVDkV5XaPg9ZY/TixOs5H38EV4f9i6sSeC6WIseO+fiJVJckwbkY5BNC61ZQn+fGqcI7bC1nglCH9z3lRVJl5E8VLsX/ALk5Wk7Yfw+lJZppu3BmQ5UjM0LSsx353d6qE1DQ1KT0usFlDnvQBOeqoF6BobFEITypzsdBZQmETcmnr0ZpAapBfDUo/AhcNpkvWJj5MGprzc9l1+Mmjt6BeBFPjvfi+r0REEjZp+CPB6oA8C4WnBKIOOdwlRYCYsvFbIu7fJ/awv7XiDz3/iSHqwI+k8VJzSgJqWUpSX4VF724C5fG4fkKLhJ+DRCLBu7WLxfY/v8tqdux1gEkHG4Jud8T174A2JVPyEVsLflsPsVjcAg59PGV2px0DE4M4g8IKN4Kk=; 4:XKl8DngEPxEJIfk1a05mrpQl0OU/jG0Jld+sy9CXvv1Ook2jsSNVZdyt2m1w3iOW7dXgUBa4YsTUQ+Z9p6bGzu394YasYzwqLIJh9VrE5rxIKrluirSpra/LjjbUqgEXrRoh/ELT7tRwq7OZJwKp61QrcN2QAa5dUv56V7+IHQNLZy+F7Nr2Z+/CD4PLY48VuE7wEvmwt7g3gTZZz3ZvLkiz5/mdzfqW1prg/OB/q/+TdYAV9WlC7ClFHQbst/eOxyQfWz5Lf7g6RNqZ4vOjPA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(3231254)(944501410)(52105095)(10201501046)(3002001)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123562045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:DM6PR07MB4906; BCL:0; PCL:0; RULEID:; SRVR:DM6PR07MB4906; X-Forefront-PRVS: 06973FFAD3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(979002)(39860400002)(346002)(366004)(376002)(396003)(39380400002)(189003)(199004)(186003)(16526019)(5660300001)(26005)(42882007)(55236004)(66066001)(47776003)(68736007)(6666003)(305945005)(2906002)(8676002)(7736002)(8936002)(36756003)(52116002)(2616005)(956004)(476003)(446003)(50226002)(575784001)(81166006)(11346002)(44832011)(6506007)(386003)(486006)(76176011)(51416003)(48376002)(50466002)(97736004)(316002)(6512007)(25786009)(53936002)(6486002)(81156014)(4326008)(3846002)(6116002)(16586007)(54906003)(110136005)(105586002)(106356001)(72206003)(478600001)(8656006)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR07MB4906; H:ajoseph83.caveonetworks.com.caveonetworks.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM6PR07MB4906; 23:GIOT0eUq3Bt262Ymbly8NXN5+pbgl1DQwYGo/H983?= =?us-ascii?Q?1ulBfRR7msIdYEAiLrkhZcyFCHGgCYvJvgyp17YOxfApWV0Qsq9Fl4seTROk?= =?us-ascii?Q?X6x6bewVX8iSzFfI8A6lAuOgRhlS/t1o9CBR1fgN/UFnszG2uxM2nG3BCdTx?= =?us-ascii?Q?tJfyMVTlNPlRxxLPb1Dmb7cM2yG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BqY4TY8/PMoh5OvcJplhzk5W8F+oriIJMOdsPQdtVAnmEp62HlyHKxNJdxla1SvOQqyA==; 5:JxTc+C8iCKwFB+Zz2KUVMAGjHHV3Yir3wYbZ6sD+584yibvNF8c++37h5uMPCFJoEgPPpGPJy341IrwhnTtr8kNaFEHFvtOAmG9UuqcQTO6zONmxBpkHHCajo7pPjFmRqD5juoJ/26MYWhzfH4IR0+pENv56e8nAt+Lx8oFBZfg=; 24:i9a6NKb4tEnxYSXxpHw0Q9Hf9skKmIyv1kwpNgTHy9WsKXzIJztwBEYt2P9gcNMVKBsTFTRMne6iZk6YhVyqIPSXPKZKYEoQ3XpbkJ6cCWk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB4906; 7:+MnHzvtpdHbkynsnbKlhf50TMmvQM/JHsJoKFZUrsQN1CR7QOMYXxJLJeVzw4cYdh0xVIfM5SoNlQSwaaiTzMiixvKWyijivBPWEQQSdbXNW3e3rxW7G5bvU+DdovzdNulY8HVuN01RwYmb3hF9fbg7kwKNINy6Yr+7juBMZ1fwR1Nt8KnWVs0YuP4RmqDoPe4VC7TfbJQ7tqwYPnqvwodGA3iO3l+9yqgb2PRl9PZ1Mj/E9k+jh7nNntICw7a7u X-MS-Office365-Filtering-Correlation-Id: d88bd8f4-742e-46e5-210b-08d5cd64c779 X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jun 2018 17:25:04.1695 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d88bd8f4-742e-46e5-210b-08d5cd64c779 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR07MB4906 Subject: [dpdk-dev] [PATCH 02/20] eventdev: add routines for logging eventmode helper 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: , X-List-Received-Date: Fri, 08 Jun 2018 17:25:08 -0000 Signed-off-by: Anoob Joseph --- config/common_base | 1 + lib/librte_eal/common/eal_common_log.c | 1 + lib/librte_eal/common/include/rte_log.h | 1 + .../rte_eventmode_helper_internal.h | 24 ++++++++++++++++++++++ 4 files changed, 27 insertions(+) diff --git a/config/common_base b/config/common_base index 6b0d1cb..21da7d4 100644 --- a/config/common_base +++ b/config/common_base @@ -594,6 +594,7 @@ CONFIG_RTE_LIBRTE_PMD_ISAL=n # CONFIG_RTE_LIBRTE_EVENTDEV=y CONFIG_RTE_LIBRTE_EVENTDEV_DEBUG=n +CONFIG_RTE_LIBRTE_EVENTMODE_HELPER_DEBUG=n CONFIG_RTE_EVENT_MAX_DEVS=16 CONFIG_RTE_EVENT_MAX_QUEUES_PER_DEV=64 CONFIG_RTE_EVENT_TIMER_ADAPTER_NUM_MAX=32 diff --git a/lib/librte_eal/common/eal_common_log.c b/lib/librte_eal/common/eal_common_log.c index 8181189..ee85705 100644 --- a/lib/librte_eal/common/eal_common_log.c +++ b/lib/librte_eal/common/eal_common_log.c @@ -324,6 +324,7 @@ static const struct logtype logtype_strings[] = { {RTE_LOGTYPE_EFD, "lib.efd"}, {RTE_LOGTYPE_EVENTDEV, "lib.eventdev"}, {RTE_LOGTYPE_GSO, "lib.gso"}, + {RTE_LOGTYPE_EVENTMODE, "lib.eventmode"}, {RTE_LOGTYPE_USER1, "user1"}, {RTE_LOGTYPE_USER2, "user2"}, {RTE_LOGTYPE_USER3, "user3"}, diff --git a/lib/librte_eal/common/include/rte_log.h b/lib/librte_eal/common/include/rte_log.h index 2f789cb..e7ffc54 100644 --- a/lib/librte_eal/common/include/rte_log.h +++ b/lib/librte_eal/common/include/rte_log.h @@ -61,6 +61,7 @@ extern struct rte_logs rte_logs; #define RTE_LOGTYPE_EFD 18 /**< Log related to EFD. */ #define RTE_LOGTYPE_EVENTDEV 19 /**< Log related to eventdev. */ #define RTE_LOGTYPE_GSO 20 /**< Log related to GSO. */ +#define RTE_LOGTYPE_EVENTMODE 21 /**< Log related to eventmode. */ /* these log types can be used in an application */ #define RTE_LOGTYPE_USER1 24 /**< User-defined log type 1. */ diff --git a/lib/librte_eventdev/rte_eventmode_helper_internal.h b/lib/librte_eventdev/rte_eventmode_helper_internal.h index 5b08582..e946f11 100644 --- a/lib/librte_eventdev/rte_eventmode_helper_internal.h +++ b/lib/librte_eventdev/rte_eventmode_helper_internal.h @@ -3,4 +3,28 @@ */ #ifndef _RTE_EVENTMODE_HELPER_INTERNAL_H_ #define _RTE_EVENTMODE_HELPER_INTERNAL_H_ + +#include + +/* Logging macros */ + +#define RTE_EM_HLPR_LOG_ERR(...) \ + RTE_LOG(ERR, EVENTMODE, \ + RTE_FMT("%s(): " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \ + __func__, RTE_FMT_TAIL(__VA_ARGS__,))) + +#define RTE_EM_HLPR_LOG_INFO(...) \ + RTE_LOG(INFO, EVENTMODE, \ + RTE_FMT(RTE_FMT_HEAD(__VA_ARGS__,) "\n", \ + RTE_FMT_TAIL(__VA_ARGS__,))) + +#ifdef RTE_LIBRTE_EVENTMODE_HELPER_DEBUG +#define RTE_EM_HLPR_LOG_DEBUG(...) \ + RTE_LOG(DEBUG, EVENTMODE, \ + RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \ + __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,))) +#else +#define RTE_EM_HLPR_LOG_DEBUG(...) (void)0 +#endif + #endif /* _RTE_EVENTMODE_HELPER_INTERNAL_H_ */ -- 2.7.4