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

Feat(eos_cli_config_gen): Add support for Receive Side Scaling (RSS) interface profile #4954

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

ashenoy-arista
Copy link
Contributor

@ashenoy-arista ashenoy-arista commented Jan 31, 2025

Add eos_cli_config_gen schema support for Receive Side Scaling (RSS) interface profile

Change Summary

Receive Side Scaling (RSS) interface profile schema to be later supported with jinja templates for generating EOS cli

Related Issue(s)

Fixes #4983

Component(s) name

arista.avd.eos_cli_config_gen

Proposed changes

Modeling the Receive Side Scaling (RSS) interface profile schema for eos_cli_config_gen
The associated CLI is supported on select hardware platforms namely -
CouncilBluffs platform - models AWE-5310 , AWE-7230R
Independence platform - models AWE-5510, AWE-7250R

There are two sets of CLI commands we need to target from schema perspective

  1. Configuring one or more RSS profiles
  2. Selecting one such profile for the system

Configure one or more RSS profiles

ind445(config)#
ind445(config)#platform sfe interface
ind445(config-platform-sfe-interface)#profile Test1
ind445(config-interface-profile-Test1)#interface Ethernet1/1
ind445(config-interface-profile-Test1-if-Et1/1)#rx-queue count 2
ind445(config-interface-profile-Test1-if-Et1/1)#rx-queue worker 3-4
ind445(config-interface-profile-Test1-if-Et1/1)#rx-queue mode shared
ind445(config-interface-profile-Test1-if-Et1/1)#exit
ind445(config-interface-profile-Test1)#interface Ethernet1/2
ind445(config-interface-profile-Test1-if-Et1/2)#rx-queue 1
% Invalid input
ind445(config-interface-profile-Test1-if-Et1/2)#rx-queue count 1
ind445(config-interface-profile-Test1-if-Et1/2)#rx-queue worker 5
ind445(config-interface-profile-Test1-if-Et1/2)#rx-queue mode exclusive
ind445(config-interface-profile-Test1-if-Et1/2)#exit
ind445(config-interface-profile-Test1)#interface ?
  Ethernet  Ethernet interface

ind445(config-interface-profile-Test1)#interface Ethernet1/1
ind445(config-interface-profile-Test1-if-Et1/1)#rx-queue ?
  count   Number of receive queues
  mode    Receive queues to worker affinity mode type
  worker  Assign receive queues to workers

ind445(config-interface-profile-Test1-if-Et1/1)#rx-queue count ?
  <1-16>  Number of receive queues

ind445(config-interface-profile-Test1-if-Et1/1)#rx-queue worker ?
  $       list end
  <0-15>  list of workers

ind445(config-interface-profile-Test1-if-Et1/1)#rx-queue worker 0-2,3,16
% Invalid input
ind445(config-interface-profile-Test1-if-Et1/1)#rx-queue worker 0-2,3,8
ind445(config-interface-profile-Test1-if-Et1/1)#rx-queue mode ?
  exclusive  workers will be exclusive
  shared     workers will be shared

ind445(config-interface-profile-Test1-if-Et1/1)#exit
ind445(config-interface-profile-Test1)#exit
ind445(config-platform-sfe-interface)#profile ?
  WORD  Interface profile name

Apply specific RSS profile for platform

ind445(config)#platform sfe interface
ind445(config-platform-sfe-interface)#?
  interface  Apply interface profile
  profile    Create interface profile
  ----------------------------------------
  comment    Up to 240 characters, comment for this mode
  default    Set a command to its defaults
  exit       Leave Interface configuration mode mode
  no         Disable the command that follows
  show       Display details of switch operation
  !!         Append to comment

ind445(config-platform-sfe-interface)#interface ?
  profile  profile

ind445(config-platform-sfe-interface)#interface profile ?
  WORD  Interface profile name

ind445(config-platform-sfe-interface)#interface profile Test1
ind445(config-platform-sfe-interface)#exit

Please save your config and **reload the system or restart Sfe agent for your changes to take effect.**
ind445(config)#

“show running-config” snippet



platform sfe interface
   interface profile amsProf1
   !
   profile amsProf1
      interface Ethernet1/1
         rx-queue count 5
         rx-queue worker 1-3,6,9
      !
      interface Ethernet1/10
         rx-queue count 2
      !
      interface Ethernet1/16
   !
   profile amsProf2
      interface Ethernet1/2
      !
      interface Ethernet1/5
         rx-queue count 3
         rx-queue worker 5
         rx-queue mode exclusive
      !
      interface Ethernet1/6
   !
   profile amsProf3
      interface Ethernet1/8
         rx-queue count 2
         rx-queue worker 3-4
   !
   profile amsProf4

How to test

Ensure the generated EOS cli for RSS interface profile can be pasted without any error on supported hardware platform model such as AWE-5310 or AWE-5510

Pasted generated EOS cli with interface RSS profiles on supported platform such as CouncilBlufff AWE-5310-F
and issued "show run" and "show platform sfe interface profile" to validate output.

Checklist

User Checklist

  • N/A

Repository Checklist

  • My code has been rebased from devel before I start
  • I have read the CONTRIBUTING document.
  • My change requires a change to the documentation and documentation have been updated accordingly.
  • I have updated molecule CI testing accordingly. (check the box if not applicable)

Copy link

Review docs on Read the Docs

To test this pull request:

# Create virtual environment for this testing below the current directory
python -m venv test-avd-pr-4954
# Activate the virtual environment
source test-avd-pr-4954/bin/activate
# Install all requirements including PyAVD
pip install "pyavd[ansible] @ git+https://github.com/ashenoy-arista/avd.git@rssProfileSupport#subdirectory=python-avd" --force
# Point Ansible collections path to the Python virtual environment
export ANSIBLE_COLLECTIONS_PATH=$VIRTUAL_ENV/ansible_collections
# Install Ansible collection
ansible-galaxy collection install git+https://github.com/ashenoy-arista/avd.git#/ansible_collections/arista/avd/,rssProfileSupport --force
# Optional: Install AVD examples
cd test-avd-pr-4954
ansible-playbook arista.avd.install_examples

@ashenoy-arista ashenoy-arista force-pushed the rssProfileSupport branch 2 times, most recently from e1e2b86 to 6b702e4 Compare February 5, 2025 19:18
@github-actions github-actions bot added the state: CI Updated CI scenario have been updated in the PR label Feb 5, 2025
@ashenoy-arista
Copy link
Contributor Author

ashenoy-arista commented Feb 5, 2025

Currently unable to see newly added schema for eos_cli_config_gen under PR documentation link
https://ansible-avd--4954.org.readthedocs.build/en/4954/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/input-variables.html
Checking further how to resolve this.

Update: Resolved this issue after moving newly defined schema attributes under existing schema fragment file platform.schema.yml for eos_cli_config_gen

@ashenoy-arista ashenoy-arista marked this pull request as ready for review February 5, 2025 20:55
@ashenoy-arista ashenoy-arista requested review from a team as code owners February 5, 2025 20:55
Copy link

sonarqubecloud bot commented Feb 6, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
role: eos_cli_config_gen issue related to eos_cli_config_gen role state: CI Updated CI scenario have been updated in the PR state: Documentation role Updated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support configuration of Receive Side Scaling (RSS) interface profiles for select SFE based platforms
2 participants