Skip to content

Commit

Permalink
Fix review comments in LNW documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Sandeep N <[email protected]>
  • Loading branch information
n-sandeep committed Jan 16, 2024
1 parent a0c0483 commit a815357
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 71 deletions.
41 changes: 41 additions & 0 deletions docs/apps/lnw/es2k/es2k-ipv6-overlay-traffic.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
diff --git a/mev_reference_p4_programs/fxp-net-scenarios/fxp-net_linux-networking-v2/fxp-net_linux-networking-v2.p4 b/mev_reference_p4_programs/fxp-net-scenarios/fxp-net_linux-networking-v2/fxp-net_linux-networking-v2.p4
index c343f4f..0043a50 100644
--- a/mev_reference_p4_programs/fxp-net-scenarios/fxp-net_linux-networking-v2/fxp-net_linux-networking-v2.p4
+++ b/mev_reference_p4_programs/fxp-net-scenarios/fxp-net_linux-networking-v2/fxp-net_linux-networking-v2.p4
@@ -670,10 +670,10 @@ control linux_networking_control(inout parsed_headers_t hdrs,

action set_tunnel_v6(bit<32> ipv6_1, bit<32> ipv6_2, bit<32> ipv6_3, bit<32> ipv6_4) {
@intel_byte_order("NETWORK") {
- user_meta.cmeta.ip_dst_match[31:0] = ipv6_1;
- user_meta.cmeta.ip_dst_match[63:32] = ipv6_2;
- user_meta.cmeta.ip_dst_match[95:64] = ipv6_3;
- user_meta.cmeta.ip_dst_match[127:96] = ipv6_4;
+ user_meta.cmeta.ip_dst_match[31:0] = ipv6_4;
+ user_meta.cmeta.ip_dst_match[63:32] = ipv6_3;
+ user_meta.cmeta.ip_dst_match[95:64] = ipv6_2;
+ user_meta.cmeta.ip_dst_match[127:96] = ipv6_1;
}
user_meta.cmeta.is_tunnel_v6 = 1;
//user_meta.cmeta.bit32_zeros[2:0] = 6; // ipv6
@@ -1110,7 +1110,7 @@ control linux_networking_control(inout parsed_headers_t hdrs,
table source_port_to_pr_map {
key = {
user_meta.cmeta.source_port : exact;
- user_meta.cmeta.bit32_zeros[15:0] : exact @name("zero_padding");
+ user_meta.cmeta.bit32_zeros[31:16] : exact @name("zero_padding");
}

actions = {
diff --git a/mev_reference_p4_programs/fxp-net-scenarios/fxp-net_linux-networking-v2/fxp-net_linux-networking-v2_hints.p4 b/mev_reference_p4_programs/fxp-net-scenarios/fxp-net_linux-networking-v2/fxp-net_linux-networking-v2_hints.p4
index 587de70..56975d9 100644
--- a/mev_reference_p4_programs/fxp-net-scenarios/fxp-net_linux-networking-v2/fxp-net_linux-networking-v2_hints.p4
+++ b/mev_reference_p4_programs/fxp-net-scenarios/fxp-net_linux-networking-v2/fxp-net_linux-networking-v2_hints.p4
@@ -92,7 +92,7 @@
#define MOD_INVALID 0x39000000

//SET1B_24 [prec=7, index=0, type_id=4, offset=0, mask=0x1, value=0x1]
-#define TRAP_MD_SET 0xE8400101
+#define TRAP_MD_SET 0xEC400101

//=============================================================================
// TABLE HINTS
73 changes: 3 additions & 70 deletions docs/apps/lnw/es2k/es2k-linux-networking.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,67 +16,10 @@ To enable this feature we have,
- `p4rt-ctl`: This python CLI includes a p4runtime client. Programs IPU E2100 with runtime rules by communicating with gRPC server.
- `Kernel stack`: All underlay related configurations are picked by `kernel monitor` thread via netlink events in `infrap4d` and these are programmed in IPU E2100 by calling TDI front end APIs.

### P4 program changes in 24.01
## P4 program changes in 24.01

Modify p4 programm with below changes, to enable support for

- IPv6 traffic with VxLAN support.
- VxLAN traffic fails when remote overlay VMs MAC is learnt on OvS, before DUTs overlay VMs MAC address.

```text
diff --git
a/mev_reference_p4_programs/fxp-net-scenarios/fxp-net_linux-networking-v2/fxp-net_linux-networking-v2.p4
b/mev_reference_p4_programs/fxp-net-scenarios/fxp-net_linux-networking-v2/fxp-net_linux-networking-v2.p4
index c343f4f..0043a50 100644
---
a/mev_reference_p4_programs/fxp-net-scenarios/fxp-net_linux-networking-v2/fxp-net_linux-networking-v2.p4
+++
b/mev_reference_p4_programs/fxp-net-scenarios/fxp-net_linux-networking-v2/fxp-net_linux-networking-v2.p4
@@ -670,10 +670,10 @@ control linux_networking_control(inout parsed_headers_t
hdrs,
action set_tunnel_v6(bit<32> ipv6_1, bit<32> ipv6_2, bit<32> ipv6_3, bit<32>
ipv6_4) {
@intel_byte_order("NETWORK") {
- user_meta.cmeta.ip_dst_match[31:0] = ipv6_1;
- user_meta.cmeta.ip_dst_match[63:32] = ipv6_2;
- user_meta.cmeta.ip_dst_match[95:64] = ipv6_3;
- user_meta.cmeta.ip_dst_match[127:96] = ipv6_4;
+ user_meta.cmeta.ip_dst_match[31:0] = ipv6_4;
+ user_meta.cmeta.ip_dst_match[63:32] = ipv6_3;
+ user_meta.cmeta.ip_dst_match[95:64] = ipv6_2;
+ user_meta.cmeta.ip_dst_match[127:96] = ipv6_1;
}
user_meta.cmeta.is_tunnel_v6 = 1;
//user_meta.cmeta.bit32_zeros[2:0] = 6; // ipv6
@@ -1110,7 +1110,7 @@ control linux_networking_control(inout parsed_headers_t
hdrs,
table source_port_to_pr_map {
key = {
user_meta.cmeta.source_port : exact;
- user_meta.cmeta.bit32_zeros[15:0] : exact @name("zero_padding");
+ user_meta.cmeta.bit32_zeros[31:16] : exact @name("zero_padding");
}
actions = {
diff --git
a/mev_reference_p4_programs/fxp-net-scenarios/fxp-net_linux-networking-v2/fxp-net_linux-networking-v2_hints.p4
b/mev_reference_p4_programs/fxp-net-scenarios/fxp-net_linux-networking-v2/fxp-net_linux-networking-v2_hints.p4
index 587de70..56975d9 100644
---
a/mev_reference_p4_programs/fxp-net-scenarios/fxp-net_linux-networking-v2/fxp-net_linux-networking-v2_hints.p4
+++
b/mev_reference_p4_programs/fxp-net-scenarios/fxp-net_linux-networking-v2/fxp-net_linux-networking-v2_hints.p4
@@ -92,7 +92,7 @@
#define MOD_INVALID 0x39000000
//SET1B_24 [prec=7, index=0, type_id=4, offset=0, mask=0x1, value=0x1]
-#define TRAP_MD_SET 0xE8400101
+#define TRAP_MD_SET 0xEC400101
//=============================================================================
// TABLE HINTS
```
- Modify `fxp-net_linux-networking-v2.p4` P4 program with [IPv6 overlay encap patch](es2k-ipv6-overlay-traffic.patch) changes, to fix issue for VxLAN encap packet where outer SMAC and DMAC are not populated.
- Modify `fxp-net_linux-networking-v2.p4` P4 program with [VxLAN overlay MAC learn patch](es2k-vxlan-overlay-traffic.patch) changes, to fix issue for VxLAN traffic, when remote overlay VMs MAC is learnt on OvS, before DUTs overlay VMs MAC address.

## Topology

Expand Down Expand Up @@ -356,13 +299,3 @@ Current Linux Networking support for the networking recipe has the following lim
- On ACC, firewall needs to be disabled. Otherwise, this service will block encapsulated packets.
- systemctl stop firewalld
- See LNW-V2 README_P4_CP_NWS, which comes with the P4 program for more information about limitations in router_interface_id action in nexthop_table(Defect filed).
- Manually modify context.json to remove NOP hardware action for in context.json from "set_nexthop " action in "nexthop_table". Open defect is present in p4-sde to fix this issue. Content to be removed under hardware action in context.json is
```text
{
"prec": 0,
"action_code": "NOP",
"index": 0,
"value": 0,
"mask": 0
},
```
2 changes: 1 addition & 1 deletion docs/apps/lnw/es2k/es2k-lnw-overlay-vms.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ System under test will have above topology running the networking recipe. Link P

## Creating the topology

Follow steps mentioned in [Running Infrap4d on Intel E2100](/docs/guides/es2k/running-infrap4d.md) for starting `infrap4d` process and creating protobuf binary for `fxp-net_linux-networking-v2` p4 program. Modify `program-name` in `/usr/share/stratum/es2k/es2k_skip_p4.conf` to `fxp-net_linux-networking-v2` before exploring the usecase.
Follow steps mentioned in [Running Infrap4d on Intel E2100](/guides/es2k/running-infrap4d.md) for starting `infrap4d` process and creating protobuf binary for `fxp-net_linux-networking-v2` p4 program. Modify `program-name` in `/usr/share/stratum/es2k/es2k_skip_p4.conf` to `fxp-net_linux-networking-v2` before exploring the usecase.

### Port Mapping

Expand Down
26 changes: 26 additions & 0 deletions docs/apps/lnw/es2k/es2k-vxlan-overlay-traffic.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
diff --git a/mev_reference_p4_programs/fxp-net-scenarios/fxp-net_linux-networking-v2/fxp-net_linux-networking-v2.p4 b/mev_reference_p4_programs/fxp-net-scenarios/fxp-net_linux-networking-v2/fxp-net_linux-networking-v2.p4
index c343f4f..a39f496 100644
--- a/mev_reference_p4_programs/fxp-net-scenarios/fxp-net_linux-networking-v2/fxp-net_linux-networking-v2.p4
+++ b/mev_reference_p4_programs/fxp-net-scenarios/fxp-net_linux-networking-v2/fxp-net_linux-networking-v2.p4
@@ -1110,7 +1110,7 @@ control linux_networking_control(inout parsed_headers_t hdrs,
table source_port_to_pr_map {
key = {
user_meta.cmeta.source_port : exact;
- user_meta.cmeta.bit32_zeros[15:0] : exact @name("zero_padding");
+ user_meta.cmeta.bit32_zeros[31:16] : exact @name("zero_padding");
}

actions = {
diff --git a/mev_reference_p4_programs/fxp-net-scenarios/fxp-net_linux-networking-v2/fxp-net_linux-networking-v2_hints.p4 b/mev_reference_p4_programs/fxp-net-scenarios/fxp-net_linux-networking-v2/fxp-net_linux-networking-v2_hints.p4
index 587de70..56975d9 100644
--- a/mev_reference_p4_programs/fxp-net-scenarios/fxp-net_linux-networking-v2/fxp-net_linux-networking-v2_hints.p4
+++ b/mev_reference_p4_programs/fxp-net-scenarios/fxp-net_linux-networking-v2/fxp-net_linux-networking-v2_hints.p4
@@ -92,7 +92,7 @@
#define MOD_INVALID 0x39000000

//SET1B_24 [prec=7, index=0, type_id=4, offset=0, mask=0x1, value=0x1]
-#define TRAP_MD_SET 0xE8400101
+#define TRAP_MD_SET 0xEC400101

//=============================================================================
// TABLE HINTS

0 comments on commit a815357

Please sign in to comment.