Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VFP interface types and quantities with KVM #5

Open
Epicyon opened this issue Feb 10, 2017 · 2 comments
Open

VFP interface types and quantities with KVM #5

Epicyon opened this issue Feb 10, 2017 · 2 comments

Comments

@Epicyon
Copy link

Epicyon commented Feb 10, 2017

Using e1000 for virbr0 and virtio for ge-0/0/* interfaces when using a small number of connections to the vmx ( 2 or less ) causes riot to fail to launch, resulting in the VFP failing to register to the VCP correctly.

This happens because the start_riot.sh script counts the devices by type to determine what to pass to the riot.py launcher and then onto riot.

# How many ports
#i40evf shows up as Device 154c, igbvf and ixgbevf show up as Ethernet Controller Virtual Function
sriov_dev_str="Ethernet Controller Virtual Function\|Device 154c"
vmx_junos_device_type_sriov=$(lspci | grep "$sriov_dev_str" | wc -l)
vmx_junos_device_type_virtio=$(lspci | grep "Virtio network device" | wc -l)
vmx_junos_device_type_e1000=$(lspci | grep "82545" | wc -l)
vmx_junos_device_type_vmxnet3=$(lspci | grep -i "vmxnet3" | wc -l)

if [ $vmx_junos_device_type_sriov -gt 0 ];
then
    numports=$vmx_junos_device_type_sriov
elif [ $vmx_junos_device_type_virtio -gt 2 ];
then
    numports=$(expr $vmx_junos_device_type_virtio - 2)
elif [ $vmx_junos_device_type_e1000 -gt 2 ];
then
    numports=$(expr $vmx_junos_device_type_e1000 - 2)
elif [ $vmx_junos_device_type_vmxnet3 -gt 0 ];
then
    numports=$vmx_junos_device_type_vmxnet3
fi
arg_str=`/home/pfe/riot/get_virtio_argstr $numcpus $numports $fab_enable $pfe_id $vmx_phase`
if [ $? -ne 0 ];
then
    logger -s "vFP Error: $arg_str"
    echo "vFP Error: $arg_str"
    exit 1
fi    

When numports is not greater than 2 the get_virtio_argstr tool can't generate the proper command string for riot.

When riot attempts to launch, it throws this error on the console and to syslog back to the VCP.

Incorrect value for --rx argument (-12)

I see the interface type is driven by the template in ajax/templates/ajax/kvm. I'd submit a pull request if I knew enough about Django to figure out where the value for interface.type is defined, but alas, I don't. I've hardcoded my local template for now to use virtio. Hope this helps.

-James

@nembery
Copy link
Contributor

nembery commented Feb 15, 2017

Thanks for the catch james. I believe this was corrected with commit: e0eccbc, so you may need to update to latest code from git to verify. I'm also hard coding these values in the js vm_type descriptor file for vpfe.

@nembery nembery closed this as completed Apr 7, 2017
@nembery
Copy link
Contributor

nembery commented Nov 2, 2017

Re-opening this issue, as it's actually not fixed at all. I'll create an enhancement to ensure we always have at least two revenue ports enabled. We can create a 'hidden' bridge and assign extra ports there until we've reached a minimum port count. for vmx this would be 2. So, if the user only adds 1 port, we'll add a second one to a hidden bridge to ensure the fpc always comes up.

@nembery nembery reopened this Nov 2, 2017
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

No branches or pull requests

2 participants