DPDK patches and discussions
 help / color / mirror / Atom feed
From: <zhang.yong25@zte.com.cn>
To: <stephen@networkplumber.org>
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 17:22:57 +0800 (CST)	[thread overview]
Message-ID: <20241113172257141UUFsGeMvKYlsewZJD2KTm@zte.com.cn> (raw)
In-Reply-To: <20241111210803.7530e34f@hermes.local>


[-- Attachment #1.1.1: Type: text/plain, Size: 2731 bytes --]

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.







张勇 zhangyong


RCH八部/无线及算力研究院/无线及算力产品经营部
RCH Dept. VIII/Wireless and Computing Product R&D Institute/Wireless and Computing Product Operation Division




Original


From: StephenHemminger <stephen@networkplumber.org>
To: 张勇10313449;
Cc: thomas@monjalon.net <thomas@monjalon.net>;dev@dpdk.org <dev@dpdk.org>;汪勇10032886;李敏10314441;冉明10033339;
Date: 2024年11月12日 13:11
Subject: Re: [v4,1/5] raw/gdtc: introduce gdtc raw device driver

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.

[-- Attachment #1.1.2: Type: text/html , Size: 13634 bytes --]

  reply	other threads:[~2024-11-13  9:23 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
2024-11-13  9:22   ` zhang.yong25 [this message]
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=20241113172257141UUFsGeMvKYlsewZJD2KTm@zte.com.cn \
    --to=zhang.yong25@zte.com.cn \
    --cc=dev@dpdk.org \
    --cc=li.min10@zte.com.cn \
    --cc=ran.ming@zte.com.cn \
    --cc=stephen@networkplumber.org \
    --cc=wang.yong19@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).