From: "Dai, Wei" <wei.dai@intel.com>
To: "Zhang, Qi Z" <qi.z.zhang@intel.com>,
"Lu, Wenzhuo" <wenzhuo.lu@intel.com>,
"Wu, Jingjing" <jingjing.wu@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v4 1/3] ethdev: add enum type for loop on Rx/Tx offloads
Date: Tue, 20 Mar 2018 01:52:03 +0000 [thread overview]
Message-ID: <49759EB36A64CF4892C1AFEC9231E8D66CF60976@PGSMSX112.gar.corp.intel.com> (raw)
In-Reply-To: <039ED4275CED7440929022BC67E706115316FAB1@SHSMSX103.ccr.corp.intel.com>
Hi Zhang Qi
Thanks for your feedback.
> -----Original Message-----
> From: Zhang, Qi Z
> Sent: Monday, March 19, 2018 10:06 PM
> To: Dai, Wei <wei.dai@intel.com>; Lu, Wenzhuo <wenzhuo.lu@intel.com>;
> Wu, Jingjing <jingjing.wu@intel.com>
> Cc: dev@dpdk.org; Dai, Wei <wei.dai@intel.com>
> Subject: RE: [dpdk-dev] [PATCH v4 1/3] ethdev: add enum type for loop on
> Rx/Tx offloads
>
> Hi Daiwei:
>
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wei Dai
> > Sent: Monday, March 19, 2018 8:41 PM
> > To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Wu, Jingjing
> > <jingjing.wu@intel.com>
> > Cc: dev@dpdk.org; Dai, Wei <wei.dai@intel.com>
> > Subject: [dpdk-dev] [PATCH v4 1/3] ethdev: add enum type for loop on
> > Rx/Tx offloads
> >
> > This patch adds enum rte_eth_rx_offload_type and enum
> > rte_eth_tx_offload_type. For a loop on all Rx offloads, it is
> > convenient to begin with the first enum member
> > ETH_RX_OFFLOAD_FIRST_FEATURE and to end at
> ETH_RX_OFFLOAD_TOTAL_NUM.
> > A loop on all Tx offloads can begin with
> ETH_TX_OFFLOAD_FIRST_FEATURE
> > and end at ETH_TX_OFFLOAD_TOTAL_NUM.
> >
> > Signed-off-by: Wei Dai <wei.dai@intel.com>
> > ---
> > lib/librte_ether/rte_ethdev.h | 44
> > +++++++++++++++++++++++++++++++++++++++++++
> > 1 file changed, 44 insertions(+)
> >
> > diff --git a/lib/librte_ether/rte_ethdev.h
> > b/lib/librte_ether/rte_ethdev.h index 0361533..0089ea3 100644
> > --- a/lib/librte_ether/rte_ethdev.h
> > +++ b/lib/librte_ether/rte_ethdev.h
> > @@ -946,6 +946,27 @@ struct rte_eth_conf {
> > DEV_RX_OFFLOAD_VLAN_FILTER | \
> > DEV_RX_OFFLOAD_VLAN_EXTEND)
> >
> > +enum rte_eth_rx_offload_type {
> > + ETH_RX_OFFLOAD_FIRST_FEATURE = 0,
> > + ETH_RX_OFFLOAD_VLAN_STRIP = ETH_RX_OFFLOAD_FIRST_FEATURE,
> > + ETH_RX_OFFLOAD_IPV4_CKSUM,
> > + ETH_RX_OFFLOAD_UDP_CKSUM,
> > + ETH_RX_OFFLOAD_TCP_CKSUM,
> > + ETH_RX_OFFLOAD_TCP_LRO,
> > + ETH_RX_OFFLOAD_QINQ_STRIP,
> > + ETH_RX_OFFLOAD_OUTER_IPV4_CKSUM,
> > + ETH_RX_OFFLOAD_MACSEC_STRIP,
> > + ETH_RX_OFFLOAD_HEADER_SPLIT,
> > + ETH_RX_OFFLOAD_VLAN_FILTER,
> > + ETH_RX_OFFLOAD_VLAN_EXTEND,
> > + ETH_RX_OFFLOAD_JUMBO_FRAME,
> > + ETH_RX_OFFLOAD_CRC_STRIP,
> > + ETH_RX_OFFLOAD_SCATTER,
> > + ETH_RX_OFFLOAD_TIMESTAMP,
> > + ETH_RX_OFFLOAD_SECURITY,
> > + ETH_RX_OFFLOAD_TOTAL_NUM
> > +};
>
> This looks a little duplicate with rte_rx_offload_names in rte_ethdev.c
rte_rx_offload_names is a static string array defined in rte_ethdev.c, if it can be referred by other files,
the "static" must be removed.
>
> In patch 2/3 and 3/3, I think if you simply loop from offload bit 0 to bit 63 to
> check the name, that should still work right?
> then this patch could be unnecessary.
Yes, using loop from bit 0 to bit 63 in patch 2/3 and 3/3 can work right.
But I think this enum type is still useful for other application which need to loop on
all possible offloads.
I will submit this patch as a standalone one and using loop from bit 0 to bit 63 in next version of patch set.
> Regards
> Qi
> > +
> > /*
> > * If new Rx offload capabilities are defined, they also must be
> > * mentioned in rte_rx_offload_names in rte_ethdev.c file.
> > @@ -981,6 +1002,29 @@ struct rte_eth_conf {
> > */
> > #define DEV_TX_OFFLOAD_SECURITY 0x00020000
> >
> > +enum rte_eth_tx_offload_type {
> > + ETH_TX_OFFLOAD_FIRST_FEATURE = 0,
> > + ETH_TX_OFFLOAD_VLAN_INSERT = ETH_TX_OFFLOAD_FIRST_FEATURE,
> > + ETH_TX_OFFLOAD_IPV4_CKSUM,
> > + ETH_TX_OFFLOAD_UDP_CKSUM,
> > + ETH_TX_OFFLOAD_TCP_CKSUM,
> > + ETH_TX_OFFLOAD_SCTP_CKSUM,
> > + ETH_TX_OFFLOAD_TCP_TSO,
> > + ETH_TX_OFFLOAD_UDP_TSO,
> > + ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM,
> > + ETH_TX_OFFLOAD_QINQ_INSERT,
> > + ETH_TX_OFFLOAD_VXLAN_TNL_TSO,
> > + ETH_TX_OFFLOAD_GRE_TNL_TSO,
> > + ETH_TX_OFFLOAD_IPIP_TNL_TSO,
> > + ETH_TX_OFFLOAD_GENEVE_TNL_TSO,
> > + ETH_TX_OFFLOAD_MACSEC_INSERT,
> > + ETH_TX_OFFLOAD_MT_LOCKFREE,
> > + ETH_TX_OFFLOAD_MULTI_SEGS,
> > + ETH_TX_OFFLOAD_MBUF_FAST_FREE,
> > + ETH_TX_OFFLOAD_SECURITY,
> > + ETH_TX_OFFLOAD_TOTAL_NUM
> > +};
> > +
> > /*
> > * If new Tx offload capabilities are defined, they also must be
> > * mentioned in rte_tx_offload_names in rte_ethdev.c file.
> > --
> > 2.7.5
next prev parent reply other threads:[~2018-03-20 1:52 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-12 8:15 [dpdk-dev] [PATCH 0/2] app/testpmd: add new commands to test new Tx/Rx offload API Wei Dai
2018-03-12 8:15 ` [dpdk-dev] [PATCH 1/2] app/testpmd: add commands to test new Rx " Wei Dai
2018-03-12 8:42 ` Andrew Rybchenko
2018-03-13 1:06 ` Dai, Wei
2018-03-12 8:15 ` [dpdk-dev] [PATCH 2/2] app/testpmd: add commands to test new Tx " Wei Dai
2018-03-13 6:42 ` [dpdk-dev] [PATCH v2 0/2] app/testpmd: add new commands to test new Tx/Rx " Wei Dai
2018-03-13 6:42 ` [dpdk-dev] [PATCH v2 1/2] app/testpmd: add commands to test new Rx " Wei Dai
2018-03-13 7:21 ` Andrew Rybchenko
2018-03-13 9:30 ` Ananyev, Konstantin
2018-03-17 13:45 ` Dai, Wei
2018-03-14 19:40 ` Wu, Jingjing
2018-03-17 13:49 ` Dai, Wei
2018-03-13 6:42 ` [dpdk-dev] [PATCH v2 2/2] app/testpmd: add commands to test new Tx " Wei Dai
2018-03-17 13:31 ` [dpdk-dev] [PATCH v3 0/3] app/testpmd: add new commands to test new Tx/Rx " Wei Dai
2018-03-17 13:31 ` [dpdk-dev] [PATCH v3 1/3] ethdev: add enum type for loop on Rx/Tx offloads Wei Dai
2018-03-17 13:31 ` [dpdk-dev] [PATCH v3 2/3] app/testpmd: add commands to test new Rx offload API Wei Dai
2018-03-17 13:31 ` [dpdk-dev] [PATCH v3 3/3] app/testpmd: add commands to test new Tx " Wei Dai
2018-03-19 12:33 ` [dpdk-dev] [PATCH v4 0/3] app/testpmd: add new commands to test new Tx/Rx offload Wei Dai
2018-03-19 12:33 ` [dpdk-dev] [PATCH v4 1/3] ethdev: add enum type for loop on Rx/Tx offloads Wei Dai
2018-03-19 12:33 ` [dpdk-dev] [PATCH v4 2/3] app/testpmd: add commands to test new Rx offload API Wei Dai
2018-03-19 12:33 ` [dpdk-dev] [PATCH v4 3/3] pp/testpmd: add commands to test new Tx " Wei Dai
2018-03-19 12:40 ` [dpdk-dev] [PATCH v4 0/3] app/testpmd: add new commands to test new Tx/Rx offload Wei Dai
2018-03-19 12:40 ` [dpdk-dev] [PATCH v4 1/3] ethdev: add enum type for loop on Rx/Tx offloads Wei Dai
2018-03-19 14:05 ` Zhang, Qi Z
2018-03-20 1:52 ` Dai, Wei [this message]
2018-03-19 12:40 ` [dpdk-dev] [PATCH v4 2/3] app/testpmd: add commands to test new Rx offload API Wei Dai
2018-03-19 12:40 ` [dpdk-dev] [PATCH v4 3/3] app/testpmd: add commands to test new Tx " Wei Dai
2018-03-20 3:09 ` [dpdk-dev] [PATCH v5 0/2] app/testpmd: add new commands to test new Tx/Rx offloads Wei Dai
2018-03-20 3:09 ` [dpdk-dev] [PATCH v5 1/2] app/testpmd: add commands to test new Rx offload API Wei Dai
2018-03-20 3:09 ` [dpdk-dev] [PATCH v5 2/2] app/testpmd: add commands to test new Tx " Wei Dai
2018-03-22 8:00 ` [dpdk-dev] [PATCH v6 0/2] app/testpmd: add new commands to test new Tx/Rx offloads Wei Dai
2018-03-22 8:00 ` [dpdk-dev] [PATCH v6 1/2] app/testpmd: add commands to test new Rx offload API Wei Dai
2018-03-30 8:40 ` Wu, Jingjing
2018-03-22 8:00 ` [dpdk-dev] [PATCH v6 2/2] app/testpmd: add commands to test new Tx " Wei Dai
2018-03-30 23:05 ` Wu, Jingjing
2018-04-03 8:57 ` [dpdk-dev] [PATCH v7 0/2] app/testpmd: add new commands to test new Tx/Rx offloads Wei Dai
2018-04-03 8:57 ` [dpdk-dev] [PATCH v7 1/2] app/testpmd: add commands to test new Rx offload API Wei Dai
2018-04-03 8:57 ` [dpdk-dev] [PATCH v7 2/2] app/testpmd: add commands to test new Tx " Wei Dai
2018-04-12 17:53 ` [dpdk-dev] [PATCH v7 0/2] app/testpmd: add new commands to test new Tx/Rx offloads Ferruh Yigit
2018-05-08 13:30 ` Dai, Wei
2018-05-08 15:33 ` Ferruh Yigit
2018-05-09 12:13 ` [dpdk-dev] [PATCH v8] app/testpmd: add commands to test new offload API Wei Dai
2018-05-11 0:00 ` Ferruh Yigit
2018-05-11 0:10 ` Ferruh Yigit
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=49759EB36A64CF4892C1AFEC9231E8D66CF60976@PGSMSX112.gar.corp.intel.com \
--to=wei.dai@intel.com \
--cc=dev@dpdk.org \
--cc=jingjing.wu@intel.com \
--cc=qi.z.zhang@intel.com \
--cc=wenzhuo.lu@intel.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;
as well as URLs for NNTP newsgroup(s).