Results 1 to 4 of 4

Thread: Anyone know how to implement these SR-IOV virtual function options into NetPlan

  1. #1
    Join Date
    Feb 2010
    Beans
    4

    Anyone know how to implement these SR-IOV virtual function options into NetPlan

    I am running KVM on Ubuntu 20.04 & using SR-IOV for an Intel x520, does anyone know how to implement these SR-IOV virtual function options into NetPlan

    ip link set enp7s0f0 vf 0 trust on
    ip link set enp7s0f0 vf 0 spoofchk off
    ip link set enp7s0f0 vf 0 vlan 3

    My NetPlan config is below

    enp7s0f0: {}
    addresses: []
    virtual-function-count: 63
    vf1:
    match:
    name: enp7s0f0v[0-62]

    enp7s0f1: {}
    addresses: []
    virtual-function-count: 63
    vf2:
    match:
    name: enp7s0f1v[0-62]

  2. #2
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Anyone know how to implement these SR-IOV virtual function options into NetPlan

    Quote Originally Posted by paullautier View Post
    I am running KVM on Ubuntu 20.04 & using SR-IOV for an Intel x520, does anyone know how to implement these SR-IOV virtual function options into NetPlan

    ip link set enp7s0f0 vf 0 trust on
    ip link set enp7s0f0 vf 0 spoofchk off
    ip link set enp7s0f0 vf 0 vlan 3

    My NetPlan config is below

    enp7s0f0: {}
    addresses: []
    virtual-function-count: 63
    vf1:
    match:
    name: enp7s0f0v[0-62]

    enp7s0f1: {}
    addresses: []
    virtual-function-count: 63
    vf2:
    match:
    name: enp7s0f1v[0-62]
    Using these for reference,
    - Canonical Netplan Reference
    - Canonical Netplan Examples

    Not saying this is 100%, because I see conflicts in their own examples(?), But, this "looks" right logically.
    Code:
    network:
        version: 2
        ethernets:
            eno1:
                mtu: 9000
            enp7s0f0:
                virtual-function-count  63
                link: vf1
            vf1:
                match:
                    name: enp7s0f0[0-62]
                link: eno1
            enp7s0f1v:
                virtual-function-count: 63
                link: vf2
            vf2:
                match:
                    name: enp7s0f1v[0-62]
                link: eno1
        vlans:
            vlan3:
                accept-ra: no
                id: 3
                link: enp7s0f0
    
    I don't see anything in the NetPlan Doc's that would integrate spoofchk or trust yet... IP Link is new, so isn't going away soon. Not sure... Still looking though the docs and blueprints...


    EDIT: That's still the recommended way to do spoofchk and trust that I can see so far. And that to add them as persistent, is adding the ip link commands to the /etc/bash.bashrc file. That seems to be the current.

    But at least in the case of "trusted" in VF's, it is being considered as a future add upstream as a proposed attribute: "vf_trusted: fields.BooleanField(default=False)"
    - Trusted Virtual Functions
    And look under "Alternatives" in:
    - Enable spoofchk control for SR-IOV ports

    They seem to be aware of the need and talking about it, but not there yet.
    Last edited by MAFoElffen; June 27th, 2021 at 04:34 AM.

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  3. #3
    Join Date
    Feb 2010
    Beans
    4

    Thumbs up Re: Anyone know how to implement these SR-IOV virtual function options into NetPlan

    @MAFoElffen, Thanks for the great information, for now I will stick with using /etc/bash.bashrc file to make the options persistant. But it's good to hear there is discusssion around getting this feature added.
    Thanks Again.

  4. #4
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Anyone know how to implement these SR-IOV virtual function options into NetPlan

    You are very welcome.

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •