summaryrefslogtreecommitdiff
path: root/sys/compat/linuxkpi/common/include/linux/inetdevice.h
Commit message (Collapse)AuthorAgeFilesLines
* Mechanical cleanup of epoch(9) usage in network stack.Gleb Smirnoff2019-01-091-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | - Remove macros that covertly create epoch_tracker on thread stack. Such macros a quite unsafe, e.g. will produce a buggy code if same macro is used in embedded scopes. Explicitly declare epoch_tracker always. - Unmask interface list IFNET_RLOCK_NOSLEEP(), interface address list IF_ADDR_RLOCK() and interface AF specific data IF_AFDATA_RLOCK() read locking macros to what they actually are - the net_epoch. Keeping them as is is very misleading. They all are named FOO_RLOCK(), while they no longer have lock semantics. Now they allow recursion and what's more important they now no longer guarantee protection against their companion WLOCK macros. Note: INP_HASH_RLOCK() has same problems, but not touched by this commit. This is non functional mechanical change. The only functionally changed functions are ni6_addrs() and ni6_store_addrs(), where we no longer enter epoch recursively. Discussed with: jtl, gallatin Notes: svn path=/head/; revision=342872
* ibcore: ip6_dev_find() needs to know the scope ID.Slava Shwartsman2018-12-051-16/+11
| | | | | | | | | | | | Else the wrong network device can be returned for link-local addresses. Submitted by: hselasky@ Approved by: hselasky (mentor) MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=341533
* UDP: further performance improvements on txMatt Macy2018-05-231-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cumulative throughput while running 64 netperf -H $DUT -t UDP_STREAM -- -m 1 on a 2x8x2 SKL went from 1.1Mpps to 2.5Mpps Single stream throughput increases from 910kpps to 1.18Mpps Baseline: https://people.freebsd.org/~mmacy/2018.05.11/udpsender2.svg - Protect read access to global ifnet list with epoch https://people.freebsd.org/~mmacy/2018.05.11/udpsender3.svg - Protect short lived ifaddr references with epoch https://people.freebsd.org/~mmacy/2018.05.11/udpsender4.svg - Convert if_afdata read lock path to epoch https://people.freebsd.org/~mmacy/2018.05.11/udpsender5.svg A fix for the inpcbhash contention is pending sufficient time on a canary at LLNW. Reviewed by: gallatin Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D15409 Notes: svn path=/head/; revision=334118
* Only search the scope ID in ip6_find_dev() for IPv6 addresses whichHans Petter Selasky2017-09-091-10/+16
| | | | | | | | | | | | have a scope ID. Change size of the searched scope ID to the full 16-bits. There can typically be more than 255 interfaces. Suggested by: ae @ MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=323364
* Resolve IPv6 scope ID issues when using ip6_find_dev() in the LinuxKPI.Hans Petter Selasky2017-09-091-9/+13
| | | | | | | | | | | | Workaround problem that ifa_ifwithaddr() also matches the scope ID of the IPv6 address when searching for a maching IPv6 address. For now simply try all valid scope IDs until a match is found. MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=323351
* Add helper function similar to ip_dev_find() to the LinuxKPI to lookupHans Petter Selasky2017-03-161-1/+25
| | | | | | | | | | a network device by its IPv6 address in the given VNET. MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=315405
* Add basic support for VIMAGE to the LinuxKPI and ibcore.Hans Petter Selasky2017-03-161-3/+5
| | | | | | | | | | | Support is implemented by mapping Linux's "struct net" into FreeBSD's "struct vnet". Currently only vnet0 is supported by ibcore. MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=315404
* Finish process of moving the LinuxKPI module into the default kernel build.Hans Petter Selasky2015-10-291-0/+58
- Move all files related to the LinuxKPI into sys/compat/linuxkpi and its subfolders. - Update sys/conf/files and some Makefiles to use new file locations. - Added description of COMPAT_LINUXKPI to sys/conf/NOTES which in turn adds the LinuxKPI to all LINT builds. - The LinuxKPI can be added to the kernel by setting the COMPAT_LINUXKPI option. The OFED kernel option no longer builds the LinuxKPI into the kernel. This was done to keep the build rules for the LinuxKPI in sys/conf/files simple. - Extend the LinuxKPI module to include support for USB by moving the Linux USB compat from usb.ko to linuxkpi.ko. - Bump the FreeBSD_version. - A universe kernel build has been done. Reviewed by: np @ (cxgb and cxgbe related changes only) Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=290135