Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to set one burst callback per sides #397

Open
outscale-mgo opened this issue Jul 21, 2017 · 0 comments
Open

Allow to set one burst callback per sides #397

outscale-mgo opened this issue Jul 21, 2017 · 0 comments

Comments

@outscale-mgo
Copy link
Contributor

outscale-mgo commented Jul 21, 2017

Each brick have a burst callback which should in most case have a completely different behaviours depending of the direction of packets passing though the brick so,
on a lot of brick the first job of the callback is to determine where the packet come from with that kind of code:

if (sate->output == from)
       return sub-function-1(...);
else
       return sub-function-2(...);

So maybe it would be faster if instead of having a callback that check the output at each call, we have one callback for each sides.

The simplest way to start implementing thi, would be to replace

int (*burst)(struct pg_brick *brick, enum pg_side from,
uint16_t edge_index, struct rte_mbuf **pkts,
uint64_t pkts_mask, struct pg_error **errp);

per

int (*burst[MAX_SIDES])(struct pg_brick *brick, enum pg_side from,
uint16_t edge_index, struct rte_mbuf **pkts,
uint64_t pkts_mask, struct pg_error **errp);
@outscale-mgo outscale-mgo changed the title Allow to set burst callback on side Allow to set one burst callback per sides Jul 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants