From: Stephen Hemminger <stephen@networkplumber.org>
To: <zhang.yong25@zte.com.cn>
Cc: <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: Wed, 13 Nov 2024 06:59:10 -0800 [thread overview]
Message-ID: <20241113065910.56bf435b@hermes.local> (raw)
In-Reply-To: <20241113172257141UUFsGeMvKYlsewZJD2KTm@zte.com.cn>
On Wed, 13 Nov 2024 17:22:57 +0800 (CST)
<zhang.yong25@zte.com.cn> wrote:
> Hi Stephen,
>
> >> +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.
>
> Thanks for your suggestion, I will check other functions. But these two functions will also
> be called by the test application(Not Submitted), so it is not appropriate to names static.
If you need the functions for a test app then they need to be in version.map and
in a user API header file. It is ok to have PMD specific hooks, but they need to
be treated as real API's.
next prev parent reply other threads:[~2024-11-13 14:59 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-29 13:45 [v4,1/5] raw/gdtc: introduce gdtc raw device driver 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
2024-11-13 9:22 ` zhang.yong25
2024-11-13 14:59 ` Stephen Hemminger [this message]
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-20 0:46 ` Thomas Monjalon
2024-11-20 1:45 ` zhang.yong25
2024-11-20 1:59 ` Thomas Monjalon
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
2024-11-20 0:45 ` [v5,1/5] raw/gdtc: introduce gdtc raw device driver Thomas Monjalon
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=20241113065910.56bf435b@hermes.local \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=li.min10@zte.com.cn \
--cc=ran.ming@zte.com.cn \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.