From: "Arnd Bergmann" <arnd@arndb.de>
To: "Vamsi Attunuru" <vattunuru@marvell.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
Cc: "Jerin Jacob" <jerinj@marvell.com>,
"Srujana Challa" <schalla@marvell.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v8 1/1] misc: mrvl-cn10k-dpi: add Octeon CN10K DPI administrative driver
Date: Tue, 18 Jun 2024 16:19:25 +0200 [thread overview]
Message-ID: <c43e2c24-cd5b-44c2-a997-5f324f58746c@app.fastmail.com> (raw)
In-Reply-To: <20240618130937.3070993-1-vattunuru@marvell.com>
On Tue, Jun 18, 2024, at 15:09, Vamsi Attunuru wrote:
>Changes V7 -> V8:
> - Used bit shift operations to access mbox msg fields
> - Removed bitfields in mailbox msg structure
Thanks for the changes, looks good to me. Two more things:
> +static void dpi_poll_pfvf_mbox(struct dpipf *dpi)
> +{
> + u64 reg;
> + u32 vf;
> +
> + reg = dpi_reg_read(dpi, DPI_MBOX_VF_PF_INT);
> + if (reg) {
> + for (vf = 0; vf < pci_num_vf(dpi->pdev); vf++) {
> + if (reg & BIT_ULL(vf))
> + schedule_work(&dpi->mbox[vf]->work);
> + }
> + dpi_reg_write(dpi, DPI_MBOX_VF_PF_INT, reg);
> + }
> +}
> +
> +static irqreturn_t dpi_mbox_intr_handler(int irq, void *data)
> +{
> + struct dpipf *dpi = data;
> +
> + dpi_poll_pfvf_mbox(dpi);
> +
> + return IRQ_HANDLED;
> +}
[minor cleanup]
The second function doesn't do much here, so you could
just merge them into one. Or to simplify it further, you
could just use request_threaded_irq() and avoid the separate
workqueue as well.
> +struct dpi_mps_mrrs_cfg {
> + __u16 max_read_req_sz; /* Max read request size */
> + __u16 max_payload_sz; /* Max payload size */
> + __u8 port; /* Ebus port */
> +};
> +
> +struct dpi_engine_cfg {
> + __u64 fifo_mask; /* FIFO size mask in KBytes */
> + __u16 molr[DPI_MAX_ENGINES]; /* Max outstanding load requests */
> + __u8 update_molr; /* '1' to update engine MOLR */
> +};
Both of these structures have architecture specific padding
at the end because the members don't add up to a multiple
of words. Please add explicit reserved fields to a multiple of
8 bytes for each one, or make the fields longer.
Documentation/driver-api/ioctl.rst has more details on this.
Arnd
next prev parent reply other threads:[~2024-06-18 14:19 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-14 3:55 [PATCH 1/1] misc: mrvl-dpi: add octeontx3 dpi driver Vamsi Attunuru
2024-02-14 10:50 ` Greg KH
2024-02-14 11:40 ` [EXT] " Vamsi Krishna Attunuru
2024-02-14 11:22 ` Arnd Bergmann
2024-02-14 13:33 ` [EXT] " Vamsi Krishna Attunuru
2024-02-16 10:32 ` [PATCH v2 1/1] misc: mrvl-cn10k-dpi: add Octeon CN10K " Vamsi Attunuru
2024-02-17 8:13 ` Greg KH
2024-02-19 5:03 ` [EXT] " Vamsi Krishna Attunuru
2024-02-19 6:18 ` Greg KH
2024-02-19 7:03 ` Vamsi Krishna Attunuru
2024-02-28 16:21 ` [PATCH v3 1/1] misc: mrvl-cn10k-dpi: add Octeon CN10K DPI administrative driver Vamsi Attunuru
2024-03-07 21:55 ` Greg KH
2024-03-08 11:36 ` [EXTERNAL] " Vamsi Krishna Attunuru
2024-03-12 10:56 ` [PATCH v4 " Vamsi Attunuru
2024-04-11 13:02 ` Greg KH
2024-04-12 6:34 ` [EXTERNAL] " Vamsi Krishna Attunuru
2024-04-12 12:10 ` [PATCH v5 " Vamsi Attunuru
2024-04-12 12:26 ` Greg KH
2024-04-12 13:56 ` [EXTERNAL] " Vamsi Krishna Attunuru
2024-04-12 15:34 ` Greg KH
2024-04-12 16:19 ` Vamsi Krishna Attunuru
2024-04-13 5:47 ` Greg KH
2024-04-13 10:58 ` Vamsi Krishna Attunuru
2024-04-13 11:25 ` Greg KH
2024-04-13 16:17 ` Vamsi Krishna Attunuru
2024-04-13 19:11 ` Arnd Bergmann
2024-04-14 9:33 ` Vamsi Krishna Attunuru
2024-04-14 9:46 ` Greg Kroah-Hartman
2024-04-14 12:32 ` Vamsi Krishna Attunuru
2024-04-25 13:36 ` Vamsi Krishna Attunuru
2024-04-26 1:04 ` Greg KH
2024-04-26 18:20 ` [PATCH v6 " Vamsi Attunuru
2024-04-27 11:06 ` Greg KH
2024-04-27 11:59 ` [EXTERNAL] " Vamsi Krishna Attunuru
2024-04-29 5:50 ` Vamsi Attunuru
2024-04-29 9:13 ` Greg KH
2024-05-01 7:46 ` [EXTERNAL] " Vamsi Krishna Attunuru
2024-05-01 8:02 ` Greg KH
2024-05-20 11:06 ` [PATCH v7 " Vamsi Attunuru
2024-06-04 15:52 ` Greg KH
2024-06-04 16:21 ` [EXTERNAL] " Vamsi Krishna Attunuru
2024-06-05 11:57 ` Arnd Bergmann
2024-06-06 8:58 ` Vamsi Krishna Attunuru
2024-06-06 16:42 ` Vamsi Krishna Attunuru
2024-06-08 8:42 ` Arnd Bergmann
2024-06-17 12:55 ` Vamsi Krishna Attunuru
2024-06-17 13:23 ` Arnd Bergmann
2024-06-18 13:09 ` [PATCH v8 " Vamsi Attunuru
2024-06-18 14:19 ` Arnd Bergmann [this message]
2024-06-19 13:21 ` [PATCH v9 " Vamsi Attunuru
2024-07-03 14:33 ` Greg KH
2024-07-03 16:30 ` [EXTERNAL] " Vamsi Krishna Attunuru
2024-07-06 15:30 ` [PATCH v10 " Vamsi Attunuru
2024-07-10 12:58 ` Greg KH
2024-07-10 13:19 ` [EXTERNAL] " Vamsi Krishna Attunuru
2024-07-10 13:27 ` Greg KH
2024-07-10 13:48 ` Vamsi Krishna Attunuru
2024-07-10 14:11 ` Greg KH
2024-07-12 8:44 ` Vamsi Krishna Attunuru
2024-07-12 8:54 ` Greg KH
2024-07-17 3:55 ` Jeff Johnson
2024-07-10 14:03 ` Arnd Bergmann
2024-04-30 14:00 ` [PATCH v6 " kernel test robot
2024-04-30 14:22 ` kernel test robot
2024-04-30 15:36 ` kernel test robot
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=c43e2c24-cd5b-44c2-a997-5f324f58746c@app.fastmail.com \
--to=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=jerinj@marvell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=schalla@marvell.com \
--cc=vattunuru@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
all inboxes | Powered by JetHome®