From: "Zhao1, Wei" <wei.zhao1@intel.com>
To: Ori Kam <orika@mellanox.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 1/2] examples/flow_filtering: fix set offloads based on cap
Date: Mon, 5 Nov 2018 09:51:59 +0000 [thread overview]
Message-ID: <A2573D2ACFCADC41BB3BE09C6DE313CA07E69060@PGSMSX103.gar.corp.intel.com> (raw)
In-Reply-To: <1541410503-29360-1-git-send-email-orika@mellanox.com>
Acked-by: Wei Zhao <wei.zhao1@intel.com>
> -----Original Message-----
> From: Ori Kam [mailto:orika@mellanox.com]
> Sent: Monday, November 5, 2018 5:35 PM
> To: Ori Kam <orika@mellanox.com>
> Cc: dev@dpdk.org; Zhao1, Wei <wei.zhao1@intel.com>
> Subject: [PATCH 1/2] examples/flow_filtering: fix set offloads based on cap
>
> Some of the requested offloads are not supported by all devices.
>
> This patch fixes this issue by setting only the supported offloads.
>
> Fixes: feca6c428a5e ("examples/flow_filtering: add Tx queues setup
> process")
> Cc: wei.zhao1@intel.com
>
> Signed-off-by: Ori Kam <orika@mellanox.com>
> ---
> examples/flow_filtering/main.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/examples/flow_filtering/main.c b/examples/flow_filtering/main.c
> index a73d120..27e287a 100644
> --- a/examples/flow_filtering/main.c
> +++ b/examples/flow_filtering/main.c
> @@ -136,6 +136,8 @@
> struct rte_eth_rxconf rxq_conf;
> struct rte_eth_dev_info dev_info;
>
> + rte_eth_dev_info_get(port_id, &dev_info);
> + port_conf.txmode.offloads &= dev_info.rx_offload_capa;
> printf(":: initializing port: %d\n", port_id);
> ret = rte_eth_dev_configure(port_id,
> nr_queues, nr_queues, &port_conf);
> @@ -145,7 +147,6 @@
> ret, port_id);
> }
>
> - rte_eth_dev_info_get(port_id, &dev_info);
> rxq_conf = dev_info.default_rxconf;
> rxq_conf.offloads = port_conf.rxmode.offloads;
> /* only set Rx queues: something we care only so far */
> --
> 1.8.3.1
next prev parent reply other threads:[~2018-11-05 9:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-05 9:35 Ori Kam
2018-11-05 9:35 ` [dpdk-dev] [PATCH 2/2] examples/flow_filtering: fix remove vlan item Ori Kam
2018-11-05 9:51 ` Zhao1, Wei [this message]
2018-11-06 1:29 ` [dpdk-dev] [PATCH 1/2] examples/flow_filtering: fix set offloads based on cap 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=A2573D2ACFCADC41BB3BE09C6DE313CA07E69060@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).