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

ERROR: not enough fields provided to complete _hexify() #56

Open
guimvmatos opened this issue Nov 9, 2020 · 5 comments
Open

ERROR: not enough fields provided to complete _hexify() #56

guimvmatos opened this issue Nov 9, 2020 · 5 comments
Assignees

Comments

@guimvmatos
Copy link
Member

Hi,

I'm trying to add an entry on a ternary table, but i'm getting this error: ERROR: not enough fields provided to complete _hexify()

But, I think I'm doing everything right. Can anybody tell me what's wrong?

I'm using python sw/CLI/P4_SWITCH_CLI.py to add entries. I've tryed with the lines below:

table_tcam_add_entry teid_exact 0x1 srv6_t_insert_2 0xfffffffff/0xfffffffff => 0xfc000000000000000000000000000001 0xfc000000000000000000000000000002

table_tcam_add_entry teid_exact 0x1 srv6_t_insert_2 0b00000000000000000000000000100000/0b11111111111111111111111111111111 => 0xfc000000000000000000000000000005 0xfc000000000000000000000000000006

table_tcam_add_entry teid_exact 0x1 srv6_t_insert_2 0x32/0x32 => 0xfc000000000000000000000000000005 0xfc000000000000000000000000000006

table_tcam_add_entry teid_exact 0x1 srv6_t_insert_2 0x0020/0x0020 => 0xfc000000000000000000000000000001 0xfc000000000000000000000000000002

table_tcam_add_entry teid_exact 1 srv6_t_insert_2 32/32 => 0xfc000000000000000000000000000001 0xfc000000000000000000000000000002

This is my table:

    table teid_exact{
        key = {
            hdr.gtp.teid: ternary;
     }
        actions = {
            srv6_t_insert_2;
            srv6_t_insert_3;
            NoAction;
        }
        size = 64;
        default_action = NoAction;
    }

And my action:

    action srv6_t_insert_2(ip6Addr_t s1, ip6Addr_t s2){
        hdr.ipv6_outer.payload_len = hdr.ipv6_outer.payload_len + 40;
        hdr.srv6_sid1.setValid();
        hdr.srv6_sid1.segment_id = s1;
        hdr.srv6_sid2.setValid();
        hdr.srv6_sid2.segment_id = s2;
        hdr.ipv6_outer.dst_addr = s2;
        build_srv6(2);
    }

The TEID field has 32 bits lenght

@happyPisces
Copy link

Hi, I have been trapped with this problem too, have you solved this problem now?

@guimvmatos
Copy link
Member Author

Hi, I have been trapped with this problem too, have you solved this problem now?

HI @happyPisces,

I haven't solve it yet, but I discover that If I comment on one of the lines below, it works. I don't know why this is happening.

srv6_t_insert_2
srv6_t_insert_3 

Tell me if it works for you. And if you find out the cause of this behavior, please, tell me too.

@happyPisces
Copy link

HI @guimvmatos ,
Thanks. If I find out something, I will tell you.

@happyPisces
Copy link

happyPisces commented Nov 26, 2020 via email

@XiaoM1573
Copy link

This problem i have solved. You should add some zero in your commands.txt.
For table teid_exact, actually it has five parameters and their order is fixed.
i.e.
table_cam_add_entry teid_exact insert_srv6_list_2 0x20010001000000000000000000000002 => 0x00A10000000000000000000000000002 0x20010001000000000000000000000002 0 0 0

i.e.
table_cam_add_entry teid_exact insert_srv6_list_3 0x20010001000000000000000000000002 => 0 0 0x00A10000000000000000000000000002 0x00A10000000000000000000000000006 0x20010001000000000000000000000002

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

4 participants