From: "Zhao1, Wei" <wei.zhao1@intel.com>
To: Ori Kam <orika@mellanox.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2] examples/flow_filtering: add Tx queues setup process
Date: Thu, 28 Dec 2017 01:54:54 +0000 [thread overview]
Message-ID: <A2573D2ACFCADC41BB3BE09C6DE313CA07C934F5@PGSMSX103.gar.corp.intel.com> (raw)
In-Reply-To: <AM4PR05MB14763E24DF03DBA1F0689D15DB070@AM4PR05MB1476.eurprd05.prod.outlook.com>
Thabk you.
> -----Original Message-----
> From: Ori Kam [mailto:orika@mellanox.com]
> Sent: Wednesday, December 27, 2017 7:53 PM
> To: Zhao1, Wei <wei.zhao1@intel.com>; dev@dpdk.org
> Subject: RE: [PATCH v2] examples/flow_filtering: add Tx queues setup
> process
>
>
>
> > -----Original Message-----
> > From: Wei Zhao [mailto:wei.zhao1@intel.com]
> > Sent: Wednesday, December 27, 2017 10:32 AM
> > To: dev@dpdk.org
> > Cc: Ori Kam <orika@mellanox.com>; Wei Zhao <wei.zhao1@intel.com>
> > Subject: [PATCH v2] examples/flow_filtering: add Tx queues setup
> > process
> >
> > This example do not has the process of set up tx queues, but some NIC
> > start up process will be blocked if this is no tx queue and only rx
> > queues. So add tx queues setup process in main code.
> >
> > Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
> >
> > ---
> >
> > v2:
> > -add support the new tx offloads.
> > ---
> > examples/flow_filtering/main.c | 26 ++++++++++++++++++++++++++
> > 1 file changed, 26 insertions(+)
> >
> > diff --git a/examples/flow_filtering/main.c
> > b/examples/flow_filtering/main.c index 7d739b4..4a07b63 100644
> > --- a/examples/flow_filtering/main.c
> > +++ b/examples/flow_filtering/main.c
> > @@ -149,7 +149,18 @@ init_port(void)
> > /**< CRC stripped by hardware */
> > .hw_strip_crc = 1,
> > },
> > + .txmode = {
> > + .offloads =
> > + DEV_TX_OFFLOAD_VLAN_INSERT |
> > + DEV_TX_OFFLOAD_IPV4_CKSUM |
> > + DEV_TX_OFFLOAD_UDP_CKSUM |
> > + DEV_TX_OFFLOAD_TCP_CKSUM |
> > + DEV_TX_OFFLOAD_SCTP_CKSUM |
> > + DEV_TX_OFFLOAD_TCP_TSO,
> > + },
> > };
> > + struct rte_eth_txconf txq_conf;
> > + struct rte_eth_dev_info dev_info;
> >
> > printf(":: initializing port: %d\n", port_id);
> > ret = rte_eth_dev_configure(port_id, @@ -173,6 +184,21 @@
> > init_port(void)
> > }
> > }
> >
> > + rte_eth_dev_info_get(port_id, &dev_info);
> > + txq_conf = dev_info.default_txconf;
> > + txq_conf.offloads = port_conf.txmode.offloads;
> > +
> > + for (i = 0; i < nr_queues; i++) {
> > + ret = rte_eth_tx_queue_setup(port_id, i, 512,
> > + rte_eth_dev_socket_id(port_id),
> > + &txq_conf);
> > + if (ret < 0) {
> > + rte_exit(EXIT_FAILURE,
> > + ":: Tx queue setup failed: err=%d,
> > port=%u\n",
> > + ret, port_id);
> > + }
> > + }
> > +
> > rte_eth_promiscuous_enable(port_id);
> > ret = rte_eth_dev_start(port_id);
> > if (ret < 0) {
> > --
> > 2.9.3
>
> Acked-by: Ori Kam <orika@mellanox.com>
next prev parent reply other threads:[~2017-12-28 1:54 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-20 2:10 [dpdk-dev] [PATCH] net/ixgbe: add flow parser ntuple support Wei Zhao
2017-12-20 2:33 ` [dpdk-dev] [PATCH v2] " Wei Zhao
2017-12-26 9:28 ` [dpdk-dev] [PATCH v3] " Wei Zhao
2017-12-26 9:39 ` [dpdk-dev] [PATCH v4] " Wei Zhao
2017-12-26 9:49 ` Wei Zhao
2017-12-27 8:31 ` [dpdk-dev] [PATCH v2] examples/flow_filtering: add Tx queues setup process Wei Zhao
2017-12-27 8:32 ` Wei Zhao
2017-12-27 11:53 ` Ori Kam
2017-12-28 1:54 ` Zhao1, Wei [this message]
2018-01-08 6:31 ` Zhang, Helin
2018-01-12 12:25 ` Ferruh Yigit
2018-01-16 13:52 ` Shahaf Shuler
2018-01-04 8:27 ` [dpdk-dev] [PATCH v4] net/ixgbe: add flow parser ntuple support Lu, Wenzhuo
2018-01-04 8:41 ` Zhao1, Wei
2018-01-05 6:13 ` [dpdk-dev] [PATCH v5] " Wei Zhao
2018-01-05 7:57 ` Lu, Wenzhuo
2018-01-07 8:53 ` Zhang, Helin
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=A2573D2ACFCADC41BB3BE09C6DE313CA07C934F5@PGSMSX103.gar.corp.intel.com \
--to=wei.zhao1@intel.com \
--cc=dev@dpdk.org \
--cc=orika@mellanox.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).