Skip to content

Conversation

@vikram-nexthop
Copy link

What I did

Fix for #1667

How I did it

Modified MACsec interface creation logic to use a two-step approach:

  1. Always create the MACsec interface with explicit SCI specification (default send_sci=on)
  2. When send_sci=false is required, add a second command to switch the interface to send_sci=off mode.

How to verify it

  1. Run MACsec tests with profile parameted send_sci set to false.
  2. Verify interface creation commands in syslog:
2025 Oct 15 16:26:50.911039 VM01T3 NOTICE syncd#syncd: :- create_macsec_egress_sc: /sbin/ip link add link "eth1" name "macsec_eth1" type macsec  sci 226b54b065000001 encrypt  on  cipher GCM-AES-128 && ip link set link "eth1" name "macsec_eth1" type macsec  send_sci off && ip link set dev "macsec_eth1" up
  1. Check that TX SCI and send_sci are correctly set using command 'ip macsec show'
admin@VM01T3:~$ ip macsec show
83: macsec_eth1: protect on validate strict sc off sa off encrypt on send_sci off end_station off scb off replay off 
    cipher suite: GCM-AES-256, using ICV length 16
    TXSC: 226b54b065000001 on SA 0
        0: PN 1534, state on, key 8912df4fd8ea3f1547e02a4410f89996
    RXSC: 5c0758de98020001, state on
        0: PN 1597, state on, key 8912df4fd8ea3f1547e02a4410f89996
    offload: off 

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vikram-nexthop vikram-nexthop changed the title [vslib] MACsec interface creation commands fails on VM/VS with send_sci=false and SCI combination. [vslib] MACsec interface creation command fails on VM/VS with send_sci=false and SCI combination. Oct 17, 2025
@vikram-nexthop vikram-nexthop marked this pull request as ready for review October 20, 2025 15:08
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants