History log of /freebsd/sys/dev/hyperv/netvsc/if_hn.c (Results 1 – 25 of 118)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 0fc7bdc9 29-Nov-2024 Richard Scheffenegger <rscheff@FreeBSD.org>

tcp: extend the use of the th_flags accessor function

Formally, there are 12 bits for TCP header flags.
Use the accessor functions in more (kernel) places.

No functional change.

Reviewed By: cc, #

tcp: extend the use of the th_flags accessor function

Formally, there are 12 bits for TCP header flags.
Use the accessor functions in more (kernel) places.

No functional change.

Reviewed By: cc, #transport, cy, glebius, #iflib, kbowling
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D47063

show more ...


Revision tags: release/14.2.0, release/13.4.0
# d1bdc282 23-Jul-2024 Bjoern A. Zeeb <bz@FreeBSD.org>

Deprecate contigfree(9) in favour of free(9)

As of 9e6544dd6e02c46b805d11ab925c4f3b18ad7a4b contigfree(9) is no longer
needed and should not be used anymore. We leave a wrapper for 3rd party
code i

Deprecate contigfree(9) in favour of free(9)

As of 9e6544dd6e02c46b805d11ab925c4f3b18ad7a4b contigfree(9) is no longer
needed and should not be used anymore. We leave a wrapper for 3rd party
code in at least 15.x but remove (almost) all other cases from the tree.

This leaves one use of contigfree(9) untouched; that was the original
trigger for 9e6544dd6e02 and is handled in D45813 (to be committed
seperately later).

Sponsored by: The FreeBSD Foundation
Reviewed by: markj, kib
Tested by: pho (10h stress test run)
Differential Revision: https://reviews.freebsd.org/D46099

show more ...


Revision tags: release/14.1.0
# 63a7c4be 14-Mar-2024 Mark Peek <mp@FreeBSD.org>

hyperv/hn: Don't return error when setting media to autoselect

Setting media to autoselect would always return EOPNOTSUPP.
As autoselect is the only valid media, this change now returns
success inst

hyperv/hn: Don't return error when setting media to autoselect

Setting media to autoselect would always return EOPNOTSUPP.
As autoselect is the only valid media, this change now returns
success instead.

PR: 264253
Reported by: Prakash Shiva <prakashs0234@gmail.com>
Reviewed by: Dexuan Cui <decui microsoft com>, whu
Approved by: whu
MFC after: 2 weeks

show more ...


Revision tags: release/13.3.0
# 61b88a23 24-Feb-2024 Gordon Bergling <gbe@FreeBSD.org>

if_hn: Fix two typos in source code comments

- s/managment/management/
- s/transacion/transaction/

Obtained from: NetBSD
MFC after: 3 days


Revision tags: release/14.0.0
# 8f31b879 04-Oct-2023 Justin Hibbits <jhibbits@FreeBSD.org>

bpf: Add IfAPI analogue for bpf_peers_present()

An interface's bpf could feasibly not exist, in which case
bpf_peers_present() would panic from a NULL pointer dereference. Solve
this by adding a ne

bpf: Add IfAPI analogue for bpf_peers_present()

An interface's bpf could feasibly not exist, in which case
bpf_peers_present() would panic from a NULL pointer dereference. Solve
this by adding a new IfAPI that could deal with a NULL bpf, if such
could occur in the network stack.

Reviewed by: zlei
Sponsored by: Juniper Networks, Inc.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D42082

show more ...


# 5e444dee 13-Oct-2023 Justin Hibbits <jhibbits@FreeBSD.org>

Revert "bpf: Add IfAPI analogue for bpf_peers_present()"

This reverts commit c81dd8e5fe72d0c7ec055c8621bb2da3a3627abf.

Commit message needs revised.


# c81dd8e5 04-Oct-2023 Justin Hibbits <jhibbits@FreeBSD.org>

bpf: Add IfAPI analogue for bpf_peers_present()

An interface's bpf could feasibly not exist, in which case
bpf_peers_present() would panic from a NULL pointer dereference. Solve
this by adding a ne

bpf: Add IfAPI analogue for bpf_peers_present()

An interface's bpf could feasibly not exist, in which case
bpf_peers_present() would panic from a NULL pointer dereference. Solve
this by adding a new IfAPI that includes a NULL check. Since this API
is used in only a handful of locations, it reduces the the NULL check
scope over inserting the check into bpf_peers_present().

Sponsored by: Juniper Networks, Inc.
MFC after: 1 week

show more ...


# 289ba6b8 04-Sep-2023 Wei Hu <whu@FreeBSD.org>

Hyper-V: hn: use VF's capabilities when it is attached

Current code in hn/netvsc tries to merge (logical AND) VF and
its own capability bits when a VF is attached. This results in
losing some key V

Hyper-V: hn: use VF's capabilities when it is attached

Current code in hn/netvsc tries to merge (logical AND) VF and
its own capability bits when a VF is attached. This results in
losing some key VF features, especially in tx path. For example,
the VF's txcsum, rxcsum or tso bits could be lost if any of
these are not in hn/netvsc's own capablility field.

Actually when VF is attached, hn just needs to use VF's caps
as all the tx packets would be forwarded to the VF interface.
Fix this problem by doing so.

Reported by: whu
Tested by: whu
MFC after: 3 days
Sponsored by: Microsoft

show more ...


# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 62f9bcf2 22-May-2023 Andrew Turner <andrew@FreeBSD.org>

Switch to contigmalloc in the Hyper-V code

In the Hyper-V drivers we need to allocate buffers shared between the
host and guest. This memory has been allocated with bus_dma, however
it doesn't use t

Switch to contigmalloc in the Hyper-V code

In the Hyper-V drivers we need to allocate buffers shared between the
host and guest. This memory has been allocated with bus_dma, however
it doesn't use this correctly, e.g. it is missing calls to
bus_dmamap_sync. Along with this on arm64 we need this memory to be
mapped with the correct memory type that bus_dma may not use.

Switch to contigmalloc to allocate this memory as this will correctly
allocate cacheable memory.

Reviewed by: Souradeep Chakrabarti <schakrabarti@microsoft.com>
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D40227

show more ...


Revision tags: release/13.2.0, release/12.4.0
# 4db5958a 26-Sep-2022 Justin Hibbits <jhibbits@FreeBSD.org>

Mechanically convert if_hn(4) to IfAPI

Reviewed by: zlei
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37855


# b02a3977 23-Jun-2022 Elliott Mitchell <ehem+freebsd@m5p.com>

hyperv: purge EOL release compatibility

Remove FreeBSD 11 and earlier support

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/603
Differential Revision: https://reviews.f

hyperv: purge EOL release compatibility

Remove FreeBSD 11 and earlier support

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/603
Differential Revision: https://reviews.freebsd.org/D35560

show more ...


Revision tags: release/13.1.0
# c1cef544 07-May-2022 John Baldwin <jhb@FreeBSD.org>

hyperv: Remove unused devclass arguments to DRIVER_MODULE.


# 80c3eb7b 15-Mar-2022 Wei Hu <whu@FreeBSD.org>

Hyper-V: hn: add switch to turn on and off RSC

Currently RSC offloading is enabled by default.
With this new change rsc will be disabled by default.
By using sysctl we can enable and disable it.

Re

Hyper-V: hn: add switch to turn on and off RSC

Currently RSC offloading is enabled by default.
With this new change rsc will be disabled by default.
By using sysctl we can enable and disable it.

Reviewed by: whu
Signed-off-by: Souradeep Chakrabarti <schakrabarti@microsoft.com>
Fixes: a491581f3f8df Enable vSwitch RSC support in hn netvsc driver
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D34507

show more ...


# a0f49d67 10-Dec-2021 Mateusz Guzik <mjg@FreeBSD.org>

hn: plug set-but-not-unused vars

Sponsored by: Rubicon Communications, LLC ("Netgate")


# d74b7bae 04-Dec-2021 Gleb Smirnoff <glebius@FreeBSD.org>

ifnet_byindex() actually requires network epoch

Sweep over potentially unsafe calls to ifnet_byindex() and wrap them
in epoch. Most of the code touched remains unsafe, as the returned
pointer is be

ifnet_byindex() actually requires network epoch

Sweep over potentially unsafe calls to ifnet_byindex() and wrap them
in epoch. Most of the code touched remains unsafe, as the returned
pointer is being used after epoch exit. Mark that with a comment.

Validate the index argument inside the function, reducing argument
validation requirement from the callers and making V_if_index
private to if.c.

Reviewed by: melifaro
Differential revision: https://reviews.freebsd.org/D33263

show more ...


# db0ac6de 02-Dec-2021 Cy Schubert <cy@FreeBSD.org>

Revert "wpa: Import wpa_supplicant/hostapd commit 14ab4a816"

This reverts commit 266f97b5e9a7958e365e78288616a459b40d924a, reversing
changes made to a10253cffea84c0c980a36ba6776b00ed96c3e3b.

A mism

Revert "wpa: Import wpa_supplicant/hostapd commit 14ab4a816"

This reverts commit 266f97b5e9a7958e365e78288616a459b40d924a, reversing
changes made to a10253cffea84c0c980a36ba6776b00ed96c3e3b.

A mismerge of a merge to catch up to main resulted in files being
committed which should not have been.

show more ...


# 266f97b5 02-Dec-2021 Cy Schubert <cy@FreeBSD.org>

wpa: Import wpa_supplicant/hostapd commit 14ab4a816

This is the November update to vendor/wpa committed upstream 2021-11-26.

MFC after: 1 month


Revision tags: release/12.3.0
# 8f82dc8d 30-Apr-2021 Don Morris <dgmorris@earthlink.net>

hyperv: Flag hn and storvsc statistics with CTLFLAG_STATS.

Reviewed by: vangyzen, whu, bdrewery
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D30060


# b15a632c 30-Nov-2021 Gordon Bergling <gbe@FreeBSD.org>

if_hn: Fix a few typos in comments and a sysctl description

- s/segement/segment/

MFC after: 3 days


# 26d79d40 26-Aug-2021 Michael Tuexen <tuexen@FreeBSD.org>

Hyper-V: hn: Enter network epoch when required

PR: 254695


Revision tags: release/13.0.0
# 805dbff6 15-Mar-2021 Wei Hu <whu@FreeBSD.org>

Hyper-V: hn: Initialize the internal field of per packet info on tx path

The RSC support feature introduced a bit field "rm_internal" in
struct rndis_pktinfo with total size unchanged.

The guest do

Hyper-V: hn: Initialize the internal field of per packet info on tx path

The RSC support feature introduced a bit field "rm_internal" in
struct rndis_pktinfo with total size unchanged.

The guest does not use this field in the tx path. However we need to
initialize it to zero in case older hosts which are not aware of this
field.

Fixes: a491581f ("Hyper-V: hn: Enable vSwitch RSC support")
MFC after: 2 weeks
Sponsored by: Microsoft

show more ...


# a491581f 12-Mar-2021 Wei Hu <whu@FreeBSD.org>

Hyper-V: hn: Enable vSwitch RSC support in hn netvsc driver

Receive Segment Coalescing (RSC) in the vSwitch is a feature available in
Windows Server 2019 hosts and later. It reduces the per packet p

Hyper-V: hn: Enable vSwitch RSC support in hn netvsc driver

Receive Segment Coalescing (RSC) in the vSwitch is a feature available in
Windows Server 2019 hosts and later. It reduces the per packet processing
overhead by coalescing multiple TCP segments when possible. This happens
mostly when TCP traffics are among different guests on same host.
This patch adds netvsc driver support for this feature.

The patch also updates NVS version to 6.1 as needed for RSC
enablement.

MFC after: 2 weeks
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D29075

show more ...


# 80f39bd9 24-Feb-2021 Wei Hu <whu@FreeBSD.org>

Hyper-V: hn: Store host hash value in flowid

When rx packet contains hash value sent from host, store it in
the mbuf's flowid field so when the same mbuf is on the tx path,
the hash value can be use

Hyper-V: hn: Store host hash value in flowid

When rx packet contains hash value sent from host, store it in
the mbuf's flowid field so when the same mbuf is on the tx path,
the hash value can be used by the host to determine the outgoing
network queue.

MFC after: 2 weeks
Sponsored by: Microsoft

show more ...


Revision tags: release/12.2.0
# b3460f44 15-Oct-2020 Wei Hu <whu@FreeBSD.org>

Hyper-V: hn: Relinquish cpu in HN_LOCK to avoid deadlock

The try lock loop in HN_LOCK put the thread spinning on cpu if the lock
is not available. It is possible to cause deadlock if the thread hold

Hyper-V: hn: Relinquish cpu in HN_LOCK to avoid deadlock

The try lock loop in HN_LOCK put the thread spinning on cpu if the lock
is not available. It is possible to cause deadlock if the thread holding
the lock is sleeping. Relinquish the cpu to work around this problem even
it doesn't completely solve the issue. The priority inversion could cause
the livelock no matter how less likely it could happen. A more complete
solution may be needed in the future.

Reported by: Microsoft, Netapp
MFC after: 2 weeks
Sponsored by: Microsoft

show more ...


12345