From: Stephen Hemminger <stephen@networkplumber.org>
To: Yong Zhang <zhang.yong25@zte.com.cn>
Cc: thomas@monjalon.net, dev@dpdk.org, wang.yong19@zte.com.cn,
li.min10@zte.com.cn, ran.ming@zte.com.cn
Subject: Re: [v4,1/5] raw/gdtc: introduce gdtc raw device driver
Date: Mon, 11 Nov 2024 21:08:03 -0800 [thread overview]
Message-ID: <20241111210803.7530e34f@hermes.local> (raw)
In-Reply-To: <20241029134609.2499338-1-zhang.yong25@zte.com.cn>
On Tue, 29 Oct 2024 21:45:22 +0800
Yong Zhang <zhang.yong25@zte.com.cn> wrote:
> +char zxdh_gdma_driver_name[] = "rawdev_zxdh_gdma";
> +char dev_name[] = "zxdh_gdma";
> +
> +uint32_t
> +zxdh_gdma_read_reg(struct rte_rawdev *dev, uint16_t queue_id, uint32_t offset)
> +{
> + struct zxdh_gdma_rawdev *gdmadev = zxdh_gdma_rawdev_get_priv(dev);
> + uint32_t addr = 0;
> + uint32_t val = 0;
> +
> + addr = offset + queue_id * ZXDH_GDMA_CHAN_SHIFT;
> + val = *(uint32_t *)(gdmadev->base_addr + addr);
> +
> + return val;
> +}
> +
> +void
> +zxdh_gdma_write_reg(struct rte_rawdev *dev, uint16_t queue_id, uint32_t offset, uint32_t val)
> +{
> + struct zxdh_gdma_rawdev *gdmadev = zxdh_gdma_rawdev_get_priv(dev);
> + uint32_t addr = 0;
> +
> + addr = offset + queue_id * ZXDH_GDMA_CHAN_SHIFT;
> + *(uint32_t *)(gdmadev->base_addr + addr) = val;
> +}
This driver is made up one C file. Please make all these helper functions
and the names static. If static checkers and optimizers can work better.
next prev parent reply other threads:[~2024-11-12 5:10 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-29 13:45 Yong Zhang
2024-10-29 13:45 ` [v4,2/5] raw/gdtc: add support for queue setup operation Yong Zhang
2024-11-12 5:05 ` Stephen Hemminger
2024-10-29 13:45 ` [v4,3/5] raw/gdtc: add support for standard rawdev operations Yong Zhang
2024-10-29 13:45 ` [v4,4/5] raw/gdtc: add support for enqueue operation Yong Zhang
2024-10-29 13:45 ` [v4,5/5] raw/gdtc: add support for dequeue operation Yong Zhang
2024-11-04 2:15 ` Re:[PATCH] raw/gdtc: introduce gdtc raw device driver Yong Zhang
2024-11-12 4:12 ` [PATCH] " Thomas Monjalon
2024-11-12 5:13 ` Stephen Hemminger
2024-11-14 9:36 ` zhang.yong25
2024-11-12 5:08 ` [v4,1/5] " Stephen Hemminger
2024-11-12 5:08 ` Stephen Hemminger [this message]
2024-11-13 9:22 ` zhang.yong25
2024-11-13 14:59 ` Stephen Hemminger
2024-11-12 5:09 ` Stephen Hemminger
2024-11-12 5:48 ` Stephen Hemminger
2024-11-14 9:20 ` [v5,1/5] " Yong Zhang
2024-11-14 9:20 ` [v5,2/5] raw/gdtc: add support for queue setup operation Yong Zhang
2024-11-14 9:20 ` [v5,3/5] raw/gdtc: add support for standard rawdev operations Yong Zhang
2024-11-14 9:20 ` [v5,4/5] raw/gdtc: add support for enqueue operation Yong Zhang
2024-11-14 9:20 ` [v5,5/5] raw/gdtc: add support for dequeue operation Yong Zhang
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=20241111210803.7530e34f@hermes.local \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=li.min10@zte.com.cn \
--cc=ran.ming@zte.com.cn \
--cc=thomas@monjalon.net \
--cc=wang.yong19@zte.com.cn \
--cc=zhang.yong25@zte.com.cn \
/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;
as well as URLs for NNTP newsgroup(s).