DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Rakesh Kudurumalla <rkudurumalla@marvell.com>
Cc: Nithin Dabilpuram <ndabilpuram@marvell.com>,
	Kiran Kumar K <kirankumark@marvell.com>,
	Sunil Kumar Kori <skori@marvell.com>,
	Satha Rao <skoteshwar@marvell.com>,
	Harman Kalra <hkalra@marvell.com>, <dev@dpdk.org>,
	<jerinj@marvell.com>
Subject: Re: [PATCH] common/cnxk: add bulk Rx queue enable/disable
Date: Wed, 17 Jun 2026 07:52:07 -0700	[thread overview]
Message-ID: <20260617075207.13e0de0f@phoenix.local> (raw)
In-Reply-To: <20260617054943.287815-1-rkudurumalla@marvell.com>

On Wed, 17 Jun 2026 11:19:43 +0530
Rakesh Kudurumalla <rkudurumalla@marvell.com> wrote:

>  
> +#define NIX_RQ_BULK_ENA_DIS_LOOP(REQ_TYPE, ALLOC_FN)                                               \
> +	do {                                                                                       \
> +		for (i = 0; i < nb_rx_queues; i++) {                                               \
> +			REQ_TYPE *aq;                                                              \
> +			if (rqs[i].qid == UINT16_MAX)                                              \
> +				continue;                                                          \
> +			struct roc_nix_rq *rq = &rqs[i];                                           \
> +			aq = ALLOC_FN(mbox);                                                       \
> +			if (!aq) {                                                                 \
> +				rc = mbox_process(mbox);                                           \
> +				if (rc)                                                            \
> +					goto exit;                                                 \
> +				aq = ALLOC_FN(mbox);                                               \
> +				if (!aq) {                                                         \
> +					rc = -ENOSPC;                                              \
> +					goto exit;                                                 \
> +				}                                                                  \
> +			}                                                                          \
> +			aq->qidx = rq->qid;                                                        \
> +			aq->ctype = NIX_AQ_CTYPE_RQ;                                               \
> +			aq->op = NIX_AQ_INSTOP_WRITE;                                              \
> +			aq->rq.ena = enable;                                                       \
> +			aq->rq_mask.ena = ~(aq->rq_mask.ena);                                      \
> +		}                                                                                  \
> +	} while (0)
> +

Why can't this be an inline function? large macros are a bad idea.

      reply	other threads:[~2026-06-17 14:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-17  5:49 [PATCH] common/cnxk: add bulk Rx queue enable/disable Rakesh Kudurumalla
2026-06-17 14:52 ` Stephen Hemminger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260617075207.13e0de0f@phoenix.local \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=hkalra@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=kirankumark@marvell.com \
    --cc=ndabilpuram@marvell.com \
    --cc=rkudurumalla@marvell.com \
    --cc=skori@marvell.com \
    --cc=skoteshwar@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox