[PATCH v10 20/20] dlb: queue map/unmap workqueue

2021-02-10 Thread Mike Ximing Chen
Mike Ximing Chen Reviewed-by: Björn Töpel Reviewed-by: Dan Williams --- drivers/misc/dlb/dlb_main.c | 5 ++ drivers/misc/dlb/dlb_main.h | 2 + drivers/misc/dlb/dlb_resource.c | 110 +++- drivers/misc/dlb/dlb_resource.h | 2 + 4 files changed, 117 insertions(

[PATCH v10 16/20] dlb: add port map/unmap state machine

2021-02-10 Thread Mike Ximing Chen
quests to map a queue and then immediately requests to unmap it -- the driver will coalesce or cancel outstanding operations. Signed-off-by: Gage Eads Signed-off-by: Mike Ximing Chen Reviewed-by: Björn Töpel Reviewed-by: Dan Williams --- drivers/misc/dlb/dlb_resource.c | 433 ++

[PATCH v10 17/20] dlb: add static queue map register operations

2021-02-10 Thread Mike Ximing Chen
e "dynamic" operation, when traffic is flowing in the device, will be added in a later commit.) Signed-off-by: Gage Eads Signed-off-by: Mike Ximing Chen Reviewed-by: Björn Töpel Reviewed-by: Dan Williams --- drivers/misc/dlb/dlb_resource.c | 144 +++- 1 file cha

[PATCH v10 18/20] dlb: add dynamic queue map register operations

2021-02-10 Thread Mike Ximing Chen
Adds the "dynamic" map procedure and register operations. If a queue map is requested after the domain is started, the driver must disable the requested queue and wait for it to quiesce before mapping it to the requested port. Signed-off-by: Gage Eads Signed-off-by: Mike Ximing Chen R

[PATCH v10 19/20] dlb: add queue unmap register operations

2021-02-10 Thread Mike Ximing Chen
wait for it to quiesce before mapping it to the requested port. Add the code to drain unmapped queues during domain reset. This consists of mapping a port to the queue, then calling the function to drain a mapped queue. Signed-off-by: Gage Eads Signed-off-by: Mike Ximing Chen Reviewed-by: Björn

[PATCH v10 14/20] dlb: add start domain ioctl

2021-02-10 Thread Mike Ximing Chen
instructs the DLB device to start load-balancing operations. It corresponds to rte_event_dev_start() function in DPDK' eventdev library. Signed-off-by: Gage Eads Signed-off-by: Mike Ximing Chen Reviewed-by: Björn Töpel Reviewed-by: Dan Williams --- drivers/misc/dlb/dlb_ioctl.c| 3

[PATCH v10 12/20] dlb: add register operations for port management

2021-02-10 Thread Mike Ximing Chen
until they are re-assigned to a new scheduling domain in the future and re-enabled. Signed-off-by: Gage Eads Signed-off-by: Mike Ximing Chen Reviewed-by: Magnus Karlsson Reviewed-by: Dan Williams --- drivers/misc/dlb/dlb_resource.c | 448 +++- 1 file changed

[PATCH v10 08/20] dlb: add runtime power-management support

2021-02-10 Thread Mike Ximing Chen
-off-by: Gage Eads Signed-off-by: Mike Ximing Chen Reviewed-by: Magnus Karlsson Reviewed-by: Dan Williams --- drivers/misc/dlb/dlb_main.c | 101 +- drivers/misc/dlb/dlb_pf_ops.c | 8 +++ 2 files changed, 108 insertions(+), 1 deletion(-) diff --git a/drivers

[PATCH v10 10/20] dlb: add register operations for queue management

2021-02-10 Thread Mike Ximing Chen
typically takes multiple iterations. This process is finite since software cannot enqueue new events to the DLB's (finite) on-device storage. Signed-off-by: Gage Eads Signed-off-by: Mike Ximing Chen Reviewed-by: Magnus Karlsson Reviewed-by: Dan Williams --- drivers/misc/dlb/dlb_hw_types.h |

[PATCH v10 07/20] dlb: add low-level register reset operations

2021-02-10 Thread Mike Ximing Chen
empty) at that time. Support for these cases will be added in subsequent commits. Signed-off-by: Gage Eads Signed-off-by: Mike Ximing Chen Reviewed-by: Magnus Karlsson Reviewed-by: Dan Williams --- drivers/misc/dlb/dlb_regs.h | 3527 ++- drivers/misc/dlb/dlb_resou

[PATCH v10 15/20] dlb: add queue map, unmap, and pending unmap operations

2021-02-10 Thread Mike Ximing Chen
rations support rte_event_port_link(), rte_event_port_unlink() and rte_event_port_unlinks_in_progress() functions of DPDK's eventdev library. Signed-off-by: Gage Eads Signed-off-by: Mike Ximing Chen Reviewed-by: Björn Töpel Reviewed-by: Dan Williams --- drivers/misc/dlb/dlb_ioctl.c| 9

