Skip to content

Commit

Permalink
Add OTG MACsec model
Browse files Browse the repository at this point in the history
  • Loading branch information
sasubrata committed Dec 20, 2024
1 parent 4b20750 commit 8af52f3
Show file tree
Hide file tree
Showing 7 changed files with 101 additions and 94 deletions.
5 changes: 5 additions & 0 deletions device/device.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ components:
Configuration for OSPFv2 router.
$ref: './ospfv2/router.yaml#/components/schemas/Device.Ospfv2Router'
x-field-uid: 10
macsec:
description: >-
Configuration of MACsec interfaces.
$ref: './macsec/macsec.yaml#/components/schemas/Device.Macsec'
x-field-uid: 11
required: [name]
Protocol.Options:
description: >-
Expand Down
1 change: 0 additions & 1 deletion device/macsec/advance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ components:
description: >-
A container of advance properties for a MACsec interface.
type: object
required: []
properties:
rekey_mode:
description: |-
Expand Down
25 changes: 12 additions & 13 deletions device/macsec/basic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ components:
description: >-
A container of basic properties for a MACsec interface.
type: object
required: [ethernet_interfaces]
properties:
key_generation:
$ref: '#/components/schemas/Macsec.KeyGeneration'
$ref: '#/components/schemas/Macsec.Basic.KeyGeneration'
x-field-uid: 1
Macsec.KeyGeneration:
Macsec.Basic.KeyGeneration:
description: >-
Key Generation.
type: object
Expand All @@ -26,12 +25,12 @@ components:
static:
x-field-uid: 2
mka:
$ref: '#/components/schemas/Macsec.Mka'
$ref: '#/components/schemas/Macsec.Basic.KeyGeneration.Mka'
x-field-uid: 2
static:
$ref: '#/components/schemas/Macsec.Static'
$ref: '#/components/schemas/Macsec.Basic.KeyGeneration.Static'
x-field-uid: 3
Macsec.Mka:
Macsec.Basic.KeyGeneration.Mka:
description: >-
The container for MKA settings.
type: object
Expand All @@ -41,7 +40,7 @@ components:
The unique name of the MKA instance controlling MACsec.
type: string
x-field-uid: 1
Macsec.Static:
Macsec.Basic.KeyGeneration.Static:
description: >-
The container for static key settings.
type: object
Expand All @@ -61,10 +60,10 @@ components:
x-field-uid: 3
gcm-aes-xpn-256:
x-field-uid: 4
confidentialty_offset: integer
confidentialty_offset:
description: |-
Confidentiality offset. Choose from 0 30 50.
type: string
Confidentiality offset.
type: integer
default: 0
x-field-uid: 2
x-enum:
Expand All @@ -79,16 +78,16 @@ components:
Tx SAK pool.
type: array
items:
$ref: '#/components/schemas/Macsec.Sak'
$ref: '#/components/schemas/Macsec.Basic.KeyGeneration.Static.Sak'
x-field-uid: 3
rx_sak_pool:
description: |-
Rx SAK pool.
type: array
items:
$ref: '#/components/schemas/Macsec.Sak'
$ref: '#/components/schemas/Macsec.Basic.KeyGeneration.Static.Sak'
x-field-uid: 4
Macsec.Sak:
Macsec.Basic.KeyGeneration.Static.Sak:
description: >-
The container for SAK.
type: object
Expand Down
56 changes: 28 additions & 28 deletions device/macsec/cryptoengine.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ components:
description: >-
A container of crypto engine properties for a MACsec interface.
type: object
required: [ethernet_interfaces]
properties:
engine_type:
$ref: '#/components/schemas/Macsec.EngineType'
$ref: '#/components/schemas/Macsec.CryptoEngine.Type'
x-field-uid: 1
Macsec.EngineType:
Macsec.CryptoEngine.Type:
description: >-
Crypto engine type.
type: object
Expand All @@ -26,34 +25,34 @@ components:
stateful_encryption_decryption:
x-field-uid: 2
stateless_encryption_only:
$ref: '#/components/schemas/Macsec.StatelessEncryptionOnly'
$ref: '#/components/schemas/Macsec.CryptoEngine.Type.StatelessEncryptionOnly'
x-field-uid: 2
stateful_encryption_decryption:
$ref: '#/components/schemas/Macsec.StatefulEncryptionDecryption'
$ref: '#/components/schemas/Macsec.CryptoEngine.Type.StatefulEncryptionDecryption'
x-field-uid: 3
Macsec.StatelessEncryptionOnly:
Macsec.CryptoEngine.Type.StatelessEncryptionOnly:
description: >-
The container for stateless encryption only engine settings.
type: object
properties:
tx_pn:
$ref: '#/components/schemas/Macsec.EncryptionOnlyTxPn'
$ref: '#/components/schemas/Macsec.CryptoEngine.Type.StatelessEncryptionOnly.TxPn'
x-field-uid: 1
traffic:
$ref: '#/components/schemas/Macsec.EncryptionOnlyTraffic'
$ref: '#/components/schemas/Macsec.CryptoEngine.Type.StatelessEncryptionOnly.Traffic'
x-field-uid: 2
Macsec.StatefulEncryptionDecryption:
Macsec.CryptoEngine.Type.StatefulEncryptionDecryption:
description: >-
The container for stateful encryption and decryption engine settings.
type: object
properties:
initial_pn:
$ref: '#/components/schemas/Macsec.InitialPn'
$ref: '#/components/schemas/Macsec.CryptoEngine.Type.StatefulEncryptionDecryption.InitialPn'
x-field-uid: 1
traffic:
$ref: '#/components/schemas/Macsec.HardwareAcceleration'
$ref: '#/components/schemas/Macsec.CryptoEngine.Type.StatefulEncryptionDecryption.HardwareAcceleration'
x-field-uid: 2
Macsec.EncryptionOnlyTxPn:
Macsec.CryptoEngine.Type.StatelessEncryptionOnly.TxPn:
description: |-
Tx PN settings.
choice:
Expand All @@ -68,12 +67,12 @@ components:
incrementing_pn:
x-field-uid: 2
fixed:
$ref: '#/components/schemas/Macsec.FixedPn'
$ref: '#/components/schemas/Macsec.CryptoEngine.Type.StatelessEncryptionOnly.FixedPn'
x-field-uid: 2
incrementing:
$ref: '#/components/schemas/Macsec.IncrementingPn'
$ref: '#/components/schemas/Macsec.CryptoEngine.Type.StatelessEncryptionOnly.IncrementingPn'
x-field-uid: 3
Macsec.FixedPn:
Macsec.CryptoEngine.Type.StatelessEncryptionOnly.FixedPn:
description: >-
Fixed PN settings.
type: object
Expand All @@ -82,26 +81,26 @@ components:
description: |-
Fixed Tx PN.
type: integer
default: 6
default: 6
x-field-uid: 1
Macsec.IncrementingPn:
Macsec.CryptoEngine.Type.StatelessEncryptionOnly.IncrementingPn:
description: >-
Incrementing PN settings.
type: object
properties:
count: integer
count:
description: |-
Count of packet numbers in series.
type: integer
default: 100
x-field-uid: 1
first: integer
first:
description: |-
Frst PN.
First PN.
type: integer
default: 10000
x-field-uid: 2
Macsec.EncryptionOnlyTraffic:
Macsec.CryptoEngine.Type.StatelessEncryptionOnly.Traffic:
description: >-
Encryption only traffic settings.
type: object
Expand All @@ -112,7 +111,7 @@ components:
type: boolean
default: true
x-field-uid: 1
Macsec.InitialPn:
Macsec.CryptoEngine.Type.StatefulEncryptionDecryption.InitialPn:
description: >-
Initial PN settings.
type: object
Expand All @@ -121,9 +120,9 @@ components:
description: |-
Initial Tx PN.
type: integer
default: 1
default: 1
x-field-uid: 1
Macsec.HardwareAcceleration:
Macsec.CryptoEngine.Type.StatefulEncryptionDecryption.HardwareAcceleration:
description: >-
Hardware acceleration settings.
type: object
Expand All @@ -143,13 +142,13 @@ components:
$ref: '#/components/schemas/Macsec.ChoiceNone'
x-field-uid: 2
inline_crypto:
$ref: '#/components/schemas/Macsec.InlineCrypto'
$ref: '#/components/schemas/Macsec.CryptoEngine.Type.StatefulEncryptionDecryption.HardwareAcceleration.InlineCrypto'
x-field-uid: 3
Macsec.ChoiceNone:
description: >-
A empty container that is used to indicate a null choice.
type: object
Macsec.InlineCrypto:
Macsec.CryptoEngine.Type.StatefulEncryptionDecryption.HardwareAcceleration.InlineCrypto:
description: >-
Inline cryto engine settings.
type: object
Expand All @@ -171,7 +170,7 @@ components:
group_ca_single_dut:
x-field-uid: 2
group_ca_multipe_duts:
x-field-uid: 2
x-field-uid: 3
max_ca_count:
description: |-
Maximum CA count.
Expand All @@ -190,10 +189,11 @@ components:
type: integer
default: 256
x-field-uid: 5
rx_sc_identifying_field: Default:
rx_sc_identifying_field:
description: |-
Rx SC identifying_field.
type: string
default: source_mac
x-field-uid: 6
x-enum:
source_mac:
Expand Down
4 changes: 2 additions & 2 deletions device/macsec/macsec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ components:
description: >-
Configuration for single MACsec interface.
type: object
required: [eth_name, name, basic, Tx, Rx, crypto_engine]
required: [eth_name, name, basic, tx, rx, crypto_engine]
properties:
eth_name:
description: >-
Expand Down Expand Up @@ -53,5 +53,5 @@ components:
advance:
description: >-
This contains advance properties of MACsec.
$ref: './advance.yaml#/components/schemas/Macsec.advance'
$ref: './advance.yaml#/components/schemas/Macsec.Advance'
x-field-uid: 7
36 changes: 19 additions & 17 deletions device/macsec/rx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,34 @@ components:
type: object
properties:
static_key:
$ref: '#/components/schemas/Macsec.Rx.StaticKey'
x-field-uid: 1
Macsec.Rx.StaticKey:
description: |-
Static key Rx settings.
type: object
properties:
dut_system_id:
description: |-
Rx settings for static key.
type: object
DUT system ID.
type: string
format: mac
x-field-uid: 1
properties:
dut_system_id:
description: |-
DUT system ID.
type: string
format: mac
x-field-uid: 1
dut_sci_port_id:
description: |-
DUT SCI Port ID.
type: integer
default: 1
x-field-uid: 2
dut_sci_port_id:
description: |-
DUT SCI Port ID.
type: integer
default: 1
x-field-uid: 2
replay_protection:
description: |-
Enable replay protection on not.
type: boolean
default: false
x-field-uid: 2
x-field-uid: 3
replay_window:
description: |-
Replay window size.
type: integer
default: 1
x-field-uid: 3
x-field-uid: 4
Loading

0 comments on commit 8af52f3

Please sign in to comment.