aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries
AgeCommit message (Expand)AuthorFilesLines
2021-07-22Framework: increase framework setup timeoutJuraj Linkeš1-1/+1
2021-07-21Perf: Enable af_xdp for Intel x500 seriespmikus1-2/+3
2021-07-21Perf: Enable af_xdp for Intel x500 seriespmikus1-2/+2
2021-07-20FIX: Mellanoxpmikus1-5/+6
2021-07-19Report: Add rls dataTibor Frank1-0/+1
2021-07-13job-spec: Add hoststack and vsapTibor Frank1-0/+1
2021-07-12IETF: Update MLRsearch draftVratko Polak3-11/+20
2021-07-12Tox: Move logs to archive also on -1Vratko Polak1-3/+4
2021-07-09CI-MAN: Unify backupspmikus1-0/+6
2021-07-08Infra: AWS Jenkins Integrationpmikus3-31/+144
2021-07-06Telemetry: Add node infopmikus2-7/+31
2021-06-21FrameworkSetup: fix timeout in Arm setupJuraj Linkeš1-1/+1
2021-06-17Core: Rework CPU allocationpmikus11-250/+216
2021-06-16Line length: Fix recent mergesVratko Polak9-29/+45
2021-06-16ip6lisp: Do not fail on string overhead valueVratko Polak1-1/+2
2021-06-11FIX: GSO testspmikus1-3/+4
2021-06-10FIX: Pylint reducepmikus97-137/+132
2021-06-10Infra: vpp_device -> Ubuntu 20.04pmikus1-2/+4
2021-06-10Add gtpu sw performance test casesxinfeng zhao3-1/+107
2021-06-10Dpdk in VM: Increase num_mbufsVratko Polak5-12/+14
2021-06-04FIX: af_xdp L2 data pathspmikus1-1/+28
2021-06-04Performance: Add AF_XDP testspmikus8-36/+362
2021-06-02Infra: Decommission 3n-hsw - NICspmikus1-19/+1
2021-06-01Tox: Run pylint also for GPLVratko Polak1-2/+2
2021-05-28Framework: Telemetry retakepmikus5-126/+134
2021-05-26Add dpdk max-simd-bitwidth configuration.xinfeng zhao2-1/+18
2021-05-26rxq_ratio default value changed to 1viliam.luc2-2/+15
2021-05-26Perf: Add perfmon_plugin for telemetrypmikus1-1/+1
2021-05-20hoststack perf: iperf3 udp hoststack performance tests.Dave Wallace2-0/+18
2021-05-20perf: add TCP Nginx+LDPRELOAD suitesxizhanx17-13/+1014
2021-05-12PAPI stats: Use single dumpVratko Polak1-0/+2
2021-04-27Infra: AWS - add CSIT parameters to bootstrapTomas Alexy3-2/+29
2021-04-21FrameworkSetup: increase timeoutJuraj Linkeš1-1/+1
2021-04-20tox: Add job-spec checkerTibor Frank1-0/+60
2021-04-19DPDK bumppmikus3-7/+4
2021-04-15common.sh - fix 3n AWS topology tag selectionTomas Alexy1-2/+2
2021-04-14Infra: common.sh - add ENA 50g NICTomas Alexy1-0/+1
2021-04-12Infra: AWS bootstrap integrationTomas Alexy2-3/+45
2021-04-08Ansible git movepmikus1-4/+4
2021-04-07SetupFramework: Log env activation outputsVratko Polak1-3/+11
2021-04-06DPDK buid: Fix sed commandVratko Polak1-1/+1
2021-04-01IPsec: add 4, 40 and 400 tunnel policy testsJuraj Linkeš1-0/+2
2021-03-31TrafficGenerator: Less logging of unsentVratko Polak1-1/+2
2021-03-31IPsec: add 2n crypto policy udir perf testsJuraj Linkeš1-35/+65
2021-03-31Device: Add stats test with AVFVratko Polak2-1/+29
2021-03-29FIX: VPP version file name based on OSpmikus1-13/+13
2021-03-26STL traffic: Use the sleep+stop logicVratko Polak3-8/+38
2021-03-26Parametrize T-Rex rx/tx descriptors countTomas Alexy2-0/+23
2021-03-26ansible: update TX2 VPP Device hugepages and ifsJuraj Linkeš1-8/+2
2021-03-24FrameworkSetup: fix timeout in Arm setupJuraj Linkeš1-1/+1
ass="n">dir))) { /* look for lower_enXXXX */ if (strncmp (e->d_name, "lower_", 6)) continue; strncpy (ifr.ifr_name, e->d_name + 6, IFNAMSIZ - 1); break; } closedir (dir); if (!e) goto done; /* no lower device */ if (ioctl (fd, SIOCGIFFLAGS, &ifr) < 0) error = clib_error_return_unix (0, "ioctl fetch intf %s flags", ifr.ifr_name); else if (!(ifr.ifr_flags & IFF_UP)) { ifr.ifr_flags |= IFF_UP; if (ioctl (fd, SIOCSIFFLAGS, &ifr) < 0) error = clib_error_return_unix (0, "ioctl set intf %s flags", ifr.ifr_name); } done: vec_free (dev_net_dir); return error; } static int directory_exists (char *path) { struct stat s = { 0 }; if (stat (path, &s) == -1) return 0; return S_ISDIR (s.st_mode); } clib_error_t * vlib_vmbus_bind_to_uio (vlib_vmbus_addr_t * addr) { clib_error_t *error = 0; u8 *dev_dir_name; char *ifname = 0; static int uio_new_id_needed = 1; struct dirent *e; struct ifreq ifr; u8 *s, *driver_name; DIR *dir; int fd; dev_dir_name = format (0, "%s/%U", sysfs_vmbus_dev_path, format_vlib_vmbus_addr, addr); s = format (0, "%v/driver%c", dev_dir_name, 0); driver_name = clib_sysfs_link_to_name ((char *) s); vec_reset_length (s); /* skip if not using the Linux kernel netvsc driver */ if (!driver_name || strcmp ("hv_netvsc", (char *) driver_name) != 0) goto done; /* if uio_hv_generic is not loaded, then can't use native DPDK driver. */ if (!directory_exists ("/sys/module/uio_hv_generic")) goto done; s = format (s, "%v/net%c", dev_dir_name, 0); dir = opendir ((char *) s); vec_reset_length (s); if (!dir) return clib_error_return (0, "VMBUS failed to open %s", s); while ((e = readdir (dir))) { if (e->d_name[0] == '.') /* skip . and .. */ continue; ifname = strdup (e->d_name); break; } closedir (dir); if (!ifname) { error = clib_error_return (0, "VMBUS device %U eth not found", format_vlib_vmbus_addr, addr); goto done; } clib_memset (&ifr, 0, sizeof (ifr)); strncpy (ifr.ifr_name, ifname, IFNAMSIZ - 1); /* read up/down flags */ fd = socket (PF_INET, SOCK_DGRAM, 0); if (fd < 0) { error = clib_error_return_unix (0, "socket"); goto done; } if (ioctl (fd, SIOCGIFFLAGS, &ifr) < 0) { error = clib_error_return_unix (0, "ioctl fetch intf %s flags", ifr.ifr_name); close (fd); goto done; } if (ifr.ifr_flags & IFF_UP) { error = clib_error_return (0, "Skipping VMBUS device %U as host interface %s is up", format_vlib_vmbus_addr, addr, e->d_name); close (fd); goto done; } /* tell uio_hv_generic about netvsc device type */ if (uio_new_id_needed) { vec_reset_length (s); s = format (s, "%s/%s/new_id%c", sysfs_vmbus_drv_path, uio_drv_name, 0); error = clib_sysfs_write ((char *) s, "%s", netvsc_uuid); if (error) { close (fd); goto done; } uio_new_id_needed = 0; } error = vlib_vmbus_raise_lower (fd, ifname); close (fd); if (error) goto done; /* prefer the simplier driver_override model */ vec_reset_length (s); s = format (s, "%/driver_override%c", dev_dir_name, 0); if (access ((char *) s, F_OK) == 0) { clib_sysfs_write ((char *) s, "%s", uio_drv_name); } else { vec_reset_length (s); s = format (s, "%v/driver/unbind%c", dev_dir_name, 0); error = clib_sysfs_write ((char *) s, "%U", format_vlib_vmbus_addr, addr); if (error) goto done; vec_reset_length (s); s = format (s, "%s/%s/bind%c", sysfs_vmbus_drv_path, uio_drv_name, 0); error = clib_sysfs_write ((char *) s, "%U", format_vlib_vmbus_addr, addr); } vec_reset_length (s); done: free (ifname); vec_free (s); vec_free (dev_dir_name); vec_free (driver_name); return error; } static clib_error_t * scan_vmbus_addr (void *arg, u8 * dev_dir_name, u8 * ignored) { vlib_vmbus_addr_t addr, **addrv = arg; unformat_input_t input; clib_error_t *err = 0; unformat_init_string (&input, (char *) dev_dir_name, vec_len (dev_dir_name)); if (!unformat (&input, "/sys/bus/vmbus/devices/%U", unformat_vlib_vmbus_addr, &addr)) err = clib_error_return (0, "unformat error `%v`", dev_dir_name); unformat_free (&input); if (err) return err; vec_add1 (*addrv, addr); return 0; } static int vmbus_addr_cmp (void *v1, void *v2) { vlib_vmbus_addr_t *a1 = v1; vlib_vmbus_addr_t *a2 = v2; return uuid_compare (a1->guid, a2->guid); } vlib_vmbus_addr_t * vlib_vmbus_get_all_dev_addrs () { vlib_vmbus_addr_t *addrs = 0; clib_error_t *err; err = foreach_directory_file ((char *) sysfs_vmbus_dev_path, scan_vmbus_addr, &addrs, /* scan_dirs */ 0); if (err) { vec_free (addrs); return 0; } vec_sort_with_function (addrs, vmbus_addr_cmp); return addrs; } clib_error_t * linux_vmbus_init (vlib_main_t * vm) { linux_vmbus_main_t *pm = &linux_vmbus_main; pm->vlib_main = vm; return 0; } /* *INDENT-OFF* */ VLIB_INIT_FUNCTION (linux_vmbus_init) = { .runs_before = VLIB_INITS("unix_input_init"), }; /* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */