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

metadata matching #5

Closed
YuvalAdler opened this issue Dec 31, 2012 · 1 comment
Closed

metadata matching #5

YuvalAdler opened this issue Dec 31, 2012 · 1 comment

Comments

@YuvalAdler
Copy link
Contributor

There are 2 problems with metadata flow matching:

  1. conversion to network order in oxm_match.c should be:
    case OFI_OXM_OF_METADATA:{
        ofl_structs_match_put64(match, f->header, hton64(*((uint64_t*) value)));
        return 0;
    }
    case OFI_OXM_OF_METADATA_W:{
        ofl_structs_match_put64m(match, f->header,hton64(*((uint64_t*) value)),hton64(*((uint64_t*) mask)));

I think there are more Endian issues in that area (e.g. OFI_OXM_OF_IN_PHY_PORT).

  1. Cannot use memset with uint64_t:
                memset(f->value,(*metadata & ~wi->metadata_mask) | (wi->metadata & wi->metadata_mask), sizeof(uint64_t));     

Should be:

                *metadata = (*metadata & ~wi->metadata_mask) | (wi->metadata & wi->metadata_mask);
@rrdenicol
Copy link
Contributor

Fixed. Thank you!

ccascone referenced this issue in beba-eu/beba-switch Sep 29, 2016
ccascone referenced this issue in beba-eu/beba-switch Sep 29, 2016
ederlf pushed a commit that referenced this issue Feb 21, 2017
State update optimization + bi-flow handling fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants