aboutsummaryrefslogtreecommitdiff
path: root/sys/ofed
Commit message (Collapse)AuthorAgeFilesLines
...
* ibcore: Fix an array index checkSlava Shwartsman2018-12-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | The array ib_mad_mgmt_class_table.method_table has MAX_MGMT_CLASS (80) elements. Hence compare the array index with that value instead of with IB_MGMT_MAX_METHODS (128). This patch avoids that Coverity reports the following: Overrunning array class->method_table of 80 8-byte elements at element index 127 (byte offset 1016) using index convert_mgmt_class(mad_hdr->mgmt_class) (which evaluates to 127). Linux commit: 2fe2f378dd45847d2643638c07a7658822087836 Submitted by: hselasky@ Approved by: hselasky (mentor) MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=341526
* ibcore: Check ib_find_pkey() return value.Slava Shwartsman2018-12-051-2/+3
| | | | | | | | | | | | | Linux commit: d3a2418ee36a59bc02e9d454723f3175dcf4bfd9 Submitted by: hselasky@ Approved by: hselasky (mentor) MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=341525
* ibcore: Add support for IB_SPEED_HDR in sysfs rate printout.Slava Shwartsman2018-12-051-0/+5
| | | | | | | | | | Submitted by: hselasky@ Approved by: hselasky (mentor) MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=341524
* ibcore: Don't access invalid port.Slava Shwartsman2018-12-051-10/+13
| | | | | | | | | | | | | | The port number in the listen_id_priv has been observed to be zero which means no port has been selected. The current code lacks a check for invalid port number. Submitted by: hselasky@ Approved by: hselasky (mentor) MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=341523
* ibcore: Discard unused error codes.Slava Shwartsman2018-12-051-2/+2
| | | | | | | | | | Submitted by: hselasky@ Approved by: hselasky (mentor) MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=341522
* ibcore: Make sure GID index variable gets initialized.Slava Shwartsman2018-12-051-3/+1
| | | | | | | | | | Submitted by: hselasky@ Approved by: hselasky (mentor) MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=341521
* Plug some networking sysctl leaks.Mark Johnston2018-11-221-0/+1
| | | | | | | | | | | | | | | | Various network protocol sysctl handlers were not zero-filling their output buffers and thus would export uninitialized stack memory to userland. Fix a number of such handlers. Reported by: Thomas Barabosch, Fraunhofer FKIE Reviewed by: tuexen MFC after: 3 days Security: kernel memory disclosure Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D18301 Notes: svn path=/head/; revision=340783
* Introduce and use sgid_index in CM requests in ibcore.Hans Petter Selasky2018-09-095-10/+57
| | | | | | | | | | | | | | | | | | | | | | For RoCE, when CM requests are received for RC and UD connections, netdevice of the incoming request is unavailable. Because of that CM requests are always forwarded to init_net namespace. Now that we have the GID index available, introduce SGID index in incoming CM requests and refer to the netdevice of it. While at it fix some incorrect uses of init_net and make sure the rdma_create_id() function stores the VNET it is passed. Based on linux commit: cee104334c98dd04e9dd4d9a4fa4784f7f6aada9 MFC after: 3 days Approved by: re (gjb) Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=338541
* Implement get network interface by params function in ipoib.Hans Petter Selasky2018-09-073-39/+197
| | | | | | | | | | | | | | | Also fix the validate_ipv4_net_dev() and validate_ipv6_net_dev() functions which had source and destination addresses swapped, and didn't set the scope ID for IPv6 link-local addresses. This allows applications like krping to work using IPoIB devices. MFC after: 3 days Approved by: re (gjb) Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=338526
* ibcore: Fix endless loop in searching for matching VLAN deviceSlava Shwartsman2018-09-061-2/+2
| | | | | | | | | | | | | | | | In r337943 ifnet's if_pcp was set to the PCP value in use instead of IFNET_PCP_NONE. Current ibcore code assumes that if_pcp is IFNET_PCP_NONE with VLAN interfaces so it can identify prio-tagged traffic. Fix that by explicitly verifying that that the if_type is IFT_ETHER and not IFT_L2VLAN. MFC after: 3 days Approved by: re (Marius), hselasky (mentor), kib (mentor) Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=338491
* Only NULL check the VNET pointer when VIMAGE is enabled in ibcore.Hans Petter Selasky2018-07-311-1/+5
| | | | | | | | | | | Else a NULL VNET pointer should be ignored. This fixes address resolving when VIMAGE is disabled. MFC after: 3 days Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=336964
* Use __FBSDID() for RCS tags in ibcore.Hans Petter Selasky2018-07-1739-62/+118
| | | | | | | | MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=336391
* Remove blank line.Hans Petter Selasky2018-07-171-1/+0
| | | | | | | | MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=336390
* Add support for IPv6 multicast in ibcore.Hans Petter Selasky2018-07-171-1/+1
| | | | | | | | | | This change allows us to join IPv6 multicast networks. MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=336389
* Add support for RoCEv2 multicast in ibcore.Hans Petter Selasky2018-07-171-0/+13
| | | | | | | | | | | | | | | | When creating address handle from multicast GID, set MAC according to the appropriate formula instead of searching for it in the GID table: - For IPv4 multicast GID use ip_eth_mc_map(). - For IPv6 multicast GID use ipv6_eth_mc_map(). Linux commit: 9636a56fa864464896bf7d1272c701f2b9a57737 MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=336388
* Honor return status of ib_init_ah_from_mcmember() in ibcore.Hans Petter Selasky2018-07-171-4/+8
| | | | | | | | | | | | | | | The return status of ib_init_ah_from_mcmember() is ignored by cma_ib_mc_handler(). Honor it and return error event if ah attribute initialization failed. Linux commit: 6d337179f28cc50ddd7e224f677b4cda70b275fc MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=336387
* Honor port_num while resolving GID for IB link layer in ibcore.Hans Petter Selasky2018-07-171-14/+12
| | | | | | | | | | | | | | | | | | ah_attr contains the port number to which cm_id is bound. However, while searching for GID table for matching GID entry, the port number is ignored. This could cause the wrong GID to be used when the ah_attr is converted to an AH. Linux commit: 563c4ba3bd2b8b0b21c65669ec2226b1cfa1138b MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=336386
* Set IPv4 TOS and IPv6 traffic class field for RoCEv2 traffic in ibcore.Hans Petter Selasky2018-07-171-8/+3
| | | | | | | | | | | The current implementation assumes a static mapping between the TOS bits and the priority code point, PCP bits. MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=336385
* Fix for loopback detection in address resolve logic in ibcore.Hans Petter Selasky2018-07-171-0/+8
| | | | | | | | | | | When a loopback address is detected use the network interface which has the loopback flag set to trigger loopback logic in address resolve. MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=336384
* Check port number supplied by user verbs cmds in ibcore.Hans Petter Selasky2018-07-173-0/+31
| | | | | | | | | | | | | | | | | | | The ib_uverbs_create_ah() ind ib_uverbs_modify_qp() calls receive the port number from user input as part of its attributes and assumes it is valid. Down on the stack, that parameter is used to access kernel data structures. If the value is invalid, the kernel accesses memory it should not. To prevent this, verify the port number before using it. Linux commit: 5ecce4c9b17bed4dc9cb58bfb10447307569b77b a62ab66b13a0f9bcb17b7b761f6670941ed5cd62 5a7a88f1b488e4ee49eb3d5b82612d4d9ffdf2c3 MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=336383
* Depend on IPv6 stack to resolve link local address for RoCEv2 in ibcore.Hans Petter Selasky2018-07-171-30/+20
| | | | | | | | | | | | | | RoCEv1 does not use the IPv6 stack to resolve the link local DGID since it uses GID address. It forms the DMAC directly from the DGID. Linux commit: 56d0a7d9a0f045ee27a001762deac28c7d28e2e4 MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=336382
* Fix kernel crash during fail to initialize device in ibcore.Hans Petter Selasky2018-07-171-7/+21
| | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the kernel crash that occurs during ib_dealloc_device() called due to provider driver fails with an error after ib_alloc_device() and before it can register using ib_register_device(). This crashed seen in tha lab as below which can occur with any IB device which fails to perform its device initialization before invoking ib_register_device(). This patch avoids touching cache and port immutable structures if device is not yet initialized. It also releases related memory when cache and port immutable data structure initialization fails during register_device() state. Linux commit: 4be3a4fa51f432ef045546d16f25c68a1ab525b9 MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=336381
* Check AF family prior resolving address and introduce safer rdma_addr_size() ↵Hans Petter Selasky2018-07-173-13/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | variants in ibcore. Garbage supplied by user will cause to UCMA module provide zero memory size for memcpy(), because it wasn't checked, it will produce unpredictable results in rdma_resolve_addr(). There are several places in the ucma ABI where userspace can pass in a sockaddr but set the address family to AF_IB. When that happens, rdma_addr_size() will return a size bigger than sizeof struct sockaddr_in6, and the ucma kernel code might end up copying past the end of a buffer not sized for a struct sockaddr_ib. Fix this by introducing new variants int rdma_addr_size_in6(struct sockaddr_in6 *addr); int rdma_addr_size_kss(struct __kernel_sockaddr_storage *addr); that are type-safe for the types used in the ucma ABI and return 0 if the size computed is bigger than the size of the type passed in. We can use these new variants to check what size userspace has passed in before copying any addresses. Linux commit: 2975d5de6428ff6d9317e9948f0968f7d42e5d74 09abfe7b5b2f442a85f4c4d59ecf582ad76088d7 84652aefb347297aa08e91e283adf7b18f77c2d5 MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=336380
* Check for a cm_id->device in all user calls that need it in ibcore.Hans Petter Selasky2018-07-171-7/+24
| | | | | | | | | | | | | | | | | | This was done by auditing all callers of ucma_get_ctx and switching the ones that unconditionally touch ->device to ucma_get_ctx_dev. This covers a little less than half of the call sites. The 11 remaining call sites to ucma_get_ctx() were manually audited. Linux commit: 4b658d1bbc16605330694bb3ef2570c465ef383d 8b77586bd8fe600d97f922c79f7222c46f37c118 MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=336379
* Restore initialisation of ctx->uid in ucma_create_id() in ibcore.Hans Petter Selasky2018-07-171-0/+1
| | | | | | | | | | This fixes a regression issue after r336373. MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=336378
* Fix kernel panic while using XRC_TGT QP type in ibcore.Hans Petter Selasky2018-07-171-0/+3
| | | | | | | | | | | | | | | Attempt to modify XRC_TGT QP type from the user space (ibv_xsrq_pingpong invocation) will trigger the following kernel panic. It is caused by the fact that such QPs missed uobject initialization. Linux commit: f45765872e7aae7b81feb3044aaf9886b21885ef MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=336377
* Fix NULL pointer dereference during device removal in ibcore.Hans Petter Selasky2018-07-171-1/+1
| | | | | | | | | | | | | | | | | | As part of ib_uverbs_remove_one which might be triggered upon reset flow, we trigger IB_EVENT_DEVICE_FATAL event to userspace application. If device was removed after uverbs fd was opened but before ib_uverbs_get_context was called, the event file will be accessed before it was allocated, result in NULL pointer dereference: Linux commit: 870201f95fcbd19538aef630393fe9d583eff82e MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=336376
* Fix access to non-initialized CM_ID object in ibcore.Hans Petter Selasky2018-07-171-0/+3
| | | | | | | | | | | | | | The attempt to join multicast group without ensuring that CMA device exists will lead to the following crash reported by syzkaller. Linux commit: 7688f2c3bbf55e52388e37ac5d63ca471a7712e1 MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=336375
* Avoid that ib_drain_qp() triggers an out-of-bounds stack access in ibcore.Hans Petter Selasky2018-07-171-3/+8
| | | | | | | | | | | Linux commit: a1ae7d0345edd593d6725d3218434d903a0af95d MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=336374
* Ensure that CM_ID exists prior to access it in ibcore.Hans Petter Selasky2018-07-171-7/+9
| | | | | | | | | | | | | | | | | | | | Prior to access UCMA commands, the context should be initialized and connected to CM_ID with ucma_create_id(). In case user skips this step, he can provide non-valid ctx without CM_ID and cause to multiple NULL dereferences. Also there are situations where the create_id can be raced with other user access, ensure that the context is only shared to other threads once it is fully initialized to avoid the races. Linux commit: e8980d67d6017c8eee8f9c35f782c4bd68e004c9 MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=336373
* Add support for prio-tagged traffic for RDMA in ibcore.Hans Petter Selasky2018-07-173-7/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | When receiving a PCP change all GID entries are reloaded. This ensures the relevant GID entries use prio tagging, by setting VLAN present and VLAN ID to zero. The priority for prio tagged traffic is set using the regular rdma_set_service_type() function. Fake the real network device to have a VLAN ID of zero when prio tagging is enabled. This is logic is hidden inside the rdma_vlan_dev_vlan_id() function which must always be used to retrieve the VLAN ID throughout all of ibcore and the infiniband network drivers. The VLAN presence information then propagates through all of ibcore and so incoming connections will have the VLAN bit set. The incoming VLAN ID is then checked against the return value of rdma_vlan_dev_vlan_id(). MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=336372
* Set default GID type as RoCE when resolving RoCE route in ibcore.Hans Petter Selasky2018-07-171-2/+4
| | | | | | | | | | | | | cma_iboe_set_mgid() is updated to reflect the RoCEv2 GID check. Linux commit: 5c181bda77f409d89ad513528eccac5f3a416474 MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=336371
* Set RoCEv2 MGID according to spec in ibcore.Hans Petter Selasky2018-07-173-11/+20
| | | | | | | | | | | | | | | | | | | RoCEv2 Annex states that for RoCEv2 over IPv4, the corresponding IPv4 address is encoded into the GID according to the following rule: GID= :ffff:<IPv4 address> Remove the 0xff0e prefix for RoCEv2 packets with IPv4 and leave it zeroed and change rdma_is_multicast_addr() to consider the new logic. Linux commit: be1d325a335840a86c133a56c6a911c368bac0fd 1c3aea2bc8f0b2e5b57375ead40457ff75a3a2ec MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=336370
* For multicast functions in ibcore, verify that LIDs are multicast LIDs.Hans Petter Selasky2018-07-171-2/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | The Infiniband spec defines "A multicast address is defined by a MGID and a MLID" (section 10.5). Add check to verify that the MLID value is in the correct address range. RoCE Annex (A16.9.10/11) declares that during attach (detach) QP to a multicast group, if the QP is associated with a RoCE port, the multicast group MLID is unused and is ignored. During attach or detach multicast, when the QP is associated with a port, it is enough to check the port's link layer and validate the LID only if it is Infiniband. Otherwise, avoid validating the multicast LID. Linux commit: 8561eae60ff9417a50fa1fb2b83ae950dc5c1e21 5236333592244557a19694a51337df6ac018f0a7 MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=336369
* Fix for RDMA loopback over VLAN in ibcore.Hans Petter Selasky2018-07-173-85/+96
| | | | | | | | | | | | | | | | | | | | | Implement a more generic solution for detecting loopback. The problem was that the default netdevice was resolved for loopback also when VLAN was used. Use real network device instead of loopback device for bound device interface. How to test: ucmatose -b 127.0.0.1 -p 20090 ucmatose -s 5.6.5.1 -p 20090 Note that RDMA treats the IPv4 and IPv6 loopback addresses like any address. MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=336368
* Add native FreeBSD support for multicast in ibcore.Hans Petter Selasky2018-07-172-3/+42
| | | | | | | | | | | This change adds support for registering multicast addresses, both IPv4 and IPv6. MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=336367
* If the MGID/MLID pair is not on the list return an error in ibcore.Hans Petter Selasky2018-07-171-4/+9
| | | | | | | | | | | | | | | | | | | | A list of MGID/MLID pairs is built when doing a multicast attach. When the multicast detach is called, the list is searched, and regardless of the search outcome, the driver detach is called. If an MGID/MLID pair is not on the list, driver detach should not be called, and an error should be returned. Calling the driver without removing an MGID/MLID pair from the list can leave the core and driver out of sync. Linux commit: 20c7840a77ddcb2ed2fbd66e8197db2868495751 MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=336366
* Add lock to multicast handlers in ibcore.Hans Petter Selasky2018-07-172-2/+9
| | | | | | | | | | | | | | | | | | | | | | | When two handlers used the same object in the old schema, we blocked the process in the kernel. The new schema just returns -EBUSY. This could lead to different behaviour in applications between the old schema and the new schema. In most cases, using such handlers concurrently could lead to crashing the process. For example, if thread A destroys a QP and thread B modifies it, we could have the destruction happens before the modification. In this case, we are accessing freed memory which could lead to crashing the process. This is true for most cases. However, attaching and detaching a multicast address from QP concurrently is safe. Therefore, we preserve the original behaviour by adding a lock there. Linux commit: f48b726920d96dcd1860df06143bdea7d6d7dcc3 MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=336365
* Only update source address when resolving is successful in ibcore.Hans Petter Selasky2018-07-171-11/+20
| | | | | | | | | | | | | | | | | | | When resolving an IP address in ibcore, only update the source address upon normal completion. The ibcore address resolve function does not care about the scope ID value of the IPv6 link-local addresses and expects this information has already been extracted into the bound_dev_if field. Because the same IPv6 link-local address can exist on multiple interfaces the ibcore address resolver gets confused and returns ENETUNREACH. Instead of updating both source address and bound_dev_if just keep the address set to any address until resolving completes. For the sake of code symmetry a similar change has been applied to the IPv4 address resolve path. MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=336364
* Process address resolve requests at least one time per second in ibcore.Hans Petter Selasky2018-07-171-2/+4
| | | | | | | | | | | | | | | | When setting a large address resolve timeout it was observed that the address resolving would succeed at the timeout and not when the address was available. Make sure the address resolving requests are processed no slower than one time every second. While at it use "int" for jiffies instead of "unsigned long" to match FreeBSD ticks. MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=336363
* Revert r335094 and properly fix OFED build after r335053.Hans Petter Selasky2018-06-141-2/+1
| | | | | | | | MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=335123
* fix OFED build after r335053Matt Macy2018-06-131-1/+2
| | | | Notes: svn path=/head/; revision=335094
* UDP: further performance improvements on txMatt Macy2018-05-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* ifnet: Replace if_addr_lock rwlock with epoch + mutexMatt Macy2018-05-183-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Run on LLNW canaries and tested by pho@ gallatin: Using a 14-core, 28-HTT single socket E5-2697 v3 with a 40GbE MLX5 based ConnectX 4-LX NIC, I see an almost 12% improvement in received packet rate, and a larger improvement in bytes delivered all the way to userspace. When the host receiving 64 streams of netperf -H $DUT -t UDP_STREAM -- -m 1, I see, using nstat -I mce0 1 before the patch: InMpps OMpps InGbs OGbs err TCP Est %CPU syscalls csw irq GBfree 4.98 0.00 4.42 0.00 4235592 33 83.80 4720653 2149771 1235 247.32 4.73 0.00 4.20 0.00 4025260 33 82.99 4724900 2139833 1204 247.32 4.72 0.00 4.20 0.00 4035252 33 82.14 4719162 2132023 1264 247.32 4.71 0.00 4.21 0.00 4073206 33 83.68 4744973 2123317 1347 247.32 4.72 0.00 4.21 0.00 4061118 33 80.82 4713615 2188091 1490 247.32 4.72 0.00 4.21 0.00 4051675 33 85.29 4727399 2109011 1205 247.32 4.73 0.00 4.21 0.00 4039056 33 84.65 4724735 2102603 1053 247.32 After the patch InMpps OMpps InGbs OGbs err TCP Est %CPU syscalls csw irq GBfree 5.43 0.00 4.20 0.00 3313143 33 84.96 5434214 1900162 2656 245.51 5.43 0.00 4.20 0.00 3308527 33 85.24 5439695 1809382 2521 245.51 5.42 0.00 4.19 0.00 3316778 33 87.54 5416028 1805835 2256 245.51 5.42 0.00 4.19 0.00 3317673 33 90.44 5426044 1763056 2332 245.51 5.42 0.00 4.19 0.00 3314839 33 88.11 5435732 1792218 2499 245.52 5.44 0.00 4.19 0.00 3293228 33 91.84 5426301 1668597 2121 245.52 Similarly, netperf reports 230Mb/s before the patch, and 270Mb/s after the patch Reviewed by: gallatin Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D15366 Notes: svn path=/head/; revision=333813
* Improve copy-and-pasted versions of SIOCGIFADDR.Brooks Davis2018-03-271-7/+2
| | | | | | | | | | | | | | The original implementation used a reference to ifr_data and a cast to do the equivalent of accessing ifr_addr. This was copied multiple times since 1996. Approved by: kib MFC after: 1 week Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14873 Notes: svn path=/head/; revision=331648
* Remove redundant integer cast in ibcore. The "ref_count" field alreadyHans Petter Selasky2018-03-191-1/+1
| | | | | | | | | | has integer type. MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=331204
* Make sure VNET is set when calling sa6_recoverscope() in ibcore.Hans Petter Selasky2018-03-071-2/+8
| | | | | | | | | | Else panic will occur when VIMAGE is enabled. MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=330586
* Define values instead of using hardcoding.Hans Petter Selasky2018-03-071-14/+24
| | | | | | | | MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=330585
* Recover IPv6 scope ID for multicast link-local addresses as well asHans Petter Selasky2018-03-071-8/+9
| | | | | | | | | | unicast link-local addresses. MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=330584
* Embed the IPv6 scope ID before calling rtalloc1() in ibcore.Hans Petter Selasky2018-03-071-0/+7
| | | | | | | | | | Else rtalloc1() will resolve to the loopback interface. MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=330583