Skip to content

Commit

Permalink
Handle both primiary and secondary network traffic on FXP phy port0 (#…
Browse files Browse the repository at this point in the history
…332)

* Handle both primiary and secondary network traffic on FXP phy port0

Redhat wanted to use single physical port to handle both their primary
and secondary network traffic.
1) handle ARP/Broadcast packets using FXP mirroring to primary interface
   VSI(D5) while the original packets are sent to P0's VSI(D4).
2) Unicast packets are selectively forwarded to the primary network
   interface based on DMAC lookup.

NOTE: Default behavior will be defined using devmem to reroute all the
phy0 traffic to D5's VSI. Once the VSP comes in, it will program the
above mentioned mirroring and dmac lookup P4 rules to take precedence
over the devmem defined default behavior.

Signed-off-by: Velayutham, Arunkumar <[email protected]>

* Handle both primiary and secondary network traffic on FXP phy port0

Redhat wanted to use single physical port to handle both their primary
and secondary network traffic.
1) handle ARP/Broadcast packets using FXP mirroring to primary interface
   VSI(D5) while the original packets are sent to P0's VSI(D4).
2) Unicast packets are selectively forwarded to the primary network
   interface based on DMAC lookup.

NOTE: Default behavior will be defined using devmem to reroute all the
phy0 traffic to D5's VSI. Once the VSP comes in, it will program the
above mentioned mirroring and dmac lookup P4 rules to take precedence
over the devmem defined default behavior.

Signed-off-by: Velayutham, Arunkumar <[email protected]>

* Handle both primiary and secondary network traffic on FXP phy port0

Redhat wanted to use single physical port to handle both their primary
and secondary network traffic.
1) handle ARP/Broadcast packets using FXP mirroring to primary interface
   VSI(D5) while the original packets are sent to P0's VSI(D4).
2) Unicast packets are selectively forwarded to the primary network
   interface based on DMAC lookup.

NOTE: Default behavior will be defined using devmem to reroute all the
phy0 traffic to D5's VSI. Once the VSP comes in, it will program the
above mentioned mirroring and dmac lookup P4 rules to take precedence
over the devmem defined default behavior.

Signed-off-by: Velayutham, Arunkumar <[email protected]>

---------

Signed-off-by: Velayutham, Arunkumar <[email protected]>
  • Loading branch information
arunvelayutham authored Feb 14, 2025
1 parent bc3f554 commit f24ea21
Show file tree
Hide file tree
Showing 10 changed files with 3,199 additions and 1,725 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,12 @@ tables {
annotations: "@defaultonly"
scope: DEFAULT_ONLY
}
const_default_action_id: 21790705
action_refs {
id: 21257015
annotations: "@defaultonly"
scope: DEFAULT_ONLY
}
const_default_action_id: 21257015
size: 1024
}
tables {
Expand Down Expand Up @@ -948,7 +953,6 @@ tables {
action_refs {
id: 29238102
}
const_default_action_id: 29238102
size: 1024
}
tables {
Expand Down Expand Up @@ -1128,6 +1132,24 @@ tables {
const_default_action_id: 33275382
size: 1024
}
tables {
preamble {
id: 40941464
name: "linux_networking_control.mir_prof"
alias: "mir_prof"
annotations: "@intel_lut_type(\"mirror_profile\")"
}
match_fields {
id: 1
name: "mirror_prof_key"
bitwidth: 8
match_type: EXACT
}
action_refs {
id: 19137704
}
size: 256
}
tables {
preamble {
id: 38721082
Expand All @@ -1146,6 +1168,9 @@ tables {
bitwidth: 16
match_type: EXACT
}
action_refs {
id: 20004960
}
action_refs {
id: 26092385
}
Expand Down Expand Up @@ -2540,6 +2565,29 @@ actions {
alias: "fwd_to_cp"
}
}
actions {
preamble {
id: 20004960
name: "linux_networking_control.mirror_and_send"
alias: "mirror_and_send"
}
params {
id: 1
name: "port"
bitwidth: 32
type_name {
name: "PortId_t"
}
}
params {
id: 2
name: "mirror_session_id"
bitwidth: 16
type_name {
name: "MirrorSessionId_t"
}
}
}
actions {
preamble {
id: 26423957
Expand Down Expand Up @@ -2737,6 +2785,243 @@ actions {
bitwidth: 32
}
}
actions {
preamble {
id: 19137704
name: "linux_networking_control.mir_prof_action"
alias: "mir_prof_action"
}
params {
id: 1
name: "hash_val"
bitwidth: 64
}
params {
id: 2
name: "hash_mask"
bitwidth: 64
}
params {
id: 3
name: "port_dest_type"
bitwidth: 32
}
params {
id: 4
name: "vport_id"
bitwidth: 32
}
params {
id: 5
name: "mode"
bitwidth: 1
}
params {
id: 6
name: "op"
bitwidth: 32
}
params {
id: 7
name: "exp"
bitwidth: 32
}
params {
id: 8
name: "mod_addr"
bitwidth: 32
}
params {
id: 9
name: "mod_profile"
bitwidth: 24
}
params {
id: 10
name: "dest_id"
bitwidth: 16
}
params {
id: 11
name: "trunc_size"
bitwidth: 16
}
params {
id: 12
name: "mod_content_size"
bitwidth: 16
}
params {
id: 13
name: "dst_q"
bitwidth: 16
}
params {
id: 14
name: "defer_drop_en"
bitwidth: 1
}
params {
id: 15
name: "trunc_mode_en"
bitwidth: 1
}
params {
id: 16
name: "recirculate"
bitwidth: 1
}
params {
id: 17
name: "store_port"
bitwidth: 1
}
params {
id: 18
name: "func_valid"
bitwidth: 1
}
params {
id: 19
name: "store_vsi"
bitwidth: 1
}
params {
id: 20
name: "drop_en"
bitwidth: 1
}
params {
id: 21
name: "trunc"
bitwidth: 1
}
params {
id: 22
name: "mod_profile_valid"
bitwidth: 1
}
params {
id: 23
name: "mod_content_size_en"
bitwidth: 1
}
params {
id: 24
name: "mod_ptype_tras_index"
bitwidth: 8
}
params {
id: 25
name: "mod_common_en"
bitwidth: 1
}
params {
id: 26
name: "mod_append_action_bus_en"
bitwidth: 1
}
params {
id: 27
name: "is_md_gen0"
bitwidth: 1
}
params {
id: 28
name: "is_md_gen1"
bitwidth: 1
}
params {
id: 29
name: "is_md_local"
bitwidth: 1
}
params {
id: 30
name: "is_md_remote"
bitwidth: 1
}
params {
id: 31
name: "md_gen0_type"
bitwidth: 8
}
params {
id: 32
name: "md_gen0_off"
bitwidth: 8
}
params {
id: 33
name: "md_gen0_val"
bitwidth: 16
}
params {
id: 34
name: "md_gen0_mask"
bitwidth: 16
}
params {
id: 35
name: "md_gen1_type"
bitwidth: 8
}
params {
id: 36
name: "md_gen1_off"
bitwidth: 8
}
params {
id: 37
name: "md_gen1_val"
bitwidth: 16
}
params {
id: 38
name: "md_gen1_mask"
bitwidth: 16
}
params {
id: 39
name: "md_local_type"
bitwidth: 8
}
params {
id: 40
name: "md_local_off"
bitwidth: 8
}
params {
id: 41
name: "md_local_val"
bitwidth: 8
}
params {
id: 42
name: "md_local_mask"
bitwidth: 8
}
params {
id: 43
name: "md_remote_type"
bitwidth: 8
}
params {
id: 44
name: "md_remote_off"
bitwidth: 8
}
params {
id: 45
name: "md_remote_val"
bitwidth: 8
}
params {
id: 46
name: "md_remote_mask"
bitwidth: 8
}
}
direct_counters {
preamble {
id: 333810446
Expand Down Expand Up @@ -2778,6 +3063,15 @@ direct_counters {
}
}
type_info {
new_types {
key: "MirrorSessionId_t"
value {
translated_type {
uri: "p4.org/pna/v1/MirrorSessionId_t"
sdn_bitwidth: 16
}
}
}
new_types {
key: "PortId_t"
value {
Expand Down
Binary file not shown.
Loading

0 comments on commit f24ea21

Please sign in to comment.