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

Will the TCP-INT function be added? #67

Open
jackmygreat opened this issue Feb 4, 2025 · 20 comments
Open

Will the TCP-INT function be added? #67

jackmygreat opened this issue Feb 4, 2025 · 20 comments
Labels
question Further information is requested

Comments

@jackmygreat
Copy link

In-band telemetry is an important feature, are there plans to add TCP-INT to the code?

@jafingerhut
Copy link
Contributor

Do you mean this code? https://github.com/p4lang/p4app-TCP-INT

@jackmygreat
Copy link
Author

@jafingerhut
Copy link
Contributor

Sorry, yes I checked after I posted my comment above, and that reminded me that the P4 code for the Tofino part of TCP-INT is not in that repository.

I can ping @pkotikal to see if she knows the answer. I do not know if there are plans to add Tofino TCP-INT P4 code to this, or any other, public repository.

@jackmygreat
Copy link
Author

Thank you very much. I have another question. I have a machine with bf-sde9.2 deployed. The TCP_INT code is in bf-sde9.2.1. I found that they are only different in the pkgsrc/switch-p4-16 directory. Can I copy the switch-p4-16 directory of TCP-INT to the current bf-sde9.2 machine, and then only compile switch-p4-16? Because it takes a long time to fully compile SDE.

@jafingerhut
Copy link
Contributor

I do not know for certain, but I'd recommend to try it and see what happens. Also, note that In the time it takes to await an answer, I'd bet your computer could have finished fully compiling another version of the SDE.

@fruffy fruffy added the question Further information is requested label Feb 4, 2025
@marcosfsch
Copy link

@jackmygreat, can you confirm in which path in bf-sde the TCP_INT code is available?

@jackmygreat
Copy link
Author

The doc of TCP_INT is in packages/switch-p4-16-9.7.2/docs/tcp-int.md. The P4 code of TCP_INT is in packages/switch-p4-16-9.7.2/p4src/shared/tcp_int.p4. @marcosfsch

@pkotikal
Copy link
Collaborator

pkotikal commented Feb 5, 2025

@jackmygreat, apart from the switch-p4-16 programs included in the latest SDE, we don't have any plans to add old profiles.

@jackmygreat
Copy link
Author

As the documentation describes , the switch.p4 program describes a data plane of an L2/L3 switch.

When we run the ./run_switchd.sh -p switch command, we encounter problems when setting routing or forwarding. Our topo is as follows. We try to set the FIB table, but don't know how to set the nexthop_index. So, how should we set FIB table or other things to achieve routing or forwarding? Or is there any relevant example? Thank you very much

Image

@Gold778b
Copy link

Gold778b commented Feb 7, 2025

@jackmygreat I recommend that you familiarize yourself with ready-made examples from Inter in the folder /opt/open-p4studio/pkgsrc/p4-examples/p4_16_programs. There is a python test file in which you can see how to configure chip tables.

@Gold778b
Copy link

Gold778b commented Feb 7, 2025

@jackmygreat In this example, you need to configure a packet forwarding table from input port 1 to output port 2 through the Control Plane.

@jackmygreat
Copy link
Author

jackmygreat commented Feb 7, 2025

I have set up the FIB table. The nexthop_index is the D_P number. 148 and 132 are the D_P number. What does nexthop_index mean, does it refer to the port number?

Image

Image

@Gold778b
Copy link

Gold778b commented Feb 7, 2025

22/0 |21/0|148|1/20|10G |NONE|Au|Au|YES|DIS|DWN| NONE | 0| 0|
148 - port 22/0

@jackmygreat
Copy link
Author

This is the status of PM.
Image

@Gold778b
Copy link

Gold778b commented Feb 7, 2025

Do you have a virtual switch or a real one? Have you redefined the ports?

@jackmygreat
Copy link
Author

real hardware switch

@Gold778b
Copy link

Gold778b commented Feb 7, 2025

Are you using open SDE (open-p4studio)?

@jackmygreat
Copy link
Author

I use bf-sde, but its switch.p4 is basically the same as open SDE.

@Gold778b
Copy link

Gold778b commented Feb 7, 2025

@jackmygreat For discount nexthop_index is not the output port number. As far as I understand nexthop_index needs to be associated with the output port.

@Gold778b
Copy link

Gold778b commented Feb 7, 2025

This is roughly how it should be

table nexthop_table {
key = {
meta.nexthop_index: exact;
}
actions = {
forward;
}
}

action forward(bit<9> port) {
standard_metadata.egress_spec = port;
}

apply {
nexthop_table.apply();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

6 participants