Skip to content

VLAN filtering on VIF#7123

Open
semarie wants to merge 2 commits into
xapi-project:masterfrom
xcp-ng:dev/srt/master/vlan-filtering
Open

VLAN filtering on VIF#7123
semarie wants to merge 2 commits into
xapi-project:masterfrom
xcp-ng:dev/srt/master/vlan-filtering

Conversation

@semarie

@semarie semarie commented Jun 10, 2026

Copy link
Copy Markdown
Contributor
  • update idl/datamodel to add trunks property on VIF
  • add validation constraints (trunks filtering on access port isn't valid)
  • add support inside vif-real for initial configuration
  • add support inside xenopsd for dynamic changes
  • add test coverage to new attributes

References:

Internal references:

  • XCPNG-768 : initial spike (with PoC)
  • XCPNG-3258: design
  • XCPNG-3259: implementation

Use a more generic message to permit to use it in other context than VLAN creation.

Signed-off-by: Sebastien Marie <semarie@kapouay.eu.org>
@semarie semarie force-pushed the dev/srt/master/vlan-filtering branch from 32d343e to 013dff3 Compare June 10, 2026 10:16
Comment thread ocaml/xenopsd/scripts/vif-real Fixed
Comment thread ocaml/xenopsd/scripts/vif-real Fixed
Comment thread ocaml/xenopsd/scripts/vif-real Fixed
Comment thread ocaml/xenopsd/scripts/vif-real Fixed
Comment thread ocaml/xenopsd/scripts/vif-real Fixed
@semarie semarie force-pushed the dev/srt/master/vlan-filtering branch from 013dff3 to 3b3f2b5 Compare June 10, 2026 10:21
Comment thread ocaml/xenopsd/scripts/vif-real Fixed
Comment thread ocaml/xenopsd/scripts/vif-real Fixed
@semarie semarie force-pushed the dev/srt/master/vlan-filtering branch 3 times, most recently from 54e858c to f62adbe Compare June 10, 2026 13:34
@semarie semarie marked this pull request as draft June 10, 2026 14:30
@semarie semarie force-pushed the dev/srt/master/vlan-filtering branch from f62adbe to 86df0ef Compare June 10, 2026 14:46
@semarie semarie marked this pull request as ready for review June 10, 2026 14:55
Comment thread ocaml/xenopsd/scripts/vif-real
with_xc_and_xs (fun xc xs ->
match vif.backend with
| Network.Sriov _ ->
raise (Xenopsd_error (Unimplemented "network SR-IOV"))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would rather return NOT_SUPPORTED, using unimplemented might give the idea that it's meant to be implemented

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I see no not_supported (or approx) error in api_errors.ml. Maybe value_not_supported ?
Also, other code treating Network.Sriov as error in ocaml/xenopsd/xc/xenops_server_xen.ml are using Unimplemented (like move, set_locking_mode, set_pvs_proxy).

Comment thread ocaml/idl/schematest.ml
- update idl/datamodel to add trunks property on VIF
- add validation constraints (trunks filtering on access port isn't valid)
- add support inside `vif-real` for initial configuration
- add support inside xenopsd for dynamic changes
- add test coverage to new attributes

References:

- Design document: https://github.com/xapi-project/xen-api/blob/788869e5a92e10332ba2428eb91e5a2caf4c7131/doc/content/design/vlan-filtering.md

Signed-off-by: Sebastien Marie <semarie@kapouay.eu.org>
@semarie semarie force-pushed the dev/srt/master/vlan-filtering branch from 86df0ef to ccb6e9d Compare June 11, 2026 14:13
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.

3 participants