[PATCH v10 13/20] dlb: add port mmap support

2021-02-10 Thread Mike Ximing Chen
yer uses a single inode that is shared with other kernel components -- calling unmap_mapping_range() on that shared inode would likely break the kernel. Signed-off-by: Gage Eads Signed-off-by: Mike Ximing Chen Reviewed-by: Magnus Karlsson Reviewed-by: Dan Williams --- drivers/misc/dl

[PATCH v10 11/20] dlb: add ioctl to configure ports and query poll mode

2021-02-10 Thread Mike Ximing Chen
the "poll mode". This (device-wide) mode is selected by the driver; to determine the mode at run time, the driver provides an ioctl for user-space software to query which mode the driver has configured. In this way, the policy of which mode to use is decoupled from user-space software. Si

[PATCH v10 09/20] dlb: add queue create, reset, get-depth ioctls

2021-02-10 Thread Mike Ximing Chen
Gage Eads Signed-off-by: Mike Ximing Chen Reviewed-by: Magnus Karlsson Reviewed-by: Dan Williams --- drivers/misc/dlb/dlb_hw_types.h | 27 ++ drivers/misc/dlb/dlb_ioctl.c| 63 drivers/misc/dlb/dlb_main.c | 2 + drivers/misc/dlb/dlb_main.h | 17 + drivers/misc/dlb/dlb_pf_ops

[PATCH v10 06/20] dlb: add domain software reset

2021-02-10 Thread Mike Ximing Chen
Add operation to reset a domain's resource's software state when its reference count reaches zero, and re-inserts those resources in their respective available-resources linked lists, for use by future scheduling domains. Signed-off-by: Gage Eads Signed-off-by: Mike Ximing Chen R

[PATCH v10 05/20] dlb: add scheduling domain configuration

2021-02-10 Thread Mike Ximing Chen
omain reset will be added in subsequent commits. Signed-off-by: Gage Eads Signed-off-by: Mike Ximing Chen Reviewed-by: Magnus Karlsson Reviewed-by: Dan Williams --- drivers/misc/dlb/dlb_bitmap.h | 74 drivers/misc/dlb/dlb_ioctl.c| 36 +- drivers/misc/dlb/dlb_main.c | 68 drivers/m

[PATCH v10 04/20] dlb: add device ioctl layer and first three ioctls

2021-02-10 Thread Mike Ximing Chen
-by: Gage Eads Signed-off-by: Mike Ximing Chen Reviewed-by: Magnus Karlsson Reviewed-by: Dan Williams --- .../userspace-api/ioctl/ioctl-number.rst | 1 + drivers/misc/dlb/Makefile | 2 +- drivers/misc/dlb/dlb_bitmap.h | 32 drivers/misc/dlb

[PATCH v10 02/20] dlb: initialize device

2021-02-10 Thread Mike Ximing Chen
- physical function (PF, as implemented here) or virtual function/device (support to be added later). Signed-off-by: Gage Eads Signed-off-by: Mike Ximing Chen Reviewed-by: Magnus Karlsson Reviewed-by: Dan Williams --- drivers/misc/dlb/Makefile | 1 + drivers/misc/dlb/dlb_hw_ty

[PATCH v10 03/20] dlb: add resource and device initialization

2021-02-10 Thread Mike Ximing Chen
). Introduce dlb_bitmap_* functions, a thin convenience layer wrapping the Linux bitmap interfaces, used by the bitmaps in the dlb hardware types. Signed-off-by: Gage Eads Signed-off-by: Mike Ximing Chen Reviewed-by: Magnus Karlsson Reviewed-by: Dan Williams --- drivers/misc/dlb/Makefile | 2

[PATCH v10 01/20] dlb: add skeleton for DLB driver

2021-02-10 Thread Mike Ximing Chen
on in the patch. Add a DLB entry to the MAINTAINERS file. Signed-off-by: Gage Eads Signed-off-by: Mike Ximing Chen Reviewed-by: Magnus Karlsson Reviewed-by: Dan Williams --- Documentation/misc-devices/dlb.rst | 259 +++ Documentation/misc-devices/index.rst

[PATCH v10 00/20] dlb: introduce DLB device driver

2021-02-10 Thread Mike Ximing Chen
ll IDA interfaces directly instead v3: - Remove DLB2_PCI_REG_READ/WRITE macros v2: - Change driver license to GPLv2 only - Expand Kconfig help text and remove unnecessary (R)s - Remove unnecessary prints - Add a new entry in ioctl-number.rst - Convert the ioctl handler into a switch statement - Correc