Skip to content

SuppressARP per VNI - #554

Open
adamtrizuljak-sap wants to merge 2 commits into
mainfrom
feat/nve-suppress-arp-per-vni
Open

adamtrizuljak-sap wants to merge 2 commits into
mainfrom
feat/nve-suppress-arp-per-vni

Conversation

@adamtrizuljak-sap

@adamtrizuljak-sap adamtrizuljak-sap commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Summary

The NVE-level suppressARP is a device-wide default for all VNIs. There was no way to override ARP suppression individually per VNI — either to explicitly enable it for a specific VNI while leaving others to inherit the default, or to disable it for a VNI while the global default has it enabled.

This PR adds an optional suppressARP field to EVPNInstanceSpec. When set, it overrides the NVE-level setting for that VNI's gNMI path. When unset (nil), the NVE-level default remains in effect.

API change (api/core/v1alpha1/evpninstance_types.go):

spec:
  suppressARP: true   # or false; omit to inherit NVE-level default

Provider mapping (internal/provider/cisco/nxos/):

The NX-OS DME API represents this field as a string on Nw-list, not a boolean. The provider maps:

spec.suppressARP gNMI value
nil (unset) "off" — inherit NVE-level setting
true "enabled"
false "disabled"

VNI.SuppressARP is therefore a plain string field, avoiding any bool↔string unmarshal mismatch when reading device state back for idempotency checks.

Changes

  • api/core/v1alpha1/evpninstance_types.go — adds SuppressARP *bool to EVPNInstanceSpec
  • api/core/v1alpha1/zz_generated.deepcopy.go — regenerated deep-copy
  • config/crd/bases/, charts/.../crd/ — regenerated CRD manifests
  • docs/api-reference/index.md — updated API reference table
  • internal/provider/cisco/nxos/nve.go — adds VNI.SuppressARP string and string constants
  • internal/provider/cisco/nxos/provider.go — maps *bool → string constant in EnsureEVPNInstance
  • internal/provider/cisco/nxos/testdata/ — updates marshal testdata to include suppressARP in all VNI payloads
    - test/gnmi/testdata/cisco-nxos-gnmi/evpninstance.txtar — updates expected gNMI state to include "suppressARP": "off"

Tests

Updated testdata/vni.json to include "suppressARP": "DME_UNSET_PROPERTY_MARKER" (reflecting the new zero-value serialization of Option[bool])
Added golden files and fixtures for explicit true and false cases (vni_suppress_arp_true, vni_suppress_arp_false)

Simulated device

Tested against a simulated Cisco N9K-C9300v in Clabernets. Results of reading the path using gnmic -a 127.0.0.1 --port 9339 -u *** -p *** --skip-verify get -e json --values-only --path 'System/eps-items/epId-items/Ep-list[epId=1]/nws-items/vni-items/Nw-list[vni=100010]/suppressARP'

spec.suppressARP gNMI value
unset ["off"]
true ["enabled"]
false ["disabled"]

YANG

Reference https://github.com/YangModels/yang/blob/main/vendor/cisco/nx/10.6-3/Cisco-NX-OS-device.yang

Path: System/eps-items/epId-items/Ep-list[epId=1]/nws-items/vni-items/Nw-list[vni={vni}]/suppressARP

Allowed values of suppressARP:

typedef nvo_SuppressARPT {
    type enumeration {
        enum off {
            value 0;
            description "Arp suppression not configured";
        }
        enum enabled {
            value 1;
            description "Arp suppression enabled";
        }
        enum disabled {
            value 2;
            description "Arp suppression disabled";
        }
    }
    default "off";
}

@github-actions github-actions Bot added the size/M label Sep 9, 2026
@adamtrizuljak-sap
adamtrizuljak-sap force-pushed the feat/nve-suppress-arp-per-vni branch from b553bbf to c72cb2d Compare September 9, 2026 11:13
@adamtrizuljak-sap
adamtrizuljak-sap marked this pull request as draft September 9, 2026 11:19
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

Merging this branch will decrease overall coverage

Impacted Packages Coverage Δ 🤖
github.com/ironcore-dev/network-operator/api/core/v1alpha1 2.51% (-0.00%) 👎
github.com/ironcore-dev/network-operator/internal/provider/cisco/nxos 9.45% (-0.01%) 👎

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/ironcore-dev/network-operator/api/core/v1alpha1/evpninstance_types.go 12.50% (ø) 8 1 7
github.com/ironcore-dev/network-operator/api/core/v1alpha1/zz_generated.deepcopy.go 0.00% (ø) 2697 (+4) 0 2697 (+4)
github.com/ironcore-dev/network-operator/internal/provider/cisco/nxos/nve.go 72.73% (ø) 11 8 3
github.com/ironcore-dev/network-operator/internal/provider/cisco/nxos/option.go 46.67% (ø) 15 7 8
github.com/ironcore-dev/network-operator/internal/provider/cisco/nxos/provider.go 0.35% (-0.00%) 2289 (+3) 8 2281 (+3) 👎

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/ironcore-dev/network-operator/internal/provider/cisco/nxos/nve_test.go

@hardikdr hardikdr added the area/switch-automation Automation processes for network switch management and operations. label Sep 10, 2026
@hardikdr hardikdr added this to Roadmap Sep 10, 2026
@adamtrizuljak-sap
adamtrizuljak-sap marked this pull request as ready for review September 10, 2026 08:35
@adamtrizuljak-sap
adamtrizuljak-sap marked this pull request as draft September 10, 2026 12:30
This enables us to set the SuppressARP field individually per VNI.
VNI.SuppressARP is of type Option[bool]. When nil (zero), the Option marshals to "DME_UNSET_PROPERTY_MARKER", which instructs the device to clear the per-VNI setting and let the global NVE.SuppressARP take precedence.

Signed-off-by: Adam Trizuljak <adam.trizuljak@sap.com>
The actual allowed values are strings `off`, `enabled`, `disabled`
Value `off` means unset, no need to use the special `DME_UNSET_PROPERTY_MARKER` value
See nvo_SuppressARPT definition in https://github.com/YangModels/yang/blob/main/vendor/cisco/nx/10.6-3/Cisco-NX-OS-device.yang

Signed-off-by: Adam Trizuljak <adam.trizuljak@sap.com>
@adamtrizuljak-sap
adamtrizuljak-sap force-pushed the feat/nve-suppress-arp-per-vni branch from 0254903 to 2231f29 Compare September 16, 2026 13:44
@adamtrizuljak-sap
adamtrizuljak-sap marked this pull request as ready for review September 16, 2026 14:07
Comment on lines +67 to +77
const (
suppressARPOff = "off"
suppressARPEnabled = "enabled"
suppressARPDisabled = "disabled"
)

type VNI struct {
AssociateVrfFlag bool `json:"associateVrfFlag"`
McastGroup Option[string] `json:"mcastGroup"`
Vni int32 `json:"vni"`
SuppressARP string `json:"suppressARP"`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const (
suppressARPOff = "off"
suppressARPEnabled = "enabled"
suppressARPDisabled = "disabled"
)
type VNI struct {
AssociateVrfFlag bool `json:"associateVrfFlag"`
McastGroup Option[string] `json:"mcastGroup"`
Vni int32 `json:"vni"`
SuppressARP string `json:"suppressARP"`
type SuppressARP string
const (
SuppressARPOff SuppressARP = "off"
SuppressARPEnabled SuppressARP = "enabled"
SuppressARPDisabled SuppressARP = "disabled"
)
type VNI struct {
AssociateVrfFlag bool `json:"associateVrfFlag"`
McastGroup Option[string] `json:"mcastGroup"`
Vni int32 `json:"vni"`
SuppressARP SuppressARP `json:"suppressARP"`

could we make this a real string enumeration?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I don't think we need a variant for each of the different values for each fiel. The internal/provider/cisco/nxos/testdata/vni.json would already be sufficient in my view to showcase that we set this payload. Exact string values are easily checkable from the code itself.

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

Labels

area/switch-automation Automation processes for network switch management and operations. size/M

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants