Ethernet Products
Determine ramifications of Intel® Ethernet products and technologies
4810 Discussions

promisc function does not work with VF in XL710 Network card

lfan5
Novice
2,251 Views

Hi,

In our cloud, there is a powerful machine with some NIC, one of the NICs is xl710, it is 40G card. I created 4 VFs on it, and assigned them to 4 VM (virtual machine) instances. For exampe. VM1 use VF1, VM2 use VF2, VM3 use VF3, VM4 use VF4. Now I need to use VM4 to monitor the other three VMs. In VM4, I set the VF card promisc, but it can not receive the unicast packet but only can receive the broadcast and multicast packets. For example: I can ping VM2 on VM1, but on VM4, it can not get the traffic of the ping packets.

The host OS is ubuntu 14.04, 3.13.0-52-generic. The guest OS is ubuntu 14.04 3.13.0-49-generic.

I heard promisc function should work with XL710 card.

Do you have any idea about it ?

Thanks a lot.

Liang

10 Replies
lfan5
Novice
1,143 Views

I change some log in i40evf_config_promisc, and use DPDK 2.0.0 to capture the traffic, and found i40evf_config_promisc return error.

static int

i40evf_config_promisc(struct rte_eth_dev *dev,

bool enable_unicast,

bool enable_multicast)

{

struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);

int err;

struct vf_cmd_info args;

struct i40e_virtchnl_promisc_info promisc;

promisc.flags = 0;

promisc.vsi_id = vf->vsi_res->vsi_id;

if (enable_unicast)

promisc.flags |= I40E_FLAG_VF_UNICAST_PROMISC;

if (enable_multicast)

promisc.flags |= I40E_FLAG_VF_MULTICAST_PROMISC;

args.ops = I40E_VIRTCHNL_OP_CONFIG_PROMISCUOUS_MODE;

args.in_args = (uint8_t *)&promisc;

args.in_args_size = sizeof(promisc);

args.out_buffer = cmd_result_buffer;

args.out_size = I40E_AQ_BUF_SZ;

err = i40evf_execute_vf_cmd(dev, &args);

if (err)

printf("-------------fail to execute command "

"CONFIG_PROMISCUOUS_MODE----------");

return err;

}

I use following commands to create VF and VMs, is there something missing or something wrong?

modprobe pci_stub

echo 4 > /sys/class/net/p1p1/device/sriov_numvfs

ip link set p1p1 vf 0 mac a0:bb:cc:dd:ee:f0

ip link set p1p1 vf 1 mac 00:52:44:11:22:33

ip link set p1p1 vf 2 mac a2:bb:cc:dd:ee:f2

ip link set p1p1 vf 3 mac 00:52:44:11:22:34

rmmod kvm_intel

rmmod kvm

modprobe kvm allow_unsafe_assigned_interrupts=1

modprobe kvm_intel

echo "8086 154c" > /sys/bus/pci/drivers/pci-stub/new_id

echo "0000:08:02.0" > /sys/bus/pci/drivers/i40evf/unbind

echo "0000:08:02.0" > /sys/bus/pci/drivers/pci-stub/bind

echo "8086 154c" > /sys/bus/pci/drivers/pci-stub/remove_id

kvm -m 4096M -smp 3 -hda /root/vnpb_0.imge -name vm0 -boot d -daemonize -monitor \

telnet::10031,server,nowait,nodelay \

-cpu host \

-device e1000,netdev=public0,mac=00:0c:29:e1:f0:ff -netdev user,id=public0,hostfwd=tcp::11029-:22 \

-device pci-assign,host=08:02.0

echo "8086 154c" > /sys/bus/pci/drivers/pci-stub/new_id

echo "0000:08:02.1" > /sys/bus/pci/drivers/i40evf/unbind

echo "0000:08:02.1" > /sys/bus/pci/drivers/pci-stub/bind

echo "8086 154c" > /sys/bus/pci/drivers/pci-stub/remove_id

kvm -m 4096M -smp 3 -hda /root/vnpb_1.imge -name vm1 -boot d -daemonize -monitor \

