NM.SettingSriov

g GObject.Object GObject.Object NM.Setting NM.Setting GObject.Object->NM.Setting NM.SettingSriov NM.SettingSriov NM.Setting->NM.SettingSriov

Subclasses:

None

Methods

Inherited:

NM.Setting (21), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

add_vf (vf)

clear_vfs ()

get_autoprobe_drivers ()

get_eswitch_encap_mode ()

get_eswitch_inline_mode ()

get_eswitch_mode ()

get_num_vfs ()

get_total_vfs ()

get_vf (idx)

remove_vf (idx)

remove_vf_by_index (index)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Inherited:

NM.Setting (1)

Name

Type

Flags

Short Description

autoprobe-drivers

NM.Ternary

r/w/en

eswitch-encap-mode

int

r/w/en

eswitch-inline-mode

int

r/w/en

eswitch-mode

int

r/w/en

total-vfs

int

r/w/en

vfs

GLib.PtrArray

r/w

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class NM.SettingSriov(**kwargs)
Bases:

NM.Setting

Abstract:

No

Structure:

NM.SettingSriovClass

SR-IOV settings

New in version 1.14.

classmethod new()
Returns:

the new empty NM.SettingSriov object

Return type:

NM.Setting

Creates a new NM.SettingSriov object with default values.

New in version 1.14.

add_vf(vf)
Parameters:

vf (NM.SriovVF) – the VF to add

Appends a new VF and associated information to the setting. The given VF is duplicated internally and is not changed by this function.

New in version 1.14.

clear_vfs()

Removes all configured VFs.

New in version 1.14.

get_autoprobe_drivers()
Returns:

the autoprobe-drivers property value

Return type:

NM.Ternary

Returns the value contained in the NM.SettingSriov :autoprobe-drivers property.

New in version 1.14.

get_eswitch_encap_mode()
Returns:

the value contained in the NM.SettingSriov :eswitch-encap-mode property.

Return type:

NM.SriovEswitchEncapMode

New in version 1.46.

get_eswitch_inline_mode()
Returns:

the value contained in the NM.SettingSriov :eswitch-inline-mode property.

Return type:

NM.SriovEswitchInlineMode

New in version 1.46.

get_eswitch_mode()
Returns:

the value contained in the NM.SettingSriov :eswitch-mode property.

Return type:

NM.SriovEswitchMode

New in version 1.46.

get_num_vfs()
Returns:

the number of configured VFs

Return type:

int

New in version 1.14.

get_total_vfs()
Returns:

the total number of SR-IOV virtual functions to create

Return type:

int

Returns the value contained in the NM.SettingSriov :total-vfs property.

New in version 1.14.

get_vf(idx)
Parameters:

idx (int) – index number of the VF to return

Returns:

the VF at index idx

Return type:

NM.SriovVF

New in version 1.14.

remove_vf(idx)
Parameters:

idx (int) – index number of the VF

Removes the VF at index idx.

New in version 1.14.

remove_vf_by_index(index)
Parameters:

index (int) – the VF index of the VF to remove

Returns:

True if the VF was found and removed; False if it was not

Return type:

bool

Removes the VF with VF index index.

New in version 1.14.

Property Details

NM.SettingSriov.props.autoprobe_drivers
Name:

autoprobe-drivers

Type:

NM.Ternary

Default Value:

NM.Ternary.DEFAULT

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether to autoprobe virtual functions by a compatible driver.

If set to NM.Ternary.TRUE, the kernel will try to bind VFs to a compatible driver and if this succeeds a new network interface will be instantiated for each VF.

If set to NM.Ternary.FALSE, VFs will not be claimed and no network interfaces will be created for them.

When set to NM.Ternary.DEFAULT, the global default is used; in case the global default is unspecified it is assumed to be NM.Ternary.TRUE.

New in version 1.14.

NM.SettingSriov.props.eswitch_encap_mode
Name:

eswitch-encap-mode

Type:

int

Default Value:

-1

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Select the eswitch encapsulation support.

Currently it’s only supported for PCI PF devices, and only if the eswitch device is managed from the same PCI address than the PF.

If set to NM.SriovEswitchEncapMode.PRESERVE (default) the eswitch encap-mode won’t be modified by NetworkManager.

New in version 1.46.

NM.SettingSriov.props.eswitch_inline_mode
Name:

eswitch-inline-mode

Type:

int

Default Value:

-1

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Select the eswitch inline-mode of the device. Some HWs need the VF driver to put part of the packet headers on the TX descriptor so the e-switch can do proper matching and steering.

Currently it’s only supported for PCI PF devices, and only if the eswitch device is managed from the same PCI address than the PF.

If set to NM.SriovEswitchInlineMode.PRESERVE (default) the eswitch inline-mode won’t be modified by NetworkManager.

New in version 1.46.

NM.SettingSriov.props.eswitch_mode
Name:

eswitch-mode

Type:

int

Default Value:

-1

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Select the eswitch mode of the device. Currently it’s only supported for PCI PF devices, and only if the eswitch device is managed from the same PCI address than the PF.

If set to NM.SriovEswitchMode.PRESERVE (default) the eswitch mode won’t be modified by NetworkManager.

New in version 1.46.

NM.SettingSriov.props.total_vfs
Name:

total-vfs

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The total number of virtual functions to create.

Note that when the sriov setting is present NetworkManager enforces the number of virtual functions on the interface (also when it is zero) during activation and resets it upon deactivation. To prevent any changes to SR-IOV parameters don’t add a sriov setting to the connection.

New in version 1.14.

NM.SettingSriov.props.vfs
Name:

vfs

Type:

GLib.PtrArray

Default Value:

None

Flags:

READABLE, WRITABLE

Array of virtual function descriptors.

Each VF descriptor is a dictionary mapping attribute names to GLib.Variant values. The ‘index’ entry is mandatory for each VF.

When represented as string a VF is in the form:

“INDEX [ATTR=VALUE[ ATTR=VALUE]…]”.

for example:

“2 mac=00:11:22:33:44:55 spoof-check=true”.

Multiple VFs can be specified using a comma as separator. Currently, the following attributes are supported: mac, spoof-check, trust, min-tx-rate, max-tx-rate, vlans.

The “vlans” attribute is represented as a semicolon-separated list of VLAN descriptors, where each descriptor has the form

“ID[.PRIORITY[.PROTO]]”.

PROTO can be either ‘q’ for 802.1Q (the default) or ‘ad’ for 802.1ad.

New in version 1.14.