> -----Original Message----- > From: Morten Brørup <m...@smartsharesystems.com> > Sent: Wednesday, October 30, 2019 9:02 PM > To: Jerin Jacob <jerinjac...@gmail.com>; Gavin Hu (Arm Technology China) > <gavin...@arm.com> > Cc: tho...@monjalon.net; Joyce Kong (Arm Technology China) > <joyce.k...@arm.com>; dev@dpdk.org; nd <n...@arm.com>; > jer...@marvell.com; step...@networkplumber.org; Honnappa Nagarahalli > <honnappa.nagaraha...@arm.com>; ravi1.ku...@amd.com; > rm...@marvell.com; shsha...@marvell.com; xuanziya...@huawei.com; > cloud.wangxiao...@huawei.com; zhouguoy...@huawei.com; > adrien.mazarg...@6wind.com > Subject: RE: [dpdk-dev] [PATCH v2 0/6] implement common rte bit operation > APIs in PMDs > > > -----Original Message----- > > From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Jerin Jacob > > Sent: Wednesday, October 30, 2019 1:33 PM > > > > On Wed, Oct 30, 2019 at 3:25 PM Gavin Hu (Arm Technology China) > > <gavin...@arm.com> wrote: > > > > > > Hi Thomas, > > > > > > > -----Original Message----- > > > > From: Thomas Monjalon <tho...@monjalon.net> > > > > Sent: Wednesday, October 30, 2019 12:43 AM > > > > > > > > 23/10/2019 04:54, Joyce Kong: > > > > > There are a lot functions of bit operations scattered in PMDs, > > > > > consolidate them into a common API family and applied in different > > > > > PMDs to reduce code duplication. > > > > > > > > Please, could you look at what Adrien did in the Mellanox PMD? > > > > > > > > > > http://code.dpdk.org/dpdk/latest/source/drivers/net/mlx5/mlx5_utils.h#L28 > > > The code has less duplication, but it requires a less natural declaration > > of variables > > > http://code.dpdk.org/dpdk/latest/source/drivers/net/mlx5/mlx5.h#L607 > > > Should we take this way? > > > > > > IMO, We need to consider the MACRO based scheme only as of the last resort. > > > > I agree. > > The EAL library already has an I/O device memory access API, i.e. with > functionality closely related to the proposed I/O device bit operation API: > http://code.dpdk.org/dpdk/latest/source/lib/librte_eal/common/include/gene > ric/rte_io.h > > I would prefer a similar approach, and API familiarity would be my strongest > argument. Yes, this is a more natural way, and engineers are more familiar with the APIs. We will take this way as more people vote for this. Thanks Thomas also for your comment, we are inspired by this code, we will add assert() also to guarantee the 'bit' argument is in the valid range. We used this common API for some PMDs, but not extensively, the reason is we want to finalize the API firstly(with your comments coming) and then propagate later. /Gavin
Re: [dpdk-dev] [PATCH v2 0/6] implement common rte bit operation APIs in PMDs
Gavin Hu (Arm Technology China) Thu, 31 Oct 2019 03:41:19 -0700
- [dpdk-dev] [PATCH v1 3/5] net/bnx2x: use... Joyce Kong
- Re: [dpdk-dev] [PATCH v1 0/5] implement ... Stephen Hemminger
- Re: [dpdk-dev] [PATCH v1 0/5] imple... Joyce Kong (Arm Technology China)
- [dpdk-dev] [PATCH v2 0/6] implement comm... Joyce Kong
- Re: [dpdk-dev] [PATCH v2 0/6] imple... David Marchand
- Re: [dpdk-dev] [PATCH v2 0/6] imple... Thomas Monjalon
- Re: [dpdk-dev] [PATCH v2 0/6] i... Gavin Hu (Arm Technology China)
- Re: [dpdk-dev] [PATCH v2 0/... Thomas Monjalon
- Re: [dpdk-dev] [PATCH v2 0/... Jerin Jacob
- Re: [dpdk-dev] [PATCH v... Morten Brørup
- Re: [dpdk-dev] [PA... Gavin Hu (Arm Technology China)
- [dpdk-dev] [PATCH v2 1/6] lib/eal: imple... Joyce Kong
- Re: [dpdk-dev] [PATCH v2 1/6] lib/e... Honnappa Nagarahalli
- Re: [dpdk-dev] [PATCH v2 1/6] lib/e... Jerin Jacob
- Re: [dpdk-dev] [PATCH v2 1/6] lib/e... Morten Brørup
- [dpdk-dev] [PATCH v2 2/6] test/iobitops:... Joyce Kong
- [dpdk-dev] [PATCH v2 3/6] net/axgbe: use... Joyce Kong
- Re: [dpdk-dev] [PATCH v2 3/6] net/a... Honnappa Nagarahalli
- [dpdk-dev] [PATCH v2 5/6] net/hinic: use... Joyce Kong
- [dpdk-dev] [PATCH v2 6/6] net/qede: use ... Joyce Kong
- [dpdk-dev] [PATCH v2 4/6] net/bnx2x: use... Joyce Kong