examples/ipsec-secgw: fix dependency on core 0

Message ID 1585580118-17129-1-git-send-email-lbartosik@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers
Series examples/ipsec-secgw: fix dependency on core 0 |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail apply issues

Commit Message

Lukas Bartosik [C] March 30, 2020, 2:55 p.m. UTC
  If core 0 is not included in coremask in event mode then
ipsec-secgw seg faults. This fix uses first core from
coremask in rx queue configuration instead of core 0
which was always previously used.

Signed-off-by: Lukasz Bartosik <lbartosik@marvell.com>
---
 examples/ipsec-secgw/ipsec-secgw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Anoob Joseph April 1, 2020, 10:39 a.m. UTC | #1
> 
> If core 0 is not included in coremask in event mode then ipsec-secgw seg faults.
> This fix uses first core from coremask in rx queue configuration instead of core 0
> which was always previously used.
> 
> Signed-off-by: Lukasz Bartosik <lbartosik@marvell.com>
> ---
>  examples/ipsec-secgw/ipsec-secgw.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

Acked-by: Anoob Joseph <anoobj@marvell.com>
  
Akhil Goyal April 5, 2020, 4:43 p.m. UTC | #2
> >
> > If core 0 is not included in coremask in event mode then ipsec-secgw seg faults.
> > This fix uses first core from coremask in rx queue configuration instead of core
> 0
> > which was always previously used.
> >
> > Signed-off-by: Lukasz Bartosik <lbartosik@marvell.com>
> > ---
> >  examples/ipsec-secgw/ipsec-secgw.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> 
> Acked-by: Anoob Joseph <anoobj@marvell.com>

Applied to dpdk-next-crypto

Thanks.
  
Akhil Goyal April 5, 2020, 4:47 p.m. UTC | #3
> >
> > Acked-by: Anoob Joseph <anoobj@marvell.com>
> 
> Applied to dpdk-next-crypto
> 
> Thanks.

Squashed to the original patch which introduced the issue as it is not submitted to master branch yet.
  

Patch

diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index ce36e6d..5fde4f7 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -2643,7 +2643,7 @@  check_event_mode_params(struct eh_conf *eh_conf)
 		params = &lcore_params[nb_lcore_params++];
 		params->port_id = portid;
 		params->queue_id = 0;
-		params->lcore_id = 0;
+		params->lcore_id = rte_get_next_lcore(0, 0, 1);
 	}
 
 	return 0;