* [dpdk-dev] Segmentation fault when creating a hash table in the example of pipeline (ROUTING type)
@ 2018-04-19 12:33 Victor Huertas
2018-04-19 12:57 ` Shyam Shrivastav
0 siblings, 1 reply; 2+ messages in thread
From: Victor Huertas @ 2018-04-19 12:33 UTC (permalink / raw)
To: dev
Hi all,
I have tried to run the pipeline example with a ROUTING pipeline where I
configured n_arp_entries=8 as well as the arp_key_offset = 192.
It compiles perfectly but when it reaches the line where the
rte_pipeline_table_create is (see below a fragment of the source code of
the pipeline_routing_init function at pipeline_routing.be.cpp file) it
always crashes with a segmentation fault at the
rte_table_hash_create_key8_ext() function.
I am completely stuck due to this issue. Has some bug being declared
regarding this table creation function?
/* ARP table configuration */
if (p_rt->params.n_arp_entries) {
struct rte_table_hash_key8_ext_params table_arp_params;
table_arp_params.n_entries = p_rt->params.n_arp_entries;
table_arp_params.n_entries_ext = p_rt->params.n_arp_entries;
table_arp_params.f_hash = hash_default_key8;
table_arp_params.seed = 0;
table_arp_params.signature_offset = 0; /* Unused */
table_arp_params.key_offset = p_rt->params.arp_key_offset;
struct rte_pipeline_table_params table_params = {
.ops = &rte_table_hash_key8_ext_dosig_ops,
.arg_create = &table_arp_params,
.f_action_hit = get_arp_table_ah_hit(p_rt),
.f_action_miss = NULL,
.arg_ah = p_rt,
.action_data_size = sizeof(struct arp_table_entry) -
sizeof(struct rte_pipeline_table_entry),
};
int status;
status = rte_pipeline_table_create(p->p,
&table_params,
&p->table_id[1]);
if (status) {
rte_pipeline_free(p->p);
rte_free(p);
return NULL;
}
p->n_tables++;
}
Thanks
--
Victor
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] Segmentation fault when creating a hash table in the example of pipeline (ROUTING type)
2018-04-19 12:33 [dpdk-dev] Segmentation fault when creating a hash table in the example of pipeline (ROUTING type) Victor Huertas
@ 2018-04-19 12:57 ` Shyam Shrivastav
0 siblings, 0 replies; 2+ messages in thread
From: Shyam Shrivastav @ 2018-04-19 12:57 UTC (permalink / raw)
To: Victor Huertas; +Cc: dev
I have been using librte_pipeline, librte_table though only acl and
hash_key16 part, and firewall part of ip_pipeline in my project for quite
sometime. I have never used or worked on other parts of ip_pipeline app
like routing.
Obviously issue is due to bad memory access at some point. Here are my
steps if it helps.
If unable to figure out , I usually replace -O3 with -g (that is enable
debugging symbols and disable optimization) in makefiles of these two
libraries and compile them. Then do the same thing with ip_pipeline
makefile and compile. And thats it use gdb and you can get the exact
culprit line
On Thu, Apr 19, 2018 at 6:03 PM, Victor Huertas <vhuertas@gmail.com> wrote:
> Hi all,
>
> I have tried to run the pipeline example with a ROUTING pipeline where I
> configured n_arp_entries=8 as well as the arp_key_offset = 192.
>
> It compiles perfectly but when it reaches the line where the
> rte_pipeline_table_create is (see below a fragment of the source code of
> the pipeline_routing_init function at pipeline_routing.be.cpp file) it
> always crashes with a segmentation fault at the
> rte_table_hash_create_key8_ext() function.
>
> I am completely stuck due to this issue. Has some bug being declared
> regarding this table creation function?
>
>
> /* ARP table configuration */
> if (p_rt->params.n_arp_entries) {
>
> struct rte_table_hash_key8_ext_params table_arp_params;
> table_arp_params.n_entries = p_rt->params.n_arp_entries;
> table_arp_params.n_entries_ext = p_rt->params.n_arp_entries;
> table_arp_params.f_hash = hash_default_key8;
> table_arp_params.seed = 0;
> table_arp_params.signature_offset = 0; /* Unused */
> table_arp_params.key_offset = p_rt->params.arp_key_offset;
>
>
> struct rte_pipeline_table_params table_params = {
> .ops = &rte_table_hash_key8_ext_dosig_ops,
> .arg_create = &table_arp_params,
> .f_action_hit = get_arp_table_ah_hit(p_rt),
> .f_action_miss = NULL,
> .arg_ah = p_rt,
> .action_data_size = sizeof(struct arp_table_entry) -
> sizeof(struct rte_pipeline_table_entry),
> };
>
> int status;
>
> status = rte_pipeline_table_create(p->p,
> &table_params,
> &p->table_id[1]);
>
> if (status) {
> rte_pipeline_free(p->p);
> rte_free(p);
> return NULL;
> }
>
> p->n_tables++;
> }
>
> Thanks
>
> --
> Victor
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-04-19 12:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-19 12:33 [dpdk-dev] Segmentation fault when creating a hash table in the example of pipeline (ROUTING type) Victor Huertas
2018-04-19 12:57 ` Shyam Shrivastav
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).