telnet::10033,server,nowait,nodelay \

-cpu host \

-device e1000,netdev=public1,mac=00:0c:29:e1:f7:ff -netdev user,id=public1,hostfwd=tcp::11027-:22 \

-device pci-assign,host=08:02.1

echo "8086 154c" > /sys/bus/pci/drivers/pci-stub/new_id

echo "0000:08:02.2" > /sys/bus/pci/drivers/i40evf/unbind

echo "0000:08:02.2" > /sys/bus/pci/drivers/pci-stub/bind

echo "8086 154c" > /sys/bus/pci/drivers/pci-stub/remove_id

kvm -m 4096M -smp 3 -hda /root/vnpb_2.imge -name vm2 -boot d -daemonize -monitor \

telnet::10028,server,nowait,nodelay \

-cpu host \

-device e1000,netdev=public2,mac=00:0c:29:e1:f2:ff -netdev user,id=public2,hostfwd=tcp::11026-:22 \

-device pci-assign,host=08:02.2

echo "8086 154c" > /sys/bus/pci/drivers/pci-stub/new_id

echo "0000:08:02.3" > /sys/bus/pci/drivers/i40evf/unbind

echo "0000:08:02.3" > /sys/bus/pci/drivers/pci-stub/bind

echo "8086 154c" > /sys/bus/pci/drivers/pci-stub/remove_id

kvm -m 4096M -smp 3 -hda /root/vnpb_3.imge -name vm3 -boot d -daemonize -monitor \

telnet::10030,server,nowait,nodelay \

-cpu host \

-device e1000,netdev=public3,mac=00:0c:29:e1:f9:ff -netdev user,id=public3,hostfwd=tcp::11028-:22 \

-device pci-assign,host=08:02.3

0 Kudos
SYeo3
Valued Contributor I
1,143 Views

Hi Liang,

Thank you for contacting Intel. I'll check this and will update you accordingly.

Sincerely,

Sandy

0 Kudos
lfan5
Novice
1,143 Views

Thanks Sandy,

in /var/log/kern.log, the log shows the set promisc failure.

Jun 9 17:26:43 cto-team-7 kernel: [ 3569.965555] i40e 0000:08:00.0: Failed opcode 14 Error: -5

0 Kudos
lfan5
Novice
1,143 Views

I run l2fwd in DPDK example, and it shows "Failed opcode 14 Error: -5" in kern.log.

I do not know what step missing or what is wrong.

Does xl710 support such case?

Thanks

Liang

0 Kudos
SYeo3
Valued Contributor I
1,143 Views

Thanks, Liang.

We are checking on the promisc configuration. We'll get back to you once we have any update.

Sincerely,

Sandy

0 Kudos
lfan5
Novice
1,143 Views

Thanks Sandy,

Is there any document about the VF promisc? I update the host OS to ubuntu 15.04, and unfortunately, VM1 can not ping VM2 now,

Thanks

Liang

0 Kudos
SYeo3
Valued Contributor I
1,143 Views

Hi Liang,

I'll try to find a documentation for VF promisc configuration and will keep you posted on my findings.

Sincerely,

Sandy

0 Kudos
SYeo3
Valued Contributor I
1,143 Views

Hi Liang,

Upon checking the adapter's features, the VF promiscuous mode on XL710 and X710 adapters is not supported at this time. This feature is being worked on and will be available in the future.

Feel free to contact us again if you have further questions.

Sincerely,

Sandy

0 Kudos
lfan5
Novice
1,143 Views

Thanks Sandy,

Do you know, when will VF promiscuous be supported? Will we just update the driver i40e/i40evf to support it in the future?

Thanks

Liang

0 Kudos
SYeo3
Valued Contributor I
1,143 Views

Hi Liang,

Sorry, we still do not have the release date. New features are usually added via driver or firmware updates. Please visit https://downloadcenter.intel.com/ Intel® Download Center to check for updates regularly.

Have a great day!

Sincerely,

Sandy

0 Kudos
Reply