Re: [dpdk-dev] 回复:RE: 回复:RE: Thread safety in rte_acl

2018-01-10 Thread Ananyev, Konstantin
The simplest one would be to have rwlock to read/write active index. Also something like that I think should work (just a sample, not tested or compiled): struct acl { rte_acl_ctx *ctx[2]; rte_atomic32_t use; uint32_t active; }; update(struct acl *acl, …) { /* make s

Re: [dpdk-dev] 回复:RE: 回复:RE: Thread safety in rte_acl

2018-01-09 Thread Ramia, Kannan Babu
The way the application is written assumes there will be a transition phase where few threads will have OLD ACL results for the packets that are currently handled, but once those set is flushed out all the new set of packets will be back to the active set. So the system will be consistent after