-
Notifications
You must be signed in to change notification settings - Fork 155
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
nff-go in Azure with NetVSC and failsafe #688
Comments
Cause I'm using Broadcom Network Cards in one server I also added -lrte_pmd_bnxt to internal/low/low_mlx.go See testpmd-Output below which finds my two ports I would like to use, but nff-go says:
|
Do you know which DPDK driver supports Microsoft NetVSC device? You can always add this driver library to the list of DPDK drivers in https://github.com/intel-go/nff-go/blob/master/internal/low/low_mlx.go#L10 or https://github.com/intel-go/nff-go/blob/master/internal/low/low_no_mlx.go#L10 depending on whether you are using MLX enabled build or NO_MLX build. Make sure to add the driver library between |
The driver part seems to work after adding more dpdk libs to nff-go. diff --git a/internal/low/low.h b/internal/low/low.h
index de591d3..2a00d93 100644
--- a/internal/low/low.h
+++ b/internal/low/low.h
@@ -319,6 +319,8 @@ int port_init(uint16_t port, bool willReceive, struct rte_mempool **mbuf_pools,
port_conf_default.rxmode.offloads |= dev_info.rx_offload_capa & DEV_RX_OFFLOAD_TIMESTAMP;
}
+ rte_eth_dev_stop(port);
+
/* Configure the Ethernet device. */
int retval = rte_eth_dev_configure(port, rx_rings, tx_rings, &port_conf_default);
if (retval != 0)
diff --git a/internal/low/low_mlx.go b/internal/low/low_mlx.go
index 17f4d2b..bcd33d8 100644
--- a/internal/low/low_mlx.go
+++ b/internal/low/low_mlx.go
@@ -7,6 +7,6 @@
package low
/*
-#cgo LDFLAGS: -lrte_distributor -lrte_reorder -lrte_kni -lrte_pipeline -lrte_table -lrte_port -lrte_timer -lrte_jobstats -lrte_lpm -lrte_power -lrte_acl -lrte_meter -lrte_sched -lrte_vhost -lrte_ip_frag -lrte_cfgfile -Wl,--whole-archive -Wl,--start-group -lrte_kvargs -lrte_mbuf -lrte_hash -lrte_ethdev -lrte_mempool -lrte_ring -lrte_mempool_ring -lrte_eal -lrte_cmdline -lrte_net -lrte_bus_pci -lrte_pci -lrte_bus_vdev -lrte_timer -lrte_pmd_bond -lrte_pmd_vmxnet3_uio -lrte_pmd_virtio -lrte_pmd_cxgbe -lrte_pmd_enic -lrte_pmd_i40e -lrte_pmd_fm10k -lrte_pmd_ixgbe -lrte_pmd_e1000 -lrte_pmd_ena -lrte_pmd_ring -lrte_pmd_af_packet -lrte_pmd_null -libverbs -lmnl -lmlx4 -lmlx5 -lrte_pmd_mlx4 -lrte_pmd_mlx5 -Wl,--end-group -Wl,--no-whole-archive -lrt -lm -ldl -lnuma
+#cgo LDFLAGS: -lrte_distributor -lrte_reorder -lrte_kni -lrte_pipeline -lrte_table -lrte_port -lrte_timer -lrte_jobstats -lrte_lpm -lrte_power -lrte_acl -lrte_meter -lrte_sched -lrte_vhost -lrte_ip_frag -lrte_cfgfile -Wl,--whole-archive -Wl,--start-group -lrte_kvargs -lrte_mbuf -lrte_hash -lrte_ethdev -lrte_gso -lrte_mempool -lrte_ring -lrte_mempool_ring -lrte_eal -lrte_cmdline -lrte_net -lrte_bus_pci -lrte_pci -lrte_bus_vdev -lrte_timer -lrte_pmd_bond -lrte_pmd_vmxnet3_uio -lrte_pmd_virtio -lrte_pmd_cxgbe -lrte_pmd_enic -lrte_pmd_i40e -lrte_pmd_fm10k -lrte_pmd_ixgbe -lrte_pmd_e1000 -lrte_pmd_ena -lrte_pmd_ring -lrte_pmd_af_packet -lrte_pmd_null -lrte_pmd_bnxt -lrte_pmd_failsafe -lrte_pmd_tap -lrte_pmd_vdev_netvsc -lrte_bus_vmbus -lrte_pmd_netvsc -libverbs -lmnl -lmlx4 -lmlx5 -lrte_pmd_mlx4 -lrte_pmd_mlx5 -Wl,--end-group -Wl,--no-whole-archive -lrt -lm -ldl -lnuma
*/
import "C" But now I have a new problem. The IDs of my Interfaces, as shown above, are 0 and 2. So if I do "flow.SetReceiver(2)" it fails with: Doing "flow.SetReceiver(1)" gives me the same interface as 0.
|
The error that you see about port numbers comes from NFF-Go code where it checks whether specified port index is within the range of DPDK port identifiers. If |
@gshimansky Thanks for the answer. I had to change some stuff to make it work. Ports are not an array with ongoing IDs. So I changed createdPorts to an map instead of an array. I also adjusted the checks in nff-go as you suggested and now it seems to work. My applications starts and I can do ARP and ICMP. Very nice! |
This is the first time someone reported that NFF-Go works successfully on Azure. Thank you very much! |
I read all the issues and docs regarding this topic, but can't figure out if and how this works with nff-go.
We can make our nff-go application work with Mellanox-Driver in a real-world and a virtual setup. But then we don't see all network-traffic in the virtual setup. For example ARP-Replies never reach the nff-go application.
According to this you should use the failsafe-mode for this:
https://docs.microsoft.com/en-us/azure/virtual-network/setup-dpdk#failsafe-pmd
Adding --vdev="net_vdev_netvsc0,iface=eth1" to the DPDKArgs in flow.Config results in an init-error since nff-go doesn't link the needed drivers. The given testpmd example works as expected.
So my question is how you should/can use nff-go in an HyperV-VM with SR-IOV?
The text was updated successfully, but these errors were encountered: