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 B9B6645B9A for ; Tue, 22 Oct 2024 07:01:35 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B0BD8402EB; Tue, 22 Oct 2024 07:01:35 +0200 (CEST) Received: from dpdk.org (dpdk.org [92.243.24.197]) by mails.dpdk.org (Postfix) with ESMTP id C92F740615 for ; Tue, 22 Oct 2024 07:01:34 +0200 (CEST) Received: by dpdk.org (Postfix, from userid 65534) id ADFB71206AA; Tue, 22 Oct 2024 07:01:34 +0200 (CEST) Subject: |WARNING| pw146565 [PATCH] event/cnxk: remove single dequeue functions In-Reply-To: <20241022045950.9975-1-pbhagavatula@marvell.com> References: <20241022045950.9975-1-pbhagavatula@marvell.com> To: test-report@dpdk.org From: checkpatch@dpdk.org Cc: Message-Id: <20241022050134.ADFB71206AA@dpdk.org> Date: Tue, 22 Oct 2024 07:01:34 +0200 (CEST) X-BeenThere: test-report@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: automatic DPDK test reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: test-report-bounces@dpdk.org Test-Label: checkpatch Test-Status: WARNING http://dpdk.org/patch/146565 _coding style issues_ WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided #411: FILE: drivers/event/cnxk/cn10k_worker.h:435: +#define SSO_DEQ(fn, flags) \ + static __rte_always_inline uint16_t fn(void *port, struct rte_event *ev, \ + uint64_t timeout_ticks) \ + { \ + struct cn10k_sso_hws *ws = port; \ + RTE_SET_USED(timeout_ticks); \ + if (ws->swtag_req) { \ + ws->swtag_req = 0; \ + ws->gw_rdata = cnxk_sso_hws_swtag_wait(ws->base + SSOW_LF_GWS_WQE0); \ + return 1; \ + } \ + return cn10k_sso_hws_get_work(ws, ev, flags); \ } WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided #444: FILE: drivers/event/cnxk/cn10k_worker.h:451: +#define SSO_DEQ_TMO(fn, flags) \ + static __rte_always_inline uint16_t fn(void *port, struct rte_event *ev, \ + uint64_t timeout_ticks) \ + { \ + struct cn10k_sso_hws *ws = port; \ + uint16_t ret = 1; \ + uint64_t iter; \ + if (ws->swtag_req) { \ + ws->swtag_req = 0; \ + ws->gw_rdata = cnxk_sso_hws_swtag_wait(ws->base + SSOW_LF_GWS_WQE0); \ + return ret; \ + } \ + ret = cn10k_sso_hws_get_work(ws, ev, flags); \ + for (iter = 1; iter < timeout_ticks && (ret == 0); iter++) \ + ret = cn10k_sso_hws_get_work(ws, ev, flags); \ + return ret; \ } ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses #464: FILE: drivers/event/cnxk/cn10k_worker.h:471: +#define R(name, flags) \ + SSO_DEQ(cn10k_sso_hws_deq_##name, flags) \ + SSO_DEQ(cn10k_sso_hws_reas_deq_##name, flags | NIX_RX_REAS_F) \ + SSO_DEQ_SEG(cn10k_sso_hws_deq_seg_##name, flags) \ + SSO_DEQ_SEG(cn10k_sso_hws_reas_deq_seg_##name, flags | NIX_RX_REAS_F) \ + SSO_DEQ_TMO(cn10k_sso_hws_deq_tmo_##name, flags) \ + SSO_DEQ_TMO(cn10k_sso_hws_reas_deq_tmo_##name, flags | NIX_RX_REAS_F) \ + SSO_DEQ_TMO_SEG(cn10k_sso_hws_deq_tmo_seg_##name, flags) \ + SSO_DEQ_TMO_SEG(cn10k_sso_hws_reas_deq_tmo_seg_##name, flags | NIX_RX_REAS_F) WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided #569: FILE: drivers/event/cnxk/cn9k_worker.h:405: +#define SSO_DEQ(fn, flags) \ + static __rte_always_inline uint16_t fn(void *port, struct rte_event *ev, \ + uint64_t timeout_ticks) \ + { \ + struct cn9k_sso_hws *ws = port; \ + RTE_SET_USED(timeout_ticks); \ + if (ws->swtag_req) { \ + ws->swtag_req = 0; \ + cnxk_sso_hws_swtag_wait(ws->base + SSOW_LF_GWS_TAG); \ + return 1; \ + } \ + return cn9k_sso_hws_get_work(ws, ev, flags, ws->lookup_mem); \ } WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided #602: FILE: drivers/event/cnxk/cn9k_worker.h:421: +#define SSO_DEQ_TMO(fn, flags) \ + static __rte_always_inline uint16_t fn(void *port, struct rte_event *ev, \ + uint64_t timeout_ticks) \ + { \ + struct cn9k_sso_hws *ws = port; \ + uint16_t ret = 1; \ + uint64_t iter; \ + if (ws->swtag_req) { \ + ws->swtag_req = 0; \ + cnxk_sso_hws_swtag_wait(ws->base + SSOW_LF_GWS_TAG); \ + return ret; \ + } \ + ret = cn9k_sso_hws_get_work(ws, ev, flags, ws->lookup_mem); \ + for (iter = 1; iter < timeout_ticks && (ret == 0); iter++) \ + ret = cn9k_sso_hws_get_work(ws, ev, flags, ws->lookup_mem); \ + return ret; \ } WARNING:TRAILING_SEMICOLON: macros should not use a trailing semicolon #643: FILE: drivers/event/cnxk/cn9k_worker.h:441: +#define R(name, flags) \ + uint16_t __rte_hot cn9k_sso_hws_dual_deq_burst_##name( \ + void *port, struct rte_event ev[], uint16_t nb_events, uint64_t timeout_ticks); \ + uint16_t __rte_hot cn9k_sso_hws_dual_deq_tmo_burst_##name( \ + void *port, struct rte_event ev[], uint16_t nb_events, uint64_t timeout_ticks); \ + uint16_t __rte_hot cn9k_sso_hws_dual_deq_seg_burst_##name( \ + void *port, struct rte_event ev[], uint16_t nb_events, uint64_t timeout_ticks); \ + uint16_t __rte_hot cn9k_sso_hws_dual_deq_tmo_seg_burst_##name( \ + void *port, struct rte_event ev[], uint16_t nb_events, uint64_t timeout_ticks); WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided #674: FILE: drivers/event/cnxk/cn9k_worker.h:454: +#define SSO_DUAL_DEQ(fn, flags) \ + static __rte_always_inline uint16_t fn(void *port, struct rte_event *ev, \ + uint64_t timeout_ticks) \ + { \ + struct cn9k_sso_hws_dual *dws = port; \ + uint16_t gw; \ + RTE_SET_USED(timeout_ticks); \ + if (dws->swtag_req) { \ + dws->swtag_req = 0; \ + cnxk_sso_hws_swtag_wait(dws->base[!dws->vws] + SSOW_LF_GWS_TAG); \ + return 1; \ + } \ + gw = cn9k_sso_hws_dual_get_work(dws->base[dws->vws], dws->base[!dws->vws], ev, \ + flags, dws); \ + dws->vws = !dws->vws; \ + return gw; \ } WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided #718: FILE: drivers/event/cnxk/cn9k_worker.h:474: +#define SSO_DUAL_DEQ_TMO(fn, flags) \ + static __rte_always_inline uint16_t fn(void *port, struct rte_event *ev, \ + uint64_t timeout_ticks) \ + { \ + struct cn9k_sso_hws_dual *dws = port; \ + uint16_t ret = 1; \ + uint64_t iter; \ + if (dws->swtag_req) { \ + dws->swtag_req = 0; \ + cnxk_sso_hws_swtag_wait(dws->base[!dws->vws] + SSOW_LF_GWS_TAG); \ + return ret; \ + } \ + ret = cn9k_sso_hws_dual_get_work(dws->base[dws->vws], dws->base[!dws->vws], ev, \ + flags, dws); \ + dws->vws = !dws->vws; \ + for (iter = 1; iter < timeout_ticks && (ret == 0); iter++) { \ + ret = cn9k_sso_hws_dual_get_work(dws->base[dws->vws], \ + dws->base[!dws->vws], ev, flags, dws); \ + dws->vws = !dws->vws; \ + } \ + return ret; \ } ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses #744: FILE: drivers/event/cnxk/cn9k_worker.h:500: +#define R(name, flags) \ + SSO_DEQ(cn9k_sso_hws_deq_##name, flags) \ + SSO_DEQ(cn9k_sso_hws_dual_deq_##name, flags) \ + SSO_DEQ_SEG(cn9k_sso_hws_deq_seg_##name, flags) \ + SSO_DEQ_SEG(cn9k_sso_hws_dual_deq_seg_##name, flags) \ + SSO_DEQ_TMO(cn9k_sso_hws_deq_tmo_##name, flags) \ + SSO_DEQ_TMO(cn9k_sso_hws_dual_deq_tmo_##name, flags) \ + SSO_DEQ_TMO_SEG(cn9k_sso_hws_deq_tmo_seg_##name, flags) \ + SSO_DEQ_TMO_SEG(cn9k_sso_hws_dual_deq_tmo_seg_##name, flags) total: 2 errors, 7 warnings, 761 lines checked