From: Long Li
When a VF is being exposed form the kernel, it should be marked as "slave"
before exposing to the user-mode. The VF is not usable without netvsc running
as master. The user-mode should never see a VF without the "slave" flag.
This commit moves the code of setting the slave flag to
From: Long Li
When a VF is being exposed form the kernel, it should be marked as "slave"
before exposing to the user-mode. The VF is not usable without netvsc running
as master. The user-mode should never see a VF without the "slave" flag.
This commit moves the code of setting the slave flag to
From: Long Li
When a VF is being exposed form the kernel, it should be marked as "slave"
before exposing to the user-mode. The VF is not usable without netvsc running
as master. The user-mode should never see a VF without the "slave" flag.
An example of a user-mode program depending on this flag
From: Long Li
When a VF is being exposed form the kernel, it should be marked as "slave"
before exposing to the user-mode. The VF is not usable without netvsc running
as master. The user-mode should never see a VF without the "slave" flag.
An example of a user-mode program depending on this flag
From: Long Li
This patchset add support for registering a RDMA device handle with SoC
for support of upcoming RC queue pairs and CQ interrupts.
This patchset is partially based on Ajay Sharma's work:
https://lore.kernel.org/netdev/1697494322-26814-1-git-send-email-sharmaa...@linuxonhyperv.com
L
From: Long Li
Create the RDMA device handle with the SoC using the management EQ created
earlier.
Signed-off-by: Long Li
---
drivers/infiniband/hw/mana/device.c | 10 --
drivers/infiniband/hw/mana/main.c| 51
drivers/infiniband/hw/mana/mana_ib.h | 30 +
From: Long Li
Before the software can create an RDMA adapter handle with SoC, it needs to
create EQs for processing SoC events from RDMA device. Because MSI-X
vectors are shared between MANA Ethernet device and RDMA device, this
patch adds support to share EQs on MSI-X vectors and creates managem
From: Long Li
MANA hardware supports RC queue pairs over RoCE. Software needs to register
with the RDMA management interface on the SoC to access this feature.
Signed-off-by: Long Li
---
drivers/infiniband/hw/mana/device.c | 25 ---
drivers/infiniband/hw/mana/main.c
From: Long Li
With RDMA device handle created, use it to query on hardware capabilities
and cache this information for future query requests to the driver.
Signed-off-by: Long Li
---
drivers/infiniband/hw/mana/cq.c | 2 +-
drivers/infiniband/hw/mana/device.c | 6 +++
drivers/infiniband
From: Long Li
This patchset add support for registering a RDMA device with SoC for
support of querying device capabilities, upcoming RC queue pairs and
CQ interrupts.
This patchset is partially based on Ajay Sharma's work:
https://lore.kernel.org/netdev/1697494322-26814-1-git-send-email-sharmaa.
From: Long Li
Software client needs to register with the RDMA management interface on
the SoC to access more features, including querying device capabilities
and RC queue pair.
Signed-off-by: Long Li
---
drivers/infiniband/hw/mana/device.c | 24 +++
drivers/infiniband
From: Long Li
With RDMA device registered, use it to query on hardware capabilities and
cache this information for future query requests to the driver.
Signed-off-by: Long Li
---
drivers/infiniband/hw/mana/cq.c | 2 +-
drivers/infiniband/hw/mana/device.c | 7 +++
drivers/infiniband/hw/
From: Long Li
At probing time, the MANA core code allocates EQs for supporting interrupts
on Ethernet queues. The same interrupt mechanisum is used by RAW QP.
Use the same EQs for delivering interrupts on the CQ for the RAW QP.
Signed-off-by: Long Li
---
drivers/infiniband/hw/mana/cq.c |
From: Long Li
This patchset add support for registering a RDMA device with SoC for
support of querying device capabilities, upcoming RC queue pairs and
CQ interrupts.
This patchset is partially based on Ajay Sharma's work:
https://lore.kernel.org/netdev/1697494322-26814-1-git-send-email-sharmaa.
From: Long Li
Software client needs to register with the RDMA management interface on
the SoC to access more features, including querying device capabilities
and RC queue pair.
Signed-off-by: Long Li
---
drivers/infiniband/hw/mana/device.c | 24 +++
drivers/infiniband
From: Long Li
With RDMA device registered, use it to query on hardware capabilities and
cache this information for future query requests to the driver.
Signed-off-by: Long Li
---
drivers/infiniband/hw/mana/cq.c | 2 +-
drivers/infiniband/hw/mana/device.c | 7 +++
drivers/infiniband/hw/
From: Long Li
At probing time, the MANA core code allocates EQs for supporting interrupts
on Ethernet queues. The same interrupt mechanisum is used by RAW QP.
Use the same EQs for delivering interrupts on the CQ for the RAW QP.
Signed-off-by: Long Li
---
Change in v3:
Removed unused varaible m
From: Long Li
This patchset add support for registering a RDMA device with SoC for
support of querying device capabilities, upcoming RC queue pairs and
CQ interrupts.
This patchset is partially based on Ajay Sharma's work:
https://lore.kernel.org/netdev/1697494322-26814-1-git-send-email-sharmaa.
From: Long Li
Software client needs to register with the RDMA management interface on
the SoC to access more features, including querying device capabilities
and RC queue pair.
Signed-off-by: Long Li
---
drivers/infiniband/hw/mana/device.c | 24 +++
drivers/infiniband
From: Long Li
With RDMA device registered, use it to query on hardware capabilities and
cache this information for future query requests to the driver.
Signed-off-by: Long Li
---
Change in v4:
On query device failure, goto deregister_device, not ib_free_device
Change function name mana_ib_quer
From: Long Li
At probing time, the MANA core code allocates EQs for supporting interrupts
on Ethernet queues. The same interrupt mechanisum is used by RAW QP.
Use the same EQs for delivering interrupts on the CQ for the RAW QP.
Signed-off-by: Long Li
---
Change in v3:
Removed unused varaible
From: Long Li
After napi_complete_done() is called, another NAPI may be running on
another CPU and ring the doorbell before the current CPU does. When
combined with unnecessary rings when there is no need to ARM the CQ, this
triggers error paths in the hardware.
Fix this by always ring the doorb
From: Long Li
After napi_complete_done() is called when NAPI is polling in the current
process context, another NAPI may be scheduled and start running in
softirq on another CPU and may ring the doorbell before the current CPU
does. When combined with unnecessary rings when there is no need to ar
From: Long Li
After napi_complete_done() is called when NAPI is polling in the current
process context, another NAPI may be scheduled and start running in
softirq on another CPU and may ring the doorbell before the current CPU
does. When combined with unnecessary rings when there is no need to ar
From: Long Li
hv_netvsc uses a subset of bonding features in that the master always
has only one active slave. But it never properly setup those flags.
Other kernel APIs (e.g those in "include/linux/netdevice.h") check for
IFF_MASTER, IFF_SLAVE and IFF_BONDING for determing if those are used
in
From: Long Li
mana_ib should not set the net device on its master device when it's
bonded. The main purpose of doing this is to get the correct GID, however
it makes it impossible to unload the master device from kernel, and move
to user-space (e.g. DPDK usage).
Fix this by using its VF device a
From: Long Li
add_cmd_upper_ips() is used to add upper IPs on a bonded slave. Its
filter function should be set to the same as upper_ips_del_cmd() in that
it looks for upper netdevs for GIDs.
Signed-off-by: Long Li
---
drivers/infiniband/core/roce_gid_mgmt.c | 2 +-
1 file changed, 1 insertion
From: Long Li
When a bonded slave is unlikned, the current code doesn't add a default
GID for the new unlinked netdev.
Add a default GID for the netdev.
Signed-off-by: Long Li
---
drivers/infiniband/core/roce_gid_mgmt.c | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)
diff
From: Long Li
Filter function is_eth_port_of_netdev_filter() is used to determine if
a netdev should be used for assigning its IP to GID cache. This function
should filter out bonded slave netdevs. For bonded slaves, their master
netdevs should be used to cache GIDs.
Signed-off-by: Long Li
---
From: Long Li
When a bonded slave is unlinked, the current code doesn't add a default
GID for the new unlinked netdev.
Add a default GID for the netdev.
Signed-off-by: Long Li
---
drivers/infiniband/core/roce_gid_mgmt.c | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)
diff
From: Long Li
When populating GID cache for net devices in a bonded setup, it should use the
master device's
address whenever applicable.
The current code has some incorrect behaviors when dealing with bonded devices:
1. It adds IP of bonded slave to the GID cache when the device is already bon
From: Long Li
add_cmd_upper_ips() in ndev_event_link() is used to add upper IPs on a
bonded slave. Its filter function should be set to the same as
upper_ips_del_cmd() in ndev_event_unlink, in that they both look for upper
netdevs for GIDs.
Signed-off-by: Long Li
---
drivers/infiniband/core/ro
From: Long Li
Filter function is_eth_port_of_netdev_filter() is used to determine if a
netdev should be used for assigning its IP to GID cache. This function
should filter out bonded slave netdevs.
For bonded slaves, their master netdevs should be used to cache GIDs.
Signed-off-by: Long Li
---
From: Long Li
Ajay is no longer working on the MANA RDMA driver.
Konstantin Taranov has made significant contributions to implementing RC
QP in both kernel and user-mode.
He will take the responsibility of fixing bugs, reviewing patches and
developing new features for MANA RDMA driver.
Signed-
From: Long Li
On Hyper-V platforms, a slave VF netdev always bonds to Netvsc and remains
as Netvsc's only active slave as long as the slave device is present. This
behavior is the same as a bonded device, but it's not user-configurable.
Some kernel APIs (e.g those in "include/linux/netdevice.h")
From: Long Li
On Hyper-V platforms, a slave VF netdev always bonds to Netvsc and remains
as Netvsc's only active slave as long as the slave device is present. This
behavior is not user-configurable.
Other kernel APIs (e.g those in "include/linux/netdevice.h") check for
IFF_MASTER, IFF_SLAVE and
From: Long Li
In StorVSC, payload->range.len is used to indicate if this SCSI command
carries payload. This data is allocated as part of the private driver
data by the upper layer and may get passed to lower driver uninitialized.
For example, the SCSI error handling mid layer may send TEST_UNIT_
From: Long Li
In StorVSC, payload->range.len is used to indicate if this SCSI command
carries payload. This data is allocated as part of the private driver
data by the upper layer and may get passed to lower driver uninitialized.
If a SCSI command doesn't carry payload, the driver may use this v
From: Long Li
Interrupt and monitor pages should be in Hyper-V page size (4k bytes).
This can be different to the system page size.
Cc: sta...@vger.kernel.org
Fixes: 95096f2fbd10 ("uio-hv-generic: new userspace i/o driver for VMBus")
Signed-off-by: Long Li
---
drivers/uio/uio_hv_generic.c | 4
From: Long Li
There are use cases that interrupt and monitor pages are mapped to
user-mode through UIO, they need to be system page aligned. Some Hyper-V
allocation APIs introduced earlier broke those requirements.
Fix those APIs by always allocating Hyper-V page at system page boundaries.
Cc:
From: Long Li
UIO framework requires the device memory aligned to page boundary.
Hyper-V may allocate some memory that is Hyper-V page aligned (4k)
but not system page aligned.
Fix this by having Hyper-V always allocate those pages on system page
boundary and expose them to user-mode.
Change in
From: Long Li
Interrupt and monitor pages should be in Hyper-V page size (4k bytes).
This can be different to the system page size.
This size is read and used by the user-mode program to determine the
mapped data region. An example of such user-mode program is the VMBUS
driver in DPDK.
Cc: sta.
From: Long Li
Following the ring header, the ring data should align to system page
boundary. Adjust the size if necessary.
Cc: sta...@vger.kernel.org
Fixes: 95096f2fbd10 ("uio-hv-generic: new userspace i/o driver for VMBus")
Signed-off-by: Long Li
---
drivers/uio/uio_hv_generic.c | 6 ++
1
From: Long Li
There are use cases that interrupt and monitor pages are mapped to
user-mode through UIO, they need to be system page aligned. Some Hyper-V
allocation APIs introduced earlier broke those requirements.
Fix those APIs by always allocating Hyper-V page at system page boundaries.
Cc:
From: Long Li
Those helpers are simply wrappers for page allocations.
Signed-off-by: Long Li
---
drivers/hv/connection.c| 23 +--
drivers/hv/hv_common.c | 24
include/asm-generic/mshyperv.h | 4
3 files changed, 17 insertions(+
From: Long Li
There are use cases that interrupt and monitor pages are mapped to
user-mode through UIO, so they need to be system page aligned. Some
Hyper-V allocation APIs introduced earlier broke those requirements.
Fix this by using page allocation functions directly for interrupt
and monitor
From: Long Li
UIO framework requires the device memory aligned to page boundary.
Hyper-V may allocate some memory that is Hyper-V page aligned (4k)
but not system page aligned.
Fix this by having Hyper-V always allocate those pages on system page
boundary and expose them to user-mode.
Change in
From: Long Li
Following the ring header, the ring data should align to system page
boundary. Adjust the size if necessary.
Cc: sta...@vger.kernel.org
Fixes: 95096f2fbd10 ("uio-hv-generic: new userspace i/o driver for VMBus")
Signed-off-by: Long Li
---
drivers/uio/uio_hv_generic.c | 3 +++
1 fi
From: Long Li
Interrupt and monitor pages should be in Hyper-V page size (4k bytes).
This can be different from the system page size.
This size is read and used by the user-mode program to determine the
mapped data region. An example of such user-mode program is the VMBus
driver in DPDK.
Cc: st
From: Long Li
There are no users for those functions, remove them.
Signed-off-by: Long Li
---
drivers/hv/hv_common.c | 39 --
include/asm-generic/mshyperv.h | 4
2 files changed, 43 deletions(-)
diff --git a/drivers/hv/hv_common.c b/drivers/hv/hv_
From: Long Li
To prepare for removal of hv_alloc_* and hv_free* functions, use
kzalloc/kfree directly for panic reporting page.
Signed-off-by: Long Li
---
drivers/hv/hv_common.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/hv/hv_common.c b/drivers/hv/hv_com
From: Long Li
UIO framework requires the device memory aligned to page boundary.
Hyper-V may allocate some memory that is Hyper-V page aligned (4k)
but not system page aligned.
Fix this by having Hyper-V always allocate those pages on system page
boundary and expose them to user-mode.
Long Li (
From: Long Li
Currently netvsc only sets the SLAVE flag on VF netdev when it's bonded. It
should also set the MASTER flag on itself and clear all those flags when
the VF is unbonded.
Signed-off-by: Long Li
---
drivers/net/hyperv/netvsc_drv.c | 6 ++
1 file changed, 6 insertions(+)
diff --
From: Long Li
Hyper-V may offer a non latency sensitive device with subchannels without
monitor bit enabled. The decision is entirely on the Hyper-V host not
configurable within guest.
When a device has subchannels, also signal events for the subchannel
if its monitor bit is disabled.
Signed-of
From: Long Li
When running under Hyper-V, the master device to the RDMA device is always
bonded to this RDMA device if it's present in the kernel. This is not
user-configurable.
The master device can be unbind/bind from the kernel. During those events,
the RDMA device should set to the current n
From: Long Li
When running under Hyper-V, the master device to the RDMA device is always
bonded to this RDMA device. This is not user-configurable.
The master device can be unbind/bind from the kernel. During those events,
the RDMA device should set to the current netdev to relect the change of
From: Long Li
Change mana_get_primary_netdev_rcu() to mana_get_primary_netdev(), and
return the ndev with refcount held. The caller is responsible for dropping
the refcount by calling dev_put().
Signed-off-by: Long Li
---
drivers/infiniband/hw/mana/device.c | 7 +++
drivers/net/
From: Long Li
When running under Hyper-V, the master device to the RDMA device is always
bonded to this RDMA device. This is not user-configurable.
The master device can be unbind/bind from the kernel. During those events,
the RDMA device should set to the current netdev to relect the change of
From: Long Li
Change mana_get_primary_netdev_rcu() to mana_get_primary_netdev(), and
return the ndev with refcount held. The caller is responsible for dropping
the refcount.
Also drop the check for IFF_SLAVE as it is not necessary if the upper
device is present.
Signed-off-by: Long Li
---
Chan
From: Long Li
When running under Hyper-V, the master device to the RDMA device is always
bonded to this RDMA device. This is not user-configurable.
The master device can be unbind/bind from the kernel. During those events,
the RDMA device should set to the current netdev to reflect the change of
From: Long Li
Hyper-V may offer a non latency sensitive device with subchannels without
monitor bit enabled. The decision is entirely on the Hyper-V host not
configurable within guest.
When a device has subchannels, also signal events for the subchannel
if its monitor bit is disabled.
This patc
From: Long Li
Change mana_get_primary_netdev_rcu() to mana_get_primary_netdev(), and
return the ndev with refcount held. The caller is responsible for dropping
the refcount.
Also drop the check for IFF_SLAVE as it is not necessary if the upper
device is present.
Signed-off-by: Long Li
---
Chan
From: Long Li
When running under Hyper-V, the master device to the RDMA device is always
bonded to this RDMA device. This is not user-configurable.
The master device can be unbind/bind from the kernel. During those events,
the RDMA device should set to the current netdev to reflect the change of
From: Long Li
Change mana_get_primary_netdev_rcu() to mana_get_primary_netdev(), and
return the ndev with refcount held. The caller is responsible for dropping
the refcount.
Also drop the check for IFF_SLAVE as it is not necessary if the upper
device is present.
Signed-off-by: Long Li
---
Chan
From: Long Li
When running under Hyper-V, the master device to the RDMA device is always
bonded to this RDMA device. This is not user-configurable.
The master device can be unbind/bind from the kernel. During those events,
the RDMA device should set to the current netdev to reflect the change of
From: Long Li
Hyper-V may offer a non latency sensitive device with subchannels without
monitor bit enabled. The decision is entirely on the Hyper-V host not
configurable within guest.
When a device has subchannels, also signal events for the subchannel
if its monitor bit is disabled.
Signed-of
From: Long Li
MANA supports RDMA in PF mode. The driver should record the doorbell
physical address when in PF mode.
The doorbell physical address is used by the RDMA driver to map
doorbell pages of the device to user-mode applications through RDMA
verbs interface. In the past, they have been ma
From: Long Li
MANA supports RDMA in PF mode. The driver should record the doorbell
physical address when in PF mode.
The doorbell physical address is used by the RDMA driver to map
doorbell pages of the device to user-mode applications through RDMA
verbs interface. In the past, they have been ma
From: Long Li
MANA supports RDMA in PF mode. The driver should record the doorbell
physical address when in PF mode.
Signed-off-by: Long Li
---
drivers/net/ethernet/microsoft/mana/gdma_main.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ethernet/microsoft/mana/gdma_main.c
69 matches
Mail list logo