mirror of
https://github.com/OpenNebula/one.git
synced 2024-12-24 21:34:01 +03:00
Feature #2159: Add support for RX queues for virt-io NICS (VIRTIO_QUEUES)
This commit is contained in:
parent
da08792d15
commit
80585c9390
@ -928,6 +928,7 @@ function get_disk_information {
|
||||
# * MODEL
|
||||
# * IP
|
||||
# * FILTER
|
||||
# * VIRTIO_QUEUES
|
||||
# * VROUTER_IP
|
||||
# * INBOUND_AVG_BW
|
||||
# * INBOUND_PEAK_BW
|
||||
@ -960,6 +961,7 @@ function get_nic_information {
|
||||
$NIC_XPATH/MODEL \
|
||||
$NIC_XPATH/IP \
|
||||
$NIC_XPATH/FILTER \
|
||||
$NIC_XPATH/VIRTIO_QUEUES \
|
||||
$NIC_XPATH/VROUTER_IP \
|
||||
$NIC_XPATH/INBOUND_AVG_BW \
|
||||
$NIC_XPATH/INBOUND_PEAK_BW \
|
||||
@ -979,6 +981,7 @@ function get_nic_information {
|
||||
MODEL="${XPATH_ELEMENTS[j++]}"
|
||||
IP="${XPATH_ELEMENTS[j++]}"
|
||||
FILTER="${XPATH_ELEMENTS[j++]}"
|
||||
VIRTIO_QUEUES="${XPATH_ELEMENTS[j++]}"
|
||||
VROUTER_IP="${XPATH_ELEMENTS[j++]}"
|
||||
INBOUND_AVG_BW="${XPATH_ELEMENTS[j++]}"
|
||||
INBOUND_PEAK_BW="${XPATH_ELEMENTS[j++]}"
|
||||
|
@ -269,6 +269,7 @@ int LibVirtDriver::deployment_description_kvm(
|
||||
string ip = "";
|
||||
string vrouter_ip = "";
|
||||
string filter = "";
|
||||
string virtio_queues = "";
|
||||
|
||||
string i_avg_bw = "";
|
||||
string i_peak_bw = "";
|
||||
@ -1026,14 +1027,15 @@ int LibVirtDriver::deployment_description_kvm(
|
||||
|
||||
for(int i=0; i<num; i++)
|
||||
{
|
||||
bridge = nic[i]->vector_value("BRIDGE");
|
||||
vn_mad = nic[i]->vector_value("VN_MAD");
|
||||
mac = nic[i]->vector_value("MAC");
|
||||
target = nic[i]->vector_value("TARGET");
|
||||
script = nic[i]->vector_value("SCRIPT");
|
||||
model = nic[i]->vector_value("MODEL");
|
||||
ip = nic[i]->vector_value("IP");
|
||||
filter = nic[i]->vector_value("FILTER");
|
||||
bridge = nic[i]->vector_value("BRIDGE");
|
||||
vn_mad = nic[i]->vector_value("VN_MAD");
|
||||
mac = nic[i]->vector_value("MAC");
|
||||
target = nic[i]->vector_value("TARGET");
|
||||
script = nic[i]->vector_value("SCRIPT");
|
||||
model = nic[i]->vector_value("MODEL");
|
||||
ip = nic[i]->vector_value("IP");
|
||||
filter = nic[i]->vector_value("FILTER");
|
||||
virtio_queues = nic[i]->vector_value("VIRTIO_QUEUES");
|
||||
|
||||
vrouter_ip = nic[i]->vector_value("VROUTER_IP");
|
||||
|
||||
@ -1102,6 +1104,13 @@ int LibVirtDriver::deployment_description_kvm(
|
||||
{
|
||||
file << "\t\t\t<model type="
|
||||
<< one_util::escape_xml_attr(*the_model) << "/>\n";
|
||||
|
||||
if(!virtio_queues.empty() && *the_model == "virtio")
|
||||
{
|
||||
file << "\t\t\t<driver name='vhost' queues="
|
||||
<< one_util::escape_xml_attr(virtio_queues)
|
||||
<< "/>\n";
|
||||
}
|
||||
}
|
||||
|
||||
if (!ip.empty() )
|
||||
|
@ -46,6 +46,10 @@ fi
|
||||
[ -n "${SCRIPT}" ] && DEVICE+=" <script path='$(xml_esc "${SCRIPT}")'/>"
|
||||
[ -n "${MODEL}" ] && DEVICE+=" <model type='$(xml_esc "${MODEL}")'/>"
|
||||
|
||||
if [ -n "${VIRTIO_QUEUES}" ] && [ "${MODEL}" = "virtio" ]; then
|
||||
DEVICE+=" <driver name='vhost' queues='$(xml_esc "${VIRTIO_QUEUES}")'/>"
|
||||
fi
|
||||
|
||||
if [ -n "${IP}" ] && [ -n "${FILTER}" ]; then
|
||||
DEVICE+=" <filterref filter='$(xml_esc "${FILTER}")'>"
|
||||
DEVICE+=" <parameter name='IP' value='$(xml_esc "${IP}")'/>"
|
||||
|
Loading…
Reference in New Issue
Block a user