Skip to content

Commit

Permalink
Feat(eos_cli_config_gen): Add support for Receive Side Scaling (RSS) …
Browse files Browse the repository at this point in the history
…interface profile
  • Loading branch information
ashenoy-arista committed Feb 10, 2025
1 parent 6d2c93c commit a675cd3
Show file tree
Hide file tree
Showing 11 changed files with 589 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10701,6 +10701,91 @@ ipv6 address virtual source-nat vrf TEST_04 address 2001:db8:85a3::8a2e:370:7335
| -------- | ----- |
| Maximum CPU Allocation | 42 |

##### Platform Software Forwarding Engine Interface Summary

###### RSS Profile to apply

####### TestProfile1

###### RSS Profiles

####### TestProfile1

######## Ethernet1/1

| Settings | Value |
| -------- | ----- |
| Rx-Queue Count | 4 |
| Rx-Queue Worker | 0-2,5 |

######## Ethernet1/2

| Settings | Value |
| -------- | ----- |
| Rx-Queue Count | 2 |
| Rx-Queue Mode | shared |

######## Ethernet1/4

| Settings | Value |
| -------- | ----- |
| Rx-Queue Count | 1 |

######## Ethernet1/5

| Settings | Value |
| -------- | ----- |
| Rx-Queue Count | 2 |
| Rx-Queue Worker | 3,4 |
| Rx-Queue Mode | exclusive |

####### TestProfile2

######## Ethernet1

| Settings | Value |
| -------- | ----- |
| Rx-Queue Count | 3 |
| Rx-Queue Worker | 2 |

######## Ethernet9

####### TestProfile3

##### Platform Software Forwarding Engine Interface Device Configuration

```eos
!
platform sfe interface
interface profile TestProfile1
!
profile TestProfile1
interface Ethernet1/1
rx-queue count 4
rx-queue worker 0-2,5
!
interface Ethernet1/2
rx-queue count 2
rx-queue mode shared
!
interface Ethernet1/4
rx-queue count 1
!
interface Ethernet1/5
rx-queue count 2
rx-queue worker 3,4
rx-queue mode exclusive
!
profile TestProfile2
interface Ethernet1
rx-queue count 3
rx-queue worker 2
!
interface Ethernet9
!
profile TestProfile3
```

### Platform Device Configuration

```eos
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,35 @@ logging event congestion-drops interval 10
!
load-interval default 25
!
platform sfe interface
interface profile TestProfile1
!
profile TestProfile1
interface Ethernet1/1
rx-queue count 4
rx-queue worker 0-2,5
!
interface Ethernet1/2
rx-queue count 2
rx-queue mode shared
!
interface Ethernet1/4
rx-queue count 1
!
interface Ethernet1/5
rx-queue count 2
rx-queue worker 3,4
rx-queue mode exclusive
!
profile TestProfile2
interface Ethernet1
rx-queue count 3
rx-queue worker 2
!
interface Ethernet9
!
profile TestProfile3
!
interface defaults
mtu 9000
ethernet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,32 @@ platform:
mdb_profile: "l3-xxl"
sfe:
data_plane_cpu_allocation_max: 42
interface:
profiles:
- name: TestProfile1
interfaces:
- name: Ethernet1/1
rx_queue:
count: 4
worker: "0-2,5"
- name: Ethernet1/5
rx_queue:
count: 2
worker: "3,4"
mode: exclusive
- name: Ethernet1/2
rx_queue:
count: 2
mode: shared
- name: Ethernet1/4
rx_queue:
count: 1
- name: TestProfile2
interfaces:
- name: Ethernet1
rx_queue:
count: 3
worker: "2"
- name: Ethernet9
- name: TestProfile3
interface_profile: TestProfile1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{#
Copyright (c) 2023-2025 Arista Networks, Inc.
Use of this source code is governed by the Apache License 2.0
that can be found in the LICENSE file.
#}
{# doc - platform sfe interface #}
{% if platform.sfe.interface is arista.avd.defined %}

##### Platform Software Forwarding Engine Interface Summary

{% if platform.sfe.interface.interface_profile is arista.avd.defined %}
###### RSS Profile to apply

####### {{ platform.sfe.interface.interface_profile }}
{% endif %}

{% if platform.sfe.interface.profiles is arista.avd.defined %}
###### RSS Profiles
{% for profile_data in platform.sfe.interface.profiles | arista.avd.natural_sort('name') %}

####### {{ profile_data.name }}
{% for interface_data in profile_data.interfaces | arista.avd.natural_sort('name') %}

######## {{ interface_data.name }}
{% if interface_data.rx_queue is arista.avd.defined %}

| Settings | Value |
| -------- | ----- |
{% if interface_data.rx_queue.count is arista.avd.defined %}
| Rx-Queue Count | {{ interface_data.rx_queue.count }} |
{% endif %}
{% if interface_data.rx_queue.worker is arista.avd.defined %}
| Rx-Queue Worker | {{ interface_data.rx_queue.worker }} |
{% endif %}
{% if interface_data.rx_queue.mode is arista.avd.defined %}
| Rx-Queue Mode | {{ interface_data.rx_queue.mode }} |
{% endif %}
{% endif %}
{% endfor %}
{% endfor %}
{% endif %}

##### Platform Software Forwarding Engine Interface Device Configuration

```eos
{% include 'eos/platform-sfe-interface.j2' %}
```
{% endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@
{% if platform.sfe.data_plane_cpu_allocation_max is arista.avd.defined %}
| Maximum CPU Allocation | {{ platform.sfe.data_plane_cpu_allocation_max }} |
{% endif %}
{## Platform Sfe Interface #}
{% include 'documentation/platform-sfe-interface.j2' %}
{% endif %}
{% endif %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@
{% include 'eos/load-interval.j2' %}
{# transceiver qsfp default mode #}
{% include 'eos/transceiver-qsfp-default-mode.j2' %}
{# platform sfe interface #}
{% include 'eos/platform-sfe-interface.j2' %}
{# interface defaults #}
{% include 'eos/interface-defaults.j2' %}
{# service routing protocols model #}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{#
Copyright (c) 2023-2025 Arista Networks, Inc.
Use of this source code is governed by the Apache License 2.0
that can be found in the LICENSE file.
#}
{# eos - platform sfe interface #}
{% if platform.sfe.interface is arista.avd.defined %}
!
platform sfe interface
{# interface profile to apply #}
{% if platform.sfe.interface.interface_profile is arista.avd.defined %}
interface profile {{ platform.sfe.interface.interface_profile }}
{% endif %}
{% for profile_data in platform.sfe.interface.profiles | arista.avd.natural_sort('name') %}
{# profiles available #}
!
profile {{ profile_data.name }}
{% for interface_data in profile_data.interfaces | arista.avd.natural_sort('name') %}
interface {{ interface_data.name }}
{% if interface_data.rx_queue.count is arista.avd.defined %}
rx-queue count {{ interface_data.rx_queue.count }}
{% endif %}
{% if interface_data.rx_queue.worker is arista.avd.defined %}
rx-queue worker {{ interface_data.rx_queue.worker }}
{% endif %}
{% if interface_data.rx_queue.mode is arista.avd.defined %}
rx-queue mode {{ interface_data.rx_queue.mode }}
{% endif %}
{% if not loop.last %}
!
{% endif %}
{% endfor %}
{% endfor %}
{% endif %}
Loading

0 comments on commit a675cd3

Please sign in to comment.