* [dpdk-dev] Segm fault to the update acl context @ 2017-03-26 23:27 Victor Detoni 2017-03-27 9:23 ` Ananyev, Konstantin 0 siblings, 1 reply; 5+ messages in thread From: Victor Detoni @ 2017-03-26 23:27 UTC (permalink / raw) To: dev, dpdk-users hello, I'm running l3fwd-acl example as a daemon and trying to update acl context with as a "swap" acl context, but the program stops with a segment fault statement. Even using variables to direct which acl context the main loop has to use, the program breaks. I have noticed that even when I update only the swap acl context, the acl structures are updated and the segment fault also happens. please, someone knows why this segment fault? Thanks Victor ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] Segm fault to the update acl context 2017-03-26 23:27 [dpdk-dev] Segm fault to the update acl context Victor Detoni @ 2017-03-27 9:23 ` Ananyev, Konstantin 2017-03-27 20:21 ` Victor Detoni 0 siblings, 1 reply; 5+ messages in thread From: Ananyev, Konstantin @ 2017-03-27 9:23 UTC (permalink / raw) To: Victor Detoni, dev, dpdk-users Hi Victor, > hello, > > I'm running l3fwd-acl example as a daemon and trying to update acl context > with as a "swap" acl context, but the program stops with a segment fault > statement. Even using variables to direct which acl context the main loop > has to use, the program breaks. > > I have noticed that even when I update only the swap acl context, the acl > structures are updated and the segment fault also happens. > > please, someone knows why this segment fault? As I remembers, l3fwd-acl doesn't support updating ACL ctx on the fly. Could you explain a bit more what are you trying to do, or even better provide some code example to reproduce the issue? Konstantin ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] Segm fault to the update acl context 2017-03-27 9:23 ` Ananyev, Konstantin @ 2017-03-27 20:21 ` Victor Detoni [not found] ` <2601191342CEEE43887BDE71AB9772583FAE0654@IRSMSX109.ger.corp.intel.com> 0 siblings, 1 reply; 5+ messages in thread From: Victor Detoni @ 2017-03-27 20:21 UTC (permalink / raw) To: Ananyev, Konstantin; +Cc: dev, users Hi Konstantin, Thank you for your questions. Please find below a sample of my code: After the program has started, I send sighup signals to update the acl context, like this: if (signup == SIGHUP) use_acl_ctx_swap = 1; ... During the SIGHUP processes I create a new/swap acl ctx and data structures using the app_acl_init, add_rules and setup_acl functions ... main_loop() ... if (use_acl_ctx_swap) { if (acl_search.num_ipv4) { rte_acl_classify( acl_config.swap_acx_ipv4[socketid], //use swap acl ctx acl_search.data_ipv4, acl_search.res_ipv4, acl_search.num_ipv4, DEFAULT_MAX_CATEGORIES); send_packets(acl_search.m_ipv4, acl_search.res_ipv4, acl_search.num_ipv4); } else { if (acl_search.num_ipv4) { rte_acl_classify( acl_config.acx_ipv4[socketid], acl_search.data_ipv4, acl_search.res_ipv4, acl_search.num_ipv4, DEFAULT_MAX_CATEGORIES); send_packets(acl_search.m_ipv4, acl_search.res_ipv4, acl_search.num_ipv4); } } When I update the acl ctx, rarely the program doesn't crash, mainly when I just increase de rules. Is there a another way to add new/remove rules in the acl ctx instead of sighup or control variables? thanks Victor On Mon, Mar 27, 2017 at 6:23 AM, Ananyev, Konstantin < konstantin.ananyev@intel.com> wrote: > Hi Victor, > > > hello, > > > > I'm running l3fwd-acl example as a daemon and trying to update acl > context > > with as a "swap" acl context, but the program stops with a segment fault > > statement. Even using variables to direct which acl context the main loop > > has to use, the program breaks. > > > > I have noticed that even when I update only the swap acl context, the acl > > structures are updated and the segment fault also happens. > > > > please, someone knows why this segment fault? > > As I remembers, l3fwd-acl doesn't support updating ACL ctx on the fly. > Could you explain a bit more what are you trying to do, or even better > provide some code example to reproduce the issue? > > Konstantin > > ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <2601191342CEEE43887BDE71AB9772583FAE0654@IRSMSX109.ger.corp.intel.com>]
* Re: [dpdk-dev] Segm fault to the update acl context [not found] ` <2601191342CEEE43887BDE71AB9772583FAE0654@IRSMSX109.ger.corp.intel.com> @ 2017-03-27 23:34 ` Ananyev, Konstantin 2017-03-30 20:17 ` Victor Detoni 0 siblings, 1 reply; 5+ messages in thread From: Ananyev, Konstantin @ 2017-03-27 23:34 UTC (permalink / raw) To: Victor Detoni; +Cc: dev > > Hi Konstantin, > > Thank you for your questions. Please find below a sample of my code: > > After the program has started, I send sighup signals to update the acl context, like this: > > if (signup == SIGHUP) > use_acl_ctx_swap = 1; > ... > During the SIGHUP processes I create a new/swap acl ctx and data structures using the app_acl_init, add_rules and setup_acl > functions Ok, so you do that inside your signal handler, correct? Do you synchronize this context updates with your data-processing threads somehow? Konstantin > ... > > main_loop() > ... > if (use_acl_ctx_swap) { > if (acl_search.num_ipv4) { > rte_acl_classify( > acl_config.swap_acx_ipv4[socketid], //use swap acl ctx > acl_search.data_ipv4, > acl_search.res_ipv4, > acl_search.num_ipv4, > DEFAULT_MAX_CATEGORIES); > > send_packets(acl_search.m_ipv4, > acl_search.res_ipv4, > acl_search.num_ipv4); > > } else { > if (acl_search.num_ipv4) { > rte_acl_classify( > acl_config.acx_ipv4[socketid], > acl_search.data_ipv4, > acl_search.res_ipv4, > acl_search.num_ipv4, > DEFAULT_MAX_CATEGORIES); > > send_packets(acl_search.m_ipv4, > acl_search.res_ipv4, > acl_search.num_ipv4); > } > } > > When I update the acl ctx, rarely the program doesn't crash, mainly when I just increase de rules. Is there a another way to add > new/remove rules in the acl ctx instead of sighup or control variables? > > thanks > Victor > > On Mon, Mar 27, 2017 at 6:23 AM, Ananyev, Konstantin <konstantin.ananyev@intel.com> wrote: > Hi Victor, > > > hello, > > > > I'm running l3fwd-acl example as a daemon and trying to update acl context > > with as a "swap" acl context, but the program stops with a segment fault > > statement. Even using variables to direct which acl context the main loop > > has to use, the program breaks. > > > > I have noticed that even when I update only the swap acl context, the acl > > structures are updated and the segment fault also happens. > > > > please, someone knows why this segment fault? > > As I remembers, l3fwd-acl doesn't support updating ACL ctx on the fly. > Could you explain a bit more what are you trying to do, or even better > provide some code example to reproduce the issue? > > Konstantin ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] Segm fault to the update acl context 2017-03-27 23:34 ` Ananyev, Konstantin @ 2017-03-30 20:17 ` Victor Detoni 0 siblings, 0 replies; 5+ messages in thread From: Victor Detoni @ 2017-03-30 20:17 UTC (permalink / raw) To: Ananyev, Konstantin; +Cc: dev Hi, I have tried to use rcu and rte_lock libs to synchronize but I put the ctx_reload before rte_acl_classify function and it is working fine. My code is working like this and I'm not having latency during reload process. while() { ... if (acl_ctx_reload) do_acl_reload(); if (acl_search.num_ipv4) { rte_acl_classify( acl_config.acx_ipv4[socketid], acl_search.data_ipv4, acl_search.res_ipv4, acl_search.num_ipv4, DEFAULT_MAX_CATEGORIES); send_packets(acl_search.m_ipv4, acl_search.res_ipv4, acl_search.num_ipv4); } } Thank you for your support. On Mon, Mar 27, 2017 at 8:34 PM, Ananyev, Konstantin < konstantin.ananyev@intel.com> wrote: > > > > > > Hi Konstantin, > > > > Thank you for your questions. Please find below a sample of my code: > > > > After the program has started, I send sighup signals to update the acl > context, like this: > > > > if (signup == SIGHUP) > > use_acl_ctx_swap = 1; > > ... > > During the SIGHUP processes I create a new/swap acl ctx and data > structures using the app_acl_init, add_rules and setup_acl > > functions > > Ok, so you do that inside your signal handler, correct? > Do you synchronize this context updates with your data-processing threads > somehow? > Konstantin > > > ... > > > > main_loop() > > ... > > if (use_acl_ctx_swap) { > > if (acl_search.num_ipv4) { > > rte_acl_classify( > > acl_config.swap_acx_ipv4[socketid], //use swap acl ctx > > acl_search.data_ipv4, > > acl_search.res_ipv4, > > acl_search.num_ipv4, > > DEFAULT_MAX_CATEGORIES); > > > > send_packets(acl_search.m_ipv4, > > acl_search.res_ipv4, > > acl_search.num_ipv4); > > > > } else { > > if (acl_search.num_ipv4) { > > rte_acl_classify( > > acl_config.acx_ipv4[socketid], > > acl_search.data_ipv4, > > acl_search.res_ipv4, > > acl_search.num_ipv4, > > DEFAULT_MAX_CATEGORIES); > > > > send_packets(acl_search.m_ipv4, > > acl_search.res_ipv4, > > acl_search.num_ipv4); > > } > > } > > > > When I update the acl ctx, rarely the program doesn't crash, mainly when > I just increase de rules. Is there a another way to add > > new/remove rules in the acl ctx instead of sighup or control variables? > > > > thanks > > Victor > > > > On Mon, Mar 27, 2017 at 6:23 AM, Ananyev, Konstantin < > konstantin.ananyev@intel.com> wrote: > > Hi Victor, > > > > > hello, > > > > > > I'm running l3fwd-acl example as a daemon and trying to update acl > context > > > with as a "swap" acl context, but the program stops with a segment > fault > > > statement. Even using variables to direct which acl context the main > loop > > > has to use, the program breaks. > > > > > > I have noticed that even when I update only the swap acl context, the > acl > > > structures are updated and the segment fault also happens. > > > > > > please, someone knows why this segment fault? > > > > As I remembers, l3fwd-acl doesn't support updating ACL ctx on the fly. > > Could you explain a bit more what are you trying to do, or even better > > provide some code example to reproduce the issue? > > > > Konstantin > > ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-03-30 20:17 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-03-26 23:27 [dpdk-dev] Segm fault to the update acl context Victor Detoni 2017-03-27 9:23 ` Ananyev, Konstantin 2017-03-27 20:21 ` Victor Detoni [not found] ` <2601191342CEEE43887BDE71AB9772583FAE0654@IRSMSX109.ger.corp.intel.com> 2017-03-27 23:34 ` Ananyev, Konstantin 2017-03-30 20:17 ` Victor Detoni
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).