DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [DPDK] examples/ipsec-secgw: fix use of unsupported RSS offloads
@ 2018-06-22 13:27 Remy Horton
       [not found] ` <1003194c-bc82-a12f-4241-c91fa206470e@intel.com>
  2018-06-26  9:03 ` Ferruh Yigit
  0 siblings, 2 replies; 4+ messages in thread
From: Remy Horton @ 2018-06-22 13:27 UTC (permalink / raw)
  To: dev

Since commit aa1a6d87f15d ("ethdev: force RSS offload rules again")
a check that requested RSS offloads are supported by a PMD is
enforced, whereas in the past asking for unsupported offloads would
not result in an error. This patch changes the IPSec gateway sample
so that it only requests modes that are supported rather than
failing to start up.

Fixes: d299106e8e31 ("examples/ipsec-secgw: add IPsec sample application")

Signed-off-by: Remy Horton <remy.horton@intel.com>
---
 examples/ipsec-secgw/ipsec-secgw.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index a5da8b2..d247d5f 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -1566,6 +1566,11 @@ port_init(uint16_t portid)
 	if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
 		local_port_conf.txmode.offloads |=
 			DEV_TX_OFFLOAD_MBUF_FAST_FREE;
+
+	/* Only request RSS offloads the NIC supports. */
+	local_port_conf.rx_adv_conf.rss_conf.rss_hf &=
+		dev_info.flow_type_rss_offloads;
+
 	ret = rte_eth_dev_configure(portid, nb_rx_queue, nb_tx_queue,
 			&local_port_conf);
 	if (ret < 0)
-- 
2.9.5

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [DPDK] examples/ipsec-secgw: fix use of unsupported RSS offloads
       [not found] ` <1003194c-bc82-a12f-4241-c91fa206470e@intel.com>
@ 2018-06-25 12:20   ` Remy Horton
  0 siblings, 0 replies; 4+ messages in thread
From: Remy Horton @ 2018-06-25 12:20 UTC (permalink / raw)
  To: Ferruh Yigit, dev


On 22/06/2018 16:46, Ferruh Yigit wrote:
[..]
> Is following covering this patch:
> https://patches.dpdk.org/patch/41313/

Looks like it. Didn't spot it earlier..

..Remy

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [DPDK] examples/ipsec-secgw: fix use of unsupported RSS offloads
  2018-06-22 13:27 [dpdk-dev] [DPDK] examples/ipsec-secgw: fix use of unsupported RSS offloads Remy Horton
       [not found] ` <1003194c-bc82-a12f-4241-c91fa206470e@intel.com>
@ 2018-06-26  9:03 ` Ferruh Yigit
  2018-06-26  9:08   ` Remy Horton
  1 sibling, 1 reply; 4+ messages in thread
From: Ferruh Yigit @ 2018-06-26  9:03 UTC (permalink / raw)
  To: Remy Horton, dev

On 6/22/2018 2:27 PM, Remy Horton wrote:
> Since commit aa1a6d87f15d ("ethdev: force RSS offload rules again")
> a check that requested RSS offloads are supported by a PMD is
> enforced, whereas in the past asking for unsupported offloads would
> not result in an error. This patch changes the IPSec gateway sample
> so that it only requests modes that are supported rather than
> failing to start up.
> 
> Fixes: d299106e8e31 ("examples/ipsec-secgw: add IPsec sample application")
> 
> Signed-off-by: Remy Horton <remy.horton@intel.com>

Hi Remy,

Is following covering this patch:
https://patches.dpdk.org/patch/41313/

> ---
>  examples/ipsec-secgw/ipsec-secgw.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
> index a5da8b2..d247d5f 100644
> --- a/examples/ipsec-secgw/ipsec-secgw.c
> +++ b/examples/ipsec-secgw/ipsec-secgw.c
> @@ -1566,6 +1566,11 @@ port_init(uint16_t portid)
>  	if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
>  		local_port_conf.txmode.offloads |=
>  			DEV_TX_OFFLOAD_MBUF_FAST_FREE;
> +
> +	/* Only request RSS offloads the NIC supports. */
> +	local_port_conf.rx_adv_conf.rss_conf.rss_hf &=
> +		dev_info.flow_type_rss_offloads;
> +
>  	ret = rte_eth_dev_configure(portid, nb_rx_queue, nb_tx_queue,
>  			&local_port_conf);
>  	if (ret < 0)
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [DPDK] examples/ipsec-secgw: fix use of unsupported RSS offloads
  2018-06-26  9:03 ` Ferruh Yigit
@ 2018-06-26  9:08   ` Remy Horton
  0 siblings, 0 replies; 4+ messages in thread
From: Remy Horton @ 2018-06-26  9:08 UTC (permalink / raw)
  To: Ferruh Yigit, dev


On 26/06/2018 10:03, Ferruh Yigit wrote:
[..]
> Hi Remy,
>
> Is following covering this patch:
> https://patches.dpdk.org/patch/41313/

Patch was sent out with wrong subject, so consider it Nack'd.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-06-26  9:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-22 13:27 [dpdk-dev] [DPDK] examples/ipsec-secgw: fix use of unsupported RSS offloads Remy Horton
     [not found] ` <1003194c-bc82-a12f-4241-c91fa206470e@intel.com>
2018-06-25 12:20   ` Remy Horton
2018-06-26  9:03 ` Ferruh Yigit
2018-06-26  9:08   ` Remy Horton

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).