From 51b4b383a6be6311cac7747a5de889a2b72a6d57 Mon Sep 17 00:00:00 2001
From: Suryanarayana Raju Sangani <ssangani@xilinx.com>
Date: Tue, 31 Jan 2023 22:57:40 +0530
Subject: [PATCH] QDMA Linux reference driver for 2023.1.0 release

---
 QDMA/linux-kernel/Makefile                    |  2 +-
 QDMA/linux-kernel/RELEASE                     | 17 ++++--
 QDMA/linux-kernel/apps/Makefile               |  2 +-
 QDMA/linux-kernel/apps/dma-ctl/Makefile       |  2 +-
 QDMA/linux-kernel/apps/dma-ctl/cmd_parse.c    | 16 ++++-
 QDMA/linux-kernel/apps/dma-ctl/cmd_parse.h    |  2 +-
 QDMA/linux-kernel/apps/dma-ctl/main.c         |  2 +-
 QDMA/linux-kernel/apps/dma-ctl/version.h      |  6 +-
 .../apps/dma-from-device/dma_from_device.c    |  2 +-
 .../apps/dma-from-device/version.h            |  6 +-
 QDMA/linux-kernel/apps/dma-latency/Makefile   |  2 +-
 QDMA/linux-kernel/apps/dma-latency/Readme.txt |  2 +-
 QDMA/linux-kernel/apps/dma-latency/dmalat.c   |  2 +-
 .../dma-latency/sample_dma_latency_config.txt |  2 +-
 QDMA/linux-kernel/apps/dma-latency/version.h  |  6 +-
 QDMA/linux-kernel/apps/dma-perf/Makefile      |  2 +-
 QDMA/linux-kernel/apps/dma-perf/dmaperf.c     | 61 ++++++++++++++++---
 QDMA/linux-kernel/apps/dma-perf/version.h     |  6 +-
 QDMA/linux-kernel/apps/dma-to-device/Makefile |  2 +-
 .../apps/dma-to-device/dma_to_device.c        |  2 +-
 .../linux-kernel/apps/dma-to-device/version.h |  6 +-
 QDMA/linux-kernel/apps/dma-utils/Makefile     |  2 +-
 .../apps/dma-utils/dma_xfer_utils.c           |  2 +-
 QDMA/linux-kernel/apps/dma-utils/dmactl.c     | 16 ++---
 QDMA/linux-kernel/apps/dma-utils/dmaxfer.c    |  2 +-
 QDMA/linux-kernel/apps/dma-utils/version.h    |  6 +-
 QDMA/linux-kernel/apps/dma-xfer/Makefile      |  2 +-
 QDMA/linux-kernel/apps/dma-xfer/dmaxfer.c     |  2 +-
 .../apps/dma-xfer/sample_qdma_xfer_config.txt |  2 +-
 QDMA/linux-kernel/apps/dma-xfer/version.h     |  6 +-
 QDMA/linux-kernel/apps/include/qdma_nl.h      |  2 +-
 .../apps/include/qdma_user_reg_dump.h         |  2 +-
 QDMA/linux-kernel/apps/include/xdev_regs.h    |  2 +-
 QDMA/linux-kernel/bsd_license.txt             |  2 +-
 QDMA/linux-kernel/driver/Makefile             |  2 +-
 QDMA/linux-kernel/driver/include/qdma_nl.h    |  2 +-
 .../driver/include/qdma_user_reg_dump.h       |  2 +-
 QDMA/linux-kernel/driver/include/xdev_regs.h  |  2 +-
 .../driver/libqdma/libqdma_export.c           | 21 ++++---
 .../driver/libqdma/libqdma_export.h           |  3 +-
 .../eqdma_cpm5_access/eqdma_cpm5_access.c     |  6 +-
 .../eqdma_soft_access/eqdma_soft_access.c     | 30 ++++++---
 .../libqdma/qdma_access/qdma_access_common.h  |  9 ++-
 .../libqdma/qdma_access/qdma_access_version.h |  4 +-
 .../libqdma/qdma_access/qdma_platform.h       |  8 +++
 .../qdma_soft_access/qdma_soft_access.c       | 10 +++
 QDMA/linux-kernel/driver/libqdma/qdma_descq.c |  2 +
 .../linux-kernel/driver/libqdma/qdma_device.c |  1 -
 QDMA/linux-kernel/driver/libqdma/qdma_intr.c  |  2 +-
 .../driver/libqdma/qdma_platform.c            | 13 ++++
 .../linux-kernel/driver/libqdma/qdma_st_c2h.c |  2 +-
 QDMA/linux-kernel/driver/libqdma/version.h    |  4 +-
 QDMA/linux-kernel/driver/libqdma/xdev.c       | 15 ++---
 .../driver/make_rules/common_flags.mk         |  2 +-
 .../driver/make_rules/distro_check.mk         |  2 +-
 .../driver/make_rules/kernel_check.mk         |  2 +-
 QDMA/linux-kernel/driver/src/Makefile         |  2 +-
 QDMA/linux-kernel/driver/src/cdev.c           |  2 +-
 QDMA/linux-kernel/driver/src/cdev.h           |  2 +-
 QDMA/linux-kernel/driver/src/nl.c             | 44 +++++++++++--
 QDMA/linux-kernel/driver/src/nl.h             |  2 +-
 QDMA/linux-kernel/driver/src/pci_ids.h        |  2 +-
 QDMA/linux-kernel/driver/src/qdma_mod.c       |  2 +-
 QDMA/linux-kernel/driver/src/qdma_mod.h       |  2 +-
 QDMA/linux-kernel/driver/src/version.h        |  8 +--
 .../scripts/qdma_generate_conf_file.sh        |  2 +-
 .../scripts/qdma_run_test_mm_vf.sh            |  2 +-
 QDMA/linux-kernel/scripts/qdma_run_test_pf.sh |  2 +-
 .../scripts/qdma_run_test_st_vf.sh            |  2 +-
 QDMA/linux-kernel/scripts/qdma_vf_auto_tst.sh |  2 +-
 70 files changed, 290 insertions(+), 128 deletions(-)

diff --git a/QDMA/linux-kernel/Makefile b/QDMA/linux-kernel/Makefile
index e8fd7de..53b933d 100755
--- a/QDMA/linux-kernel/Makefile
+++ b/QDMA/linux-kernel/Makefile
@@ -2,7 +2,7 @@
 # * This file is part of the Xilinx DMA IP Core driver for Linux
 # *
 # * Copyright (c) 2017-2022, Xilinx, Inc. All rights reserved.
-# * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+# * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
 # *
 # * This source code is free software; you can redistribute it and/or modify it
 # * under the terms and conditions of the GNU General Public License,
diff --git a/QDMA/linux-kernel/RELEASE b/QDMA/linux-kernel/RELEASE
index 67a56ec..1706857 100755
--- a/QDMA/linux-kernel/RELEASE
+++ b/QDMA/linux-kernel/RELEASE
@@ -1,5 +1,5 @@
-RELEASE: 2022.1.5 Patch
-=======================
+RELEASE: 2023.1.0
+=================
 
 This release is validated
 	- On VCU1525 for QDMA5.0 2022.1 example design
@@ -127,10 +127,19 @@ CPM5
 ----------------------
 - Added PF/VF 4K queues support for CPM5 design. This feature is applicable only when corresponding RTL support is added.
 
+2023.1 Updates
+--------------
+- Updated the queue list command for >2048 Q's.
+- Added support to accomodate H2C & C2H Q's offset with fixed intervals for dma-perf application.
+
 KNOWN ISSUES:
 =============
 - CPM5 Only
-	- Adding >3000 queues using dma-ctl application throwing an error message even though the queues are added successfully. For now error message can be ignored and this will be fixed in subsequent releases.
+	- Data transfers are not happening when FLR is triggered with 10 VFs created on each PF.
+    - Performace optimizations are not finalized yet.
+
+- QDAM5.0
+    - Performace optimizations are not finalized yet.
 
 - All Designs
 	- In interrupt mode, Sometimes completions are not received when C2H PIDX updates are held for 64 descriptors
@@ -157,7 +166,7 @@ DRIVER LIMITATIONS:
  * This file is part of the Xilinx DMA IP Core driver for Linux
  *
  * Copyright (c) 2017-2022, Xilinx, Inc. All rights reserved.
- * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+ * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
  *
  * This source code is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
diff --git a/QDMA/linux-kernel/apps/Makefile b/QDMA/linux-kernel/apps/Makefile
index b4febd2..9b7e987 100755
--- a/QDMA/linux-kernel/apps/Makefile
+++ b/QDMA/linux-kernel/apps/Makefile
@@ -4,7 +4,7 @@
 # * to enable the user to execute the QDMA functionality
 # *
 # * Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
-# * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+# * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
 # *
 # * This source code is licensed under BSD-style license (found in the
 # * LICENSE file in the root directory of this source tree)
diff --git a/QDMA/linux-kernel/apps/dma-ctl/Makefile b/QDMA/linux-kernel/apps/dma-ctl/Makefile
index 04a5bed..ef55091 100755
--- a/QDMA/linux-kernel/apps/dma-ctl/Makefile
+++ b/QDMA/linux-kernel/apps/dma-ctl/Makefile
@@ -4,7 +4,7 @@
 # * to enable the user to execute the QDMA functionality
 # *
 # * Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
-# * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+# * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
 # *
 # * This source code is licensed under BSD-style license (found in the
 # * LICENSE file in the root directory of this source tree)
diff --git a/QDMA/linux-kernel/apps/dma-ctl/cmd_parse.c b/QDMA/linux-kernel/apps/dma-ctl/cmd_parse.c
index b2a9202..7dcbf63 100755
--- a/QDMA/linux-kernel/apps/dma-ctl/cmd_parse.c
+++ b/QDMA/linux-kernel/apps/dma-ctl/cmd_parse.c
@@ -3,7 +3,7 @@
  * to enable the user to execute the QDMA functionality
  *
  * Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
- * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+ * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
  *
  * This source code is licensed under BSD-style license (found in the
  * LICENSE file in the root directory of this source tree)
@@ -205,7 +205,7 @@ static void __attribute__((noreturn)) usage(FILE *fp)
 		"\t\tstat                    statistics of qdma[N] device\n"
 		"\t\tstat clear              clear all statistics data of qdma[N} device\n"
 		"\t\tglobal_csr              dump the Global CSR of qdma[N} device\n"
-		"\t\tq list                  list all queues\n"
+		"\t\tq list <start_idx> <num_Qs>  - List <num_Qs> queues from idx <start_idx>\n"
 		"\t\tq add idx <N> [mode <mm|st>] [dir <h2c|c2h|bi|cmpt>] - add a queue\n"
 		"\t\t                                                  *mode default to mm\n"
 		"\t\t                                                  *dir default to h2c\n"
@@ -996,6 +996,8 @@ static int read_qparm(int argc, char *argv[], int i, struct xcmd_q_parm *qparm,
 static int parse_q_cmd(int argc, char *argv[], int i, struct xcmd_info *xcmd)
 {
 	struct xcmd_q_parm *qparm = &xcmd->req.qparm;
+	uint32_t v1;
+	unsigned int f_arg_set = 0;
 	int rv;
 	int args_valid;
 
@@ -1013,6 +1015,15 @@ static int parse_q_cmd(int argc, char *argv[], int i, struct xcmd_info *xcmd)
 
 	if (!strcmp(argv[i], "list")) {
 		xcmd->op = XNL_CMD_Q_LIST;
+		rv = next_arg_read_int(argc, argv, &i, &v1);
+		if (rv < 0)
+			return rv;
+		qparm->idx = v1;
+		f_arg_set |= 1 << QPARM_IDX;
+		rv = next_arg_read_int(argc, argv, &i, &v1);
+		if (rv < 0)
+			return rv;
+		qparm->num_q = v1;
 		return ++i;
 	} else if (!strcmp(argv[i], "add")) {
 		unsigned int mask;
@@ -1104,6 +1115,7 @@ static int parse_q_cmd(int argc, char *argv[], int i, struct xcmd_info *xcmd)
 
 	args_valid = validate_qcmd(xcmd->op, qparm);
 
+	qparm->sflags = f_arg_set;
 	return (args_valid == 0) ? i : args_valid;
 }
 
diff --git a/QDMA/linux-kernel/apps/dma-ctl/cmd_parse.h b/QDMA/linux-kernel/apps/dma-ctl/cmd_parse.h
index 82518d8..ecd9224 100755
--- a/QDMA/linux-kernel/apps/dma-ctl/cmd_parse.h
+++ b/QDMA/linux-kernel/apps/dma-ctl/cmd_parse.h
@@ -3,7 +3,7 @@
  * to enable the user to execute the QDMA functionality
  *
  * Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
- * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+ * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
  *
  * This source code is licensed under BSD-style license (found in the
  * LICENSE file in the root directory of this source tree)
diff --git a/QDMA/linux-kernel/apps/dma-ctl/main.c b/QDMA/linux-kernel/apps/dma-ctl/main.c
index 5c3e4c7..95159ed 100755
--- a/QDMA/linux-kernel/apps/dma-ctl/main.c
+++ b/QDMA/linux-kernel/apps/dma-ctl/main.c
@@ -3,7 +3,7 @@
  * to enable the user to execute the QDMA functionality
  *
  * Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
- * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+ * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
  *
  * This source code is licensed under BSD-style license (found in the
  * LICENSE file in the root directory of this source tree)
diff --git a/QDMA/linux-kernel/apps/dma-ctl/version.h b/QDMA/linux-kernel/apps/dma-ctl/version.h
index 0318816..b69a5b2 100755
--- a/QDMA/linux-kernel/apps/dma-ctl/version.h
+++ b/QDMA/linux-kernel/apps/dma-ctl/version.h
@@ -3,7 +3,7 @@
  * to enable the user to execute the QDMA functionality
  *
  * Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
- * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+ * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
  *
  * This source code is licensed under BSD-style license (found in the
  * LICENSE file in the root directory of this source tree)
@@ -13,7 +13,7 @@
 #define __DMA_CTL_VERSION_H
 
 #define PROGNAME "dma-ctl"
-#define VERSION "2022.2.0"
-#define COPYRIGHT "Copyright (c) 2018-2022 Xilinx Inc."
+#define VERSION "2023.1.0"
+#define COPYRIGHT "Copyright (c) 2022-2023 Advanced Micro Devices Inc."
 
 #endif
diff --git a/QDMA/linux-kernel/apps/dma-from-device/dma_from_device.c b/QDMA/linux-kernel/apps/dma-from-device/dma_from_device.c
index 30623f4..fe34757 100755
--- a/QDMA/linux-kernel/apps/dma-from-device/dma_from_device.c
+++ b/QDMA/linux-kernel/apps/dma-from-device/dma_from_device.c
@@ -3,7 +3,7 @@
  * to enable the user to execute the QDMA functionality
  *
  * Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
- * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+ * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
  *
  * This source code is licensed under BSD-style license (found in the
  * LICENSE file in the root directory of this source tree)
diff --git a/QDMA/linux-kernel/apps/dma-from-device/version.h b/QDMA/linux-kernel/apps/dma-from-device/version.h
index f98c1db..e39ec1e 100755
--- a/QDMA/linux-kernel/apps/dma-from-device/version.h
+++ b/QDMA/linux-kernel/apps/dma-from-device/version.h
@@ -3,7 +3,7 @@
  * to enable the user to execute the QDMA functionality
  *
  * Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
- * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+ * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
  *
  * This source code is licensed under BSD-style license (found in the
  * LICENSE file in the root directory of this source tree)
@@ -13,7 +13,7 @@
 #define __DMA_FROM_DEVICE_VERSION_H
 
 #define PROGNAME "dma-from-device"
-#define VERSION "2022.2.0"
-#define COPYRIGHT "Copyright (c) 2018-2022 Xilinx Inc."
+#define VERSION "2023.1.0"
+#define COPYRIGHT "Copyright (c) 2022-2023 Advanced Micro Devices Inc."
 
 #endif
diff --git a/QDMA/linux-kernel/apps/dma-latency/Makefile b/QDMA/linux-kernel/apps/dma-latency/Makefile
index 8e49270..5654973 100755
--- a/QDMA/linux-kernel/apps/dma-latency/Makefile
+++ b/QDMA/linux-kernel/apps/dma-latency/Makefile
@@ -4,7 +4,7 @@
 # * to enable the user to execute the QDMA functionality
 # *
 # * Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
-# * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+# * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
 # *
 # * This source code is licensed under BSD-style license (found in the
 # * LICENSE file in the root directory of this source tree)
diff --git a/QDMA/linux-kernel/apps/dma-latency/Readme.txt b/QDMA/linux-kernel/apps/dma-latency/Readme.txt
index 952f1db..9c07c2c 100755
--- a/QDMA/linux-kernel/apps/dma-latency/Readme.txt
+++ b/QDMA/linux-kernel/apps/dma-latency/Readme.txt
@@ -2,7 +2,7 @@
  * This file is part of the Xilinx DMA IP Core driver for Linux
  *
  * Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
- * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+ * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
  *
  * This source code is licensed under both the BSD-style license (found in the
  * LICENSE file in the root directory of this source tree) and the GPLv2 (found
diff --git a/QDMA/linux-kernel/apps/dma-latency/dmalat.c b/QDMA/linux-kernel/apps/dma-latency/dmalat.c
index 24a53aa..d20c5c4 100755
--- a/QDMA/linux-kernel/apps/dma-latency/dmalat.c
+++ b/QDMA/linux-kernel/apps/dma-latency/dmalat.c
@@ -3,7 +3,7 @@
  * to enable the user to execute the QDMA functionality
  *
  * Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
- * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+ * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
  *
  * This source code is licensed under BSD-style license (found in the
  * LICENSE file in the root directory of this source tree)
diff --git a/QDMA/linux-kernel/apps/dma-latency/sample_dma_latency_config.txt b/QDMA/linux-kernel/apps/dma-latency/sample_dma_latency_config.txt
index 4ef735e..f710845 100755
--- a/QDMA/linux-kernel/apps/dma-latency/sample_dma_latency_config.txt
+++ b/QDMA/linux-kernel/apps/dma-latency/sample_dma_latency_config.txt
@@ -4,7 +4,7 @@
 # * to enable the user to execute the QDMA functionality
 # *
 # * Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
- * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+ * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
 # *
 # * This source code is licensed under BSD-style license (found in the
 # * LICENSE file in the root directory of this source tree)
diff --git a/QDMA/linux-kernel/apps/dma-latency/version.h b/QDMA/linux-kernel/apps/dma-latency/version.h
index 9a3e4af..610e923 100755
--- a/QDMA/linux-kernel/apps/dma-latency/version.h
+++ b/QDMA/linux-kernel/apps/dma-latency/version.h
@@ -3,7 +3,7 @@
  * to enable the user to execute the QDMA functionality
  *
  * Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
- * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+ * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
  *
  * This source code is licensed under BSD-style license (found in the
  * LICENSE file in the root directory of this source tree)
@@ -13,7 +13,7 @@
 #define __DMA_LATENCY_VERSION_H
 
 #define PROGNAME "dma-latency"
-#define VERSION "2022.2.0"
-#define COPYRIGHT "Copyright (c) 2018-2022 Xilinx Inc."
+#define VERSION "2023.1.0"
+#define COPYRIGHT "Copyright (c) 2022-2023 Advanced Micro Devices Inc."
 
 #endif
diff --git a/QDMA/linux-kernel/apps/dma-perf/Makefile b/QDMA/linux-kernel/apps/dma-perf/Makefile
index bacabd6..34ba484 100755
--- a/QDMA/linux-kernel/apps/dma-perf/Makefile
+++ b/QDMA/linux-kernel/apps/dma-perf/Makefile
@@ -4,7 +4,7 @@
 # * to enable the user to execute the QDMA functionality
 # *
 # * Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
-# * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+# * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
 # *
 # * This source code is licensed under BSD-style license (found in the
 # * LICENSE file in the root directory of this source tree)
diff --git a/QDMA/linux-kernel/apps/dma-perf/dmaperf.c b/QDMA/linux-kernel/apps/dma-perf/dmaperf.c
index 3ff22bf..1d9638e 100755
--- a/QDMA/linux-kernel/apps/dma-perf/dmaperf.c
+++ b/QDMA/linux-kernel/apps/dma-perf/dmaperf.c
@@ -3,7 +3,7 @@
  * to enable the user to execute the QDMA functionality
  *
  * Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
- * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+ * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
  *
  * This source code is licensed under BSD-style license (found in the
  * LICENSE file in the root directory of this source tree)
@@ -222,9 +222,14 @@ static unsigned int num_pkts;
 static int keyhole_en = 0;
 static unsigned int aperture_sz = 0;
 /* For MM Channel =0 or 1 , offset is used for both MM Channels */
-static unsigned long int offset = 0;
+static unsigned long int offset_ch0 = 0;
 /*In MM Channel interleaving offset_ch1 is the offset used for Channel 1*/
 static unsigned long int offset_ch1 = 0;
+static int offset_q_en= 0;
+static unsigned long int h2c_q_offset_intvl = 0;
+static unsigned long int c2h_q_offset_intvl = 0;
+static unsigned long int h2c_q_start_offset= 0;
+static unsigned long int c2h_q_start_offset= 0;
 static unsigned int tsecs = 0;
 struct io_info *info = NULL;
 static char cfg_name[20];
@@ -297,6 +302,15 @@ static int arg_read_long_uint(char *s, uint64_t *v)
     return 0;
 }
 
+static int update_q_off(struct io_info *info)
+{
+	if (info->dir == Q_DIR_H2C) {
+		info->offset += h2c_q_start_offset + (info->qid * h2c_q_offset_intvl);
+	} else {
+		info->offset += c2h_q_start_offset + (info->qid * c2h_q_offset_intvl);
+	}
+}
+
 static int arg_read_int_array(char *s, unsigned int *v, unsigned int max_arr_size)
 {
     unsigned int slen = strlen(s);
@@ -354,7 +368,7 @@ static int get_array_len(char *s)
 
 static void dump_thrd_info(struct io_info *_info) {
 
-	printf("q_name = %s\n", info->q_name);
+	printf("q_name = %s\n", _info->q_name);
 	printf("dir = %d\n", _info->dir);
 	printf("mode = %d\n", _info->mode);
 	printf("idx_cnt = %u\n", _info->idx_cnt);
@@ -367,6 +381,7 @@ static void dump_thrd_info(struct io_info *_info) {
 	printf("q_ctrl = %u\n", _info->q_ctrl);
 	printf("q_added = %u\n", _info->q_added);
 	printf("q_started = %u\n", _info->q_started);
+	printf("offset = 0x%lx\n", _info->offset);
 	if (stm_mode) {
 		printf("pipe_gl_max = %u\n", _info->pipe_gl_max);
 		printf("pipe_flow_id = %u\n", _info->pipe_flow_id);
@@ -665,7 +680,9 @@ static void create_thread_info(void)
 					if(mm_chnl == MM_CHANNEL_INTERLEAVE && _info[base].mm_chnl )
 						_info[base].offset = offset_ch1;
 					else
-						_info[base].offset = offset;
+						_info[base].offset = offset_ch0;
+					if(offset_q_en)
+						update_q_off(&_info[base]);
 #if THREADS_SET_CPU_AFFINITY
 					_info[base].cpu = h2c_cpu;
 #endif
@@ -698,7 +715,9 @@ static void create_thread_info(void)
 					if(mm_chnl == MM_CHANNEL_INTERLEAVE && _info[base].mm_chnl )
 						_info[base].offset = offset_ch1;
 					else
-						_info[base].offset = offset;
+						_info[base].offset = offset_ch0;
+					if(offset_q_en)
+						update_q_off(&_info[base]);
 
 					_info[base].pkt_sz = pkt_sz;
 #if THREADS_SET_CPU_AFFINITY
@@ -901,13 +920,37 @@ static void parse_config_file(const char *cfg_fname)
 				printf("Error: Invalid aperture offset:%s\n", value);
 				goto prase_cleanup;
 			}
-		} else if (!strncmp(config, "offset", 6)) {
-			if (arg_read_long_uint(value, &offset)) {
+		} else if (!strncmp(config, "offset_q_en", 11)) {
+			if (arg_read_int(value, &offset_q_en)) {
+				printf("Error: Invalid offset_q_en option:%s\n", value);
+				goto prase_cleanup;
+			}
+		} else if (!strncmp(config, "h2c_q_offset_intvl", 18)) {
+			if (arg_read_long_uint(value, &h2c_q_offset_intvl)) {
+				printf("Error: Invalid H2C q offset:%s\n", value);
+				goto prase_cleanup;
+			}
+		} else if (!strncmp(config, "c2h_q_offset_intvl", 18)) {
+			if (arg_read_long_uint(value, &c2h_q_offset_intvl)) {
+				printf("Error: Invalid C2H q offset:%s\n", value);
+				goto prase_cleanup;
+			}
+		} else if (!strncmp(config, "h2c_q_start_offset", 18)) {
+			if (arg_read_long_uint(value, &h2c_q_start_offset)) {
+				printf("Error: Invalid H2C q offset:%s\n", value);
+				goto prase_cleanup;
+			}
+		} else if (!strncmp(config, "c2h_q_start_offset", 18)) {
+			if (arg_read_long_uint(value, &c2h_q_start_offset)) {
+				printf("Error: Invalid H2C q offset:%s\n", value);
+				goto prase_cleanup;
+			}
+		} else if (!strncmp(config, "offset_ch0", 10)) {
+			if (arg_read_long_uint(value, &offset_ch0)) {
 				printf("Error: Invalid aperture offset:%s\n", value);
 				goto prase_cleanup;
 			}
 		} else if (!strncmp(config, "keyhole_en", 7)) {
-
 			if (arg_read_int(value, &keyhole_en)) {
 				printf("Error: Invalid keyhole option:%s\n", value);
 				goto prase_cleanup;
@@ -1051,7 +1094,7 @@ static void parse_config_file(const char *cfg_fname)
 		printf("Could not open %s\n", rng_sz_path);
 		exit(1);
 	}
-	ret = read(rng_sz_fd, &rng_sz[1], 100);
+	ret = read(rng_sz_fd, &rng_sz[1], 99);
 	if (ret < 0) {
 		printf("Error: Could not read the file\n");
 		exit(1);
diff --git a/QDMA/linux-kernel/apps/dma-perf/version.h b/QDMA/linux-kernel/apps/dma-perf/version.h
index 392bc47..6397291 100755
--- a/QDMA/linux-kernel/apps/dma-perf/version.h
+++ b/QDMA/linux-kernel/apps/dma-perf/version.h
@@ -3,7 +3,7 @@
  * to enable the user to execute the QDMA functionality
  *
  * Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
- * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+ * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
  *
  * This source code is licensed under BSD-style license (found in the
  * LICENSE file in the root directory of this source tree)
@@ -13,7 +13,7 @@
 #define __DMA_PERF_VERSION_H
 
 #define PROGNAME "dma-perf"
-#define VERSION "2022.2.0"
-#define COPYRIGHT "Copyright (c) 2018-2022 Xilinx Inc."
+#define VERSION "2023.1.0"
+#define COPYRIGHT "Copyright (c) 2022-2023 Advanced Micro Devices Inc."
 
 #endif
diff --git a/QDMA/linux-kernel/apps/dma-to-device/Makefile b/QDMA/linux-kernel/apps/dma-to-device/Makefile
index fab351e..bccb834 100755
--- a/QDMA/linux-kernel/apps/dma-to-device/Makefile
+++ b/QDMA/linux-kernel/apps/dma-to-device/Makefile
@@ -4,7 +4,7 @@
 # * to enable the user to execute the QDMA functionality
 # *
 # * Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
-# * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+# * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
 # *
 # * This source code is licensed under BSD-style license (found in the
 # * LICENSE file in the root directory of this source tree)
diff --git a/QDMA/linux-kernel/apps/dma-to-device/dma_to_device.c b/QDMA/linux-kernel/apps/dma-to-device/dma_to_device.c
index 9f12143..49d53b0 100755
--- a/QDMA/linux-kernel/apps/dma-to-device/dma_to_device.c
+++ b/QDMA/linux-kernel/apps/dma-to-device/dma_to_device.c
@@ -3,7 +3,7 @@
  * to enable the user to execute the QDMA functionality
  *
  * Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
- * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+ * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
  *
  * This source code is licensed under BSD-style license (found in the
  * LICENSE file in the root directory of this source tree)
diff --git a/QDMA/linux-kernel/apps/dma-to-device/version.h b/QDMA/linux-kernel/apps/dma-to-device/version.h
index 2cd20e0..31112bc 100755
--- a/QDMA/linux-kernel/apps/dma-to-device/version.h
+++ b/QDMA/linux-kernel/apps/dma-to-device/version.h
@@ -3,7 +3,7 @@
  * to enable the user to execute the QDMA functionality
  *
  * Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
- * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+ * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
  *
  * This source code is licensed under BSD-style license (found in the
  * LICENSE file in the root directory of this source tree)
@@ -13,7 +13,7 @@
 #define __DMA_TO_DEVICE_VERSION_H
 
 #define PROGNAME "dma-to-device"
-#define VERSION "2022.2.0"
-#define COPYRIGHT "Copyright (c) 2018-2022 Xilinx Inc."
+#define VERSION "2023.1.0"
+#define COPYRIGHT "Copyright (c) 2022-2023 Advanced Micro Devices Inc."
 
 #endif
diff --git a/QDMA/linux-kernel/apps/dma-utils/Makefile b/QDMA/linux-kernel/apps/dma-utils/Makefile
index 1fb3558..f6d9ecd 100755
--- a/QDMA/linux-kernel/apps/dma-utils/Makefile
+++ b/QDMA/linux-kernel/apps/dma-utils/Makefile
@@ -4,7 +4,7 @@
 # * to enable the user to execute the QDMA functionality
 # *
 # * Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
-# * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+# * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
 # *
 # * This source code is licensed under BSD-style license (found in the
 # * LICENSE file in the root directory of this source tree)
diff --git a/QDMA/linux-kernel/apps/dma-utils/dma_xfer_utils.c b/QDMA/linux-kernel/apps/dma-utils/dma_xfer_utils.c
index 0dbc313..d3fefd2 100755
--- a/QDMA/linux-kernel/apps/dma-utils/dma_xfer_utils.c
+++ b/QDMA/linux-kernel/apps/dma-utils/dma_xfer_utils.c
@@ -3,7 +3,7 @@
  * to enable the user to execute the QDMA functionality
  *
  * Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
- * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+ * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
  *
  * This source code is licensed under BSD-style license (found in the
  * LICENSE file in the root directory of this source tree)
diff --git a/QDMA/linux-kernel/apps/dma-utils/dmactl.c b/QDMA/linux-kernel/apps/dma-utils/dmactl.c
index 84ef8cc..988d482 100755
--- a/QDMA/linux-kernel/apps/dma-utils/dmactl.c
+++ b/QDMA/linux-kernel/apps/dma-utils/dmactl.c
@@ -3,7 +3,7 @@
  * to enable the user to execute the QDMA functionality
  *
  * Copyright (c) 2019-2022,  Xilinx, Inc. All rights reserved.
- * Copyright (c) 2022,  Advanced Micro Devices, Inc. All rights reserved.
+ * Copyright (c) 2022-2023,  Advanced Micro Devices, Inc. All rights reserved.
  *
  * This source code is licensed under BSD-style license (found in the
  * LICENSE file in the root directory of this source tree)
@@ -301,17 +301,15 @@ static int get_cmd_resp_buf_len(enum xnl_op_t op, struct xcmd_info *xcmd)
         case XNL_CMD_Q_STOP:
         case XNL_CMD_Q_DEL:
         case XNL_CMD_GLOBAL_CSR:
-        	return buf_len;
+            return buf_len;
         case XNL_CMD_Q_ADD:
         case XNL_CMD_Q_DUMP:
-        case XNL_CMD_Q_CMPT_READ:
-        	break;
         case XNL_CMD_Q_LIST:
-        	buf_len = XNL_RESP_BUFLEN_MAX * 10;
-        	break;
+        case XNL_CMD_Q_CMPT_READ:
+            break;
         case XNL_CMD_REG_DUMP:
 		case XNL_CMD_REG_INFO_READ:
-        	buf_len = XNL_RESP_BUFLEN_MAX * 6;
+            buf_len = XNL_RESP_BUFLEN_MAX * 6;
         break;
 		case XNL_CMD_DEV_STAT:
 			buf_len = XNL_RESP_BUFLEN_MAX;
@@ -411,9 +409,11 @@ static int xnl_send_cmd(struct xnl_cb *cb, struct xnl_hdr *hdr,
         case XNL_CMD_DEV_INFO:
         case XNL_CMD_DEV_STAT:
         case XNL_CMD_DEV_STAT_CLEAR:
-        case XNL_CMD_Q_LIST:
 		/* no parameter */
 		break;
+        case XNL_CMD_Q_LIST:
+		xnl_msg_add_int_attr(hdr, XNL_ATTR_QIDX, xcmd->req.qparm.idx);
+		xnl_msg_add_int_attr(hdr, XNL_ATTR_NUM_Q, xcmd->req.qparm.num_q);
         case XNL_CMD_Q_ADD:
 		xnl_msg_add_int_attr(hdr, XNL_ATTR_QIDX, xcmd->req.qparm.idx);
 		xnl_msg_add_int_attr(hdr, XNL_ATTR_NUM_Q, xcmd->req.qparm.num_q);
diff --git a/QDMA/linux-kernel/apps/dma-utils/dmaxfer.c b/QDMA/linux-kernel/apps/dma-utils/dmaxfer.c
index db94d7d..b0c9b8e 100755
--- a/QDMA/linux-kernel/apps/dma-utils/dmaxfer.c
+++ b/QDMA/linux-kernel/apps/dma-utils/dmaxfer.c
@@ -3,7 +3,7 @@
  * to enable the user to execute the QDMA functionality
  *
  * Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
- * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+ * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
  *
  * This source code is licensed under BSD-style license (found in the
  * LICENSE file in the root directory of this source tree)
diff --git a/QDMA/linux-kernel/apps/dma-utils/version.h b/QDMA/linux-kernel/apps/dma-utils/version.h
index 30d8b17..a9ecd35 100755
--- a/QDMA/linux-kernel/apps/dma-utils/version.h
+++ b/QDMA/linux-kernel/apps/dma-utils/version.h
@@ -3,7 +3,7 @@
  * to enable the user to execute the QDMA functionality
  *
  * Copyright (c) 2019-2022,  Xilinx, Inc. All rights reserved.
- * Copyright (c) 2022,  Advanced Micro Devices, Inc. All rights reserved.
+ * Copyright (c) 2022-2023,  Advanced Micro Devices, Inc. All rights reserved.
  *
  * This source code is licensed under BSD-style license (found in the
  * LICENSE file in the root directory of this source tree)
@@ -13,7 +13,7 @@
 #define __DMA_UTILS_VERSION_H
 
 #define LIBNAME "dma-utils"
-#define QDMATUILS_VERSION "2022.2.0"
-#define COPYRIGHT "Copyright (c) 2019-2022 Xilinx Inc."
+#define QDMATUILS_VERSION "2023.1.0"
+#define COPYRIGHT "Copyright (c) 2022-2023 Advanced Micro Devices Inc."
 
 #endif
diff --git a/QDMA/linux-kernel/apps/dma-xfer/Makefile b/QDMA/linux-kernel/apps/dma-xfer/Makefile
index b89fe3b..f30478a 100755
--- a/QDMA/linux-kernel/apps/dma-xfer/Makefile
+++ b/QDMA/linux-kernel/apps/dma-xfer/Makefile
@@ -4,7 +4,7 @@
 # * to enable the user to execute the QDMA functionality
 # *
 # * Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
-# * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+# * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
 # *
 # * This source code is licensed under BSD-style license (found in the
 # * LICENSE file in the root directory of this source tree)
diff --git a/QDMA/linux-kernel/apps/dma-xfer/dmaxfer.c b/QDMA/linux-kernel/apps/dma-xfer/dmaxfer.c
index cab6031..23945bd 100755
--- a/QDMA/linux-kernel/apps/dma-xfer/dmaxfer.c
+++ b/QDMA/linux-kernel/apps/dma-xfer/dmaxfer.c
@@ -3,7 +3,7 @@
  * to enable the user to execute the QDMA functionality
  *
  * Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
- * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+ * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
  *
  * This source code is licensed under BSD-style license (found in the
  * LICENSE file in the root directory of this source tree)
diff --git a/QDMA/linux-kernel/apps/dma-xfer/sample_qdma_xfer_config.txt b/QDMA/linux-kernel/apps/dma-xfer/sample_qdma_xfer_config.txt
index 5f364f0..d4a2c82 100755
--- a/QDMA/linux-kernel/apps/dma-xfer/sample_qdma_xfer_config.txt
+++ b/QDMA/linux-kernel/apps/dma-xfer/sample_qdma_xfer_config.txt
@@ -4,7 +4,7 @@
 # * to enable the user to execute the QDMA functionality
 # *
 # * Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
-# * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+# * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
 # *
 # * This source code is licensed under BSD-style license (found in the
 # * LICENSE file in the root directory of this source tree)
diff --git a/QDMA/linux-kernel/apps/dma-xfer/version.h b/QDMA/linux-kernel/apps/dma-xfer/version.h
index 0f1d5ec..4b5eb39 100755
--- a/QDMA/linux-kernel/apps/dma-xfer/version.h
+++ b/QDMA/linux-kernel/apps/dma-xfer/version.h
@@ -3,7 +3,7 @@
  * to enable the user to execute the QDMA functionality
  *
  * Copyright (c) 2019-2022,  Xilinx, Inc. All rights reserved.
- * Copyright (c) 2022,  Advanced Micro Devices, Inc. All rights reserved.
+ * Copyright (c) 2022-2023,  Advanced Micro Devices, Inc. All rights reserved.
  *
  * This source code is licensed under BSD-style license (found in the
  * LICENSE file in the root directory of this source tree)
@@ -12,7 +12,7 @@
 #define __DMA_XFER_VERSION_H
 
 #define PROGNAME "dma-xfer"
-#define VERSION "2022.2.0"
-#define COPYRIGHT "Copyright (c) 2019-2022 Xilinx Inc."
+#define VERSION "2023.1.0"
+#define COPYRIGHT "Copyright (c) 2022-2023 Advanced Micro Devices Inc."
 
 #endif
diff --git a/QDMA/linux-kernel/apps/include/qdma_nl.h b/QDMA/linux-kernel/apps/include/qdma_nl.h
index 09d7ad1..fd8b43c 100755
--- a/QDMA/linux-kernel/apps/include/qdma_nl.h
+++ b/QDMA/linux-kernel/apps/include/qdma_nl.h
@@ -2,7 +2,7 @@
  * This file is part of the Xilinx DMA IP Core driver for Linux
  *
  * Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
- * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+ * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
  *
  * This source code is licensed under both the BSD-style license (found in the
  * LICENSE file in the root directory of this source tree) and the GPLv2 (found
diff --git a/QDMA/linux-kernel/apps/include/qdma_user_reg_dump.h b/QDMA/linux-kernel/apps/include/qdma_user_reg_dump.h
index 337ce81..4e83373 100755
--- a/QDMA/linux-kernel/apps/include/qdma_user_reg_dump.h
+++ b/QDMA/linux-kernel/apps/include/qdma_user_reg_dump.h
@@ -2,7 +2,7 @@
  * This file is part of the Xilinx DMA IP Core driver for Linux
  *
  * Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
- * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+ * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
  *
  * This source code is licensed under both the BSD-style license (found in the
  * LICENSE file in the root directory of this source tree) and the GPLv2 (found
diff --git a/QDMA/linux-kernel/apps/include/xdev_regs.h b/QDMA/linux-kernel/apps/include/xdev_regs.h
index feebb98..1434dce 100755
--- a/QDMA/linux-kernel/apps/include/xdev_regs.h
+++ b/QDMA/linux-kernel/apps/include/xdev_regs.h
@@ -2,7 +2,7 @@
  * This file is part of the Xilinx DMA IP Core driver for Linux
  *
  * Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
- * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+ * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
  *
  * This source code is licensed under both the BSD-style license (found in the
  * LICENSE file in the root directory of this source tree) and the GPLv2 (found
diff --git a/QDMA/linux-kernel/bsd_license.txt b/QDMA/linux-kernel/bsd_license.txt
index 0759917..20693b4 100755
--- a/QDMA/linux-kernel/bsd_license.txt
+++ b/QDMA/linux-kernel/bsd_license.txt
@@ -2,7 +2,7 @@
  * This file is part of the Xilinx DMA IP Core driver for Linux
  *
  * Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
- * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+ * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
  *
  * This source code is licensed under both the BSD-style license (found in the
  * LICENSE file in the root directory of this source tree) and the GPLv2 (found
diff --git a/QDMA/linux-kernel/driver/Makefile b/QDMA/linux-kernel/driver/Makefile
index 9b8e6a3..8720681 100755
--- a/QDMA/linux-kernel/driver/Makefile
+++ b/QDMA/linux-kernel/driver/Makefile
@@ -2,7 +2,7 @@
 # * This file is part of the Xilinx DMA IP Core driver for Linux
 # *
 # * Copyright (c) 2017-2022, Xilinx, Inc. All rights reserved.
-# * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+# * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
 # *
 # * This source code is free software; you can redistribute it and/or modify it
 # * under the terms and conditions of the GNU General Public License,
diff --git a/QDMA/linux-kernel/driver/include/qdma_nl.h b/QDMA/linux-kernel/driver/include/qdma_nl.h
index eaa10d7..e0801c9 100755
--- a/QDMA/linux-kernel/driver/include/qdma_nl.h
+++ b/QDMA/linux-kernel/driver/include/qdma_nl.h
@@ -2,7 +2,7 @@
  * This file is part of the Xilinx DMA IP Core driver for Linux
  *
  * Copyright (c) 2017-2022, Xilinx, Inc. All rights reserved.
- * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+ * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
  *
  * This source code is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
diff --git a/QDMA/linux-kernel/driver/include/qdma_user_reg_dump.h b/QDMA/linux-kernel/driver/include/qdma_user_reg_dump.h
index 8975825..80906ce 100755
--- a/QDMA/linux-kernel/driver/include/qdma_user_reg_dump.h
+++ b/QDMA/linux-kernel/driver/include/qdma_user_reg_dump.h
@@ -2,7 +2,7 @@
  * This file is part of the Xilinx DMA IP Core driver for Linux
  *
  * Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
- * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+ * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
  *
  * This source code is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
diff --git a/QDMA/linux-kernel/driver/include/xdev_regs.h b/QDMA/linux-kernel/driver/include/xdev_regs.h
index 73091dc..c1c198d 100755
--- a/QDMA/linux-kernel/driver/include/xdev_regs.h
+++ b/QDMA/linux-kernel/driver/include/xdev_regs.h
@@ -2,7 +2,7 @@
  * This file is part of the Xilinx DMA IP Core driver for Linux
  *
  * Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
- * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+ * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
  *
  * This source code is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
diff --git a/QDMA/linux-kernel/driver/libqdma/libqdma_export.c b/QDMA/linux-kernel/driver/libqdma/libqdma_export.c
index 9add26f..b37f1fb 100755
--- a/QDMA/linux-kernel/driver/libqdma/libqdma_export.c
+++ b/QDMA/linux-kernel/driver/libqdma/libqdma_export.c
@@ -1131,6 +1131,8 @@ int qdma_queue_config(unsigned long dev_hndl, unsigned long qid,
  * qdma_queue_list() - display all configured queues in a string buffer
  *
  * @param[in]	dev_hndl:	dev_hndl returned from qdma_device_open()
+ * @param[in]	qidx:		Queue index
+ * @param[in]	num_q:		Number of Queues to list
  * @param[in]	buflen:		length of the input buffer
  * @param[out]	buf:		message buffer
  *
@@ -1138,7 +1140,8 @@ int qdma_queue_config(unsigned long dev_hndl, unsigned long qid,
  *	otherwise 0
  * @return	<0: error
  *****************************************************************************/
-int qdma_queue_list(unsigned long dev_hndl, char *buf, int buflen)
+int qdma_queue_list(unsigned long dev_hndl, int qidx, int num_q, char *buf,
+			int buflen)
 {
 	struct xlnx_dma_dev *xdev = (struct xlnx_dma_dev *)dev_hndl;
 	struct qdma_dev *qdev;
@@ -1202,7 +1205,8 @@ int qdma_queue_list(unsigned long dev_hndl, char *buf, int buflen)
 	 */
 	if (h2c_qcnt) {
 		descq = qdev->h2c_descq;
-		for (i = 0; i < h2c_qcnt; i++, descq++) {
+		descq =  descq + qidx;
+		for (i = qidx; i < (qidx + num_q); i++, descq++) {
 			lock_descq(descq);
 			if (descq->q_state != Q_STATE_DISABLED)
 				cur +=
@@ -1216,7 +1220,8 @@ int qdma_queue_list(unsigned long dev_hndl, char *buf, int buflen)
 
 	if (c2h_qcnt) {
 		descq = qdev->c2h_descq;
-		for (i = 0; i < c2h_qcnt; i++, descq++) {
+		descq =  descq + qidx;
+		for (i = qidx; i < (qidx + num_q); i++, descq++) {
 			lock_descq(descq);
 			if (descq->q_state != Q_STATE_DISABLED)
 				cur +=
@@ -1230,7 +1235,8 @@ int qdma_queue_list(unsigned long dev_hndl, char *buf, int buflen)
 
 	if (cmpt_qcnt) {
 		descq = qdev->cmpt_descq;
-		for (i = 0; i < cmpt_qcnt; i++, descq++) {
+		descq =  descq + qidx;
+		for (i = qidx; i < (qidx + num_q); i++, descq++) {
 			lock_descq(descq);
 			if (descq->q_state != Q_STATE_DISABLED)
 				cur +=
@@ -2304,7 +2310,7 @@ void sgl_unmap(struct pci_dev *pdev, struct qdma_sw_sg *sg, unsigned int sgcnt,
 		if (!sg->pg)
 			break;
 		if (sg->dma_addr) {
-			pci_unmap_page(pdev, sg->dma_addr - sg->offset,
+			dma_unmap_page(&pdev->dev, sg->dma_addr - sg->offset,
 							PAGE_SIZE, dir);
 			sg->dma_addr = 0UL;
 		}
@@ -2336,8 +2342,9 @@ int sgl_map(struct pci_dev *pdev, struct qdma_sw_sg *sgl, unsigned int sgcnt,
 	 */
 	for (i = 0; i < sgcnt; i++, sg++) {
 		/* !! TODO  page size !! */
-		sg->dma_addr = pci_map_page(pdev, sg->pg, 0, PAGE_SIZE, dir);
-		if (unlikely(pci_dma_mapping_error(pdev, sg->dma_addr))) {
+		sg->dma_addr = dma_map_page(&pdev->dev, sg->pg, 0, PAGE_SIZE,
+				dir);
+		if (unlikely(dma_mapping_error(&pdev->dev, sg->dma_addr))) {
 			pr_err("map sgl failed, sg %d, %u.\n", i, sg->len);
 			if (i)
 				sgl_unmap(pdev, sgl, i, dir);
diff --git a/QDMA/linux-kernel/driver/libqdma/libqdma_export.h b/QDMA/linux-kernel/driver/libqdma/libqdma_export.h
index 2cf6c27..a60ff3e 100755
--- a/QDMA/linux-kernel/driver/libqdma/libqdma_export.h
+++ b/QDMA/linux-kernel/driver/libqdma/libqdma_export.h
@@ -1352,7 +1352,8 @@ int qdma_queue_get_config(unsigned long dev_hndl, unsigned long id,
  *	 otherwise QDMA_OPERATION_SUCCESSFUL and <0 for error
  *
  *****************************************************************************/
-int qdma_queue_list(unsigned long dev_hndl, char *buf, int buflen);
+int qdma_queue_list(unsigned long dev_hndl, int qidx, int num_q, char *buf,
+		int buflen);
 
 /*****************************************************************************/
 /**
diff --git a/QDMA/linux-kernel/driver/libqdma/qdma_access/eqdma_cpm5_access/eqdma_cpm5_access.c b/QDMA/linux-kernel/driver/libqdma/qdma_access/eqdma_cpm5_access/eqdma_cpm5_access.c
index 239105b..29c3cac 100755
--- a/QDMA/linux-kernel/driver/libqdma/qdma_access/eqdma_cpm5_access/eqdma_cpm5_access.c
+++ b/QDMA/linux-kernel/driver/libqdma/qdma_access/eqdma_cpm5_access/eqdma_cpm5_access.c
@@ -83,9 +83,11 @@
 #define EQDMA_CPM5_GLBL2_FLR_PRESENT_MASK			BIT(1)
 #define EQDMA_CPM5_GLBL2_MAILBOX_EN_MASK			BIT(0)
 
+
+/* TODO: This is work around and this needs to be auto generated from ODS */
 /** EQDMA_CPM5_IND_REG_SEL_FMAP */
-#define EQDMA_CPM5_FMAP_CTXT_W1_QID_MAX_MASK         GENMASK(11, 0)
-#define EQDMA_CPM5_FMAP_CTXT_W0_QID_MASK             GENMASK(10, 0)
+#define EQDMA_CPM5_FMAP_CTXT_W1_QID_MAX_MASK         GENMASK(12, 0)
+#define EQDMA_CPM5_FMAP_CTXT_W0_QID_MASK             GENMASK(11, 0)
 
 static void eqdma_cpm5_hw_st_h2c_err_process(void *dev_hndl);
 static void eqdma_cpm5_hw_st_c2h_err_process(void *dev_hndl);
diff --git a/QDMA/linux-kernel/driver/libqdma/qdma_access/eqdma_soft_access/eqdma_soft_access.c b/QDMA/linux-kernel/driver/libqdma/qdma_access/eqdma_soft_access/eqdma_soft_access.c
index 19105c1..59051a8 100755
--- a/QDMA/linux-kernel/driver/libqdma/qdma_access/eqdma_soft_access/eqdma_soft_access.c
+++ b/QDMA/linux-kernel/driver/libqdma/qdma_access/eqdma_soft_access/eqdma_soft_access.c
@@ -63,10 +63,15 @@
 #define EQDMA5_H2C_THROT_REQ_THRESH        0xC0
 
 /* CSR Default values for QDMA 5.0 */
-#define EQDMA5_DEFAULT_H2C_UODSC_LIMIT     4
-#define EQDMA5_DEFAULT_MAX_DSC_FETCH       3
+#define EQDMA5_DEFAULT_C2H_UODSC_LIMIT     5
+#define EQDMA5_DEFAULT_H2C_UODSC_LIMIT     8
+#define EQDMA5_DEFAULT_MAX_DSC_FETCH       5
 #define EQDMA5_DEFAULT_WRB_INT             QDMA_WRB_INTERVAL_128
 
+/* C2H prefetch Throttle configuration. */
+#define EQDMA5_DEFAULT_C2H_EVT_QCNT_TH     0x38
+#define EQDMA5_DEFAULT_C2H_PFCH_QCNT       0x3c
+
 /** Auxillary Bitmasks for fields spanning multiple words */
 #define EQDMA_SW_CTXT_PASID_GET_H_MASK              GENMASK(21, 12)
 #define EQDMA_SW_CTXT_PASID_GET_L_MASK              GENMASK(11, 0)
@@ -2153,6 +2158,8 @@ int eqdma_set_default_global_csr(void *dev_hndl)
 			 * is same except some performance optimizations
 			 */
 			reg_val =
+				FIELD_SET(GLBL_DSC_CFG_C2H_UODSC_LIMIT_MASK,
+					EQDMA5_DEFAULT_C2H_UODSC_LIMIT) |
 				FIELD_SET(GLBL_DSC_CFG_H2C_UODSC_LIMIT_MASK,
 					EQDMA5_DEFAULT_H2C_UODSC_LIMIT) |
 				FIELD_SET(GLBL_DSC_CFG_MAXFETCH_MASK,
@@ -2174,12 +2181,21 @@ int eqdma_set_default_global_csr(void *dev_hndl)
 				QDMA_NUM_C2H_BUFFER_SIZES, buf_sz);
 
 		/* Prefetch Configuration */
-		reg_val = qdma_reg_read(dev_hndl,
-				EQDMA_C2H_PFCH_CACHE_DEPTH_ADDR);
-		cfg_val = FIELD_GET(C2H_PFCH_CACHE_DEPTH_MASK, reg_val);
-		reg_val = FIELD_SET(C2H_PFCH_CFG_1_QCNT_MASK, (cfg_val >> 2)) |
-				  FIELD_SET(C2H_PFCH_CFG_1_EVT_QCNT_TH_MASK,
+		if (eqdma_ip_version == EQDMA_IP_VERSION_4) {
+			reg_val = qdma_reg_read(dev_hndl,
+					EQDMA_C2H_PFCH_CACHE_DEPTH_ADDR);
+			cfg_val = FIELD_GET(C2H_PFCH_CACHE_DEPTH_MASK, reg_val);
+			reg_val = FIELD_SET(C2H_PFCH_CFG_1_QCNT_MASK,
+					(cfg_val >> 2)) |
+				FIELD_SET(C2H_PFCH_CFG_1_EVT_QCNT_TH_MASK,
 						((cfg_val >> 2) - 4));
+		} else {
+			/* Performance optimization for EQDMA5.0. */
+			reg_val = FIELD_SET(C2H_PFCH_CFG_1_QCNT_MASK,
+						EQDMA5_DEFAULT_C2H_PFCH_QCNT) |
+				  FIELD_SET(C2H_PFCH_CFG_1_EVT_QCNT_TH_MASK,
+						EQDMA5_DEFAULT_C2H_EVT_QCNT_TH);
+		}
 		qdma_reg_write(dev_hndl, EQDMA_C2H_PFCH_CFG_1_ADDR, reg_val);
 
 		reg_val = qdma_reg_read(dev_hndl, EQDMA_C2H_PFCH_CFG_2_ADDR);
diff --git a/QDMA/linux-kernel/driver/libqdma/qdma_access/qdma_access_common.h b/QDMA/linux-kernel/driver/libqdma/qdma_access/qdma_access_common.h
index 00f6bb6..f88c015 100755
--- a/QDMA/linux-kernel/driver/libqdma/qdma_access/qdma_access_common.h
+++ b/QDMA/linux-kernel/driver/libqdma/qdma_access/qdma_access_common.h
@@ -82,10 +82,17 @@ static inline uint32_t get_trailing_zeros(uint64_t value)
 #define DEFAULT_PFCH_NUM_ENTRIES_PER_Q      8
 #define DEFAULT_PFCH_MAX_Q_CNT              16
 #define DEFAULT_C2H_INTR_TIMER_TICK         25
-#define DEFAULT_CMPT_COAL_TIMER_CNT         5
 #define DEFAULT_CMPT_COAL_TIMER_TICK        25
 #define DEFAULT_CMPT_COAL_MAX_BUF_SZ        32
 
+#ifdef THROUGHPUT_MEASUREMENT
+/* Update WRB coalesce timer count for throughput measurement */
+#define DEFAULT_CMPT_COAL_TIMER_CNT         10
+#else
+/* Update WRB coalesce timer count for low latency measurement */
+#define DEFAULT_CMPT_COAL_TIMER_CNT         5
+#endif
+
 #define QDMA_BAR_NUM                        6
 
 /** Maximum data vectors to be used for each function
diff --git a/QDMA/linux-kernel/driver/libqdma/qdma_access/qdma_access_version.h b/QDMA/linux-kernel/driver/libqdma/qdma_access/qdma_access_version.h
index c560b46..311e946 100755
--- a/QDMA/linux-kernel/driver/libqdma/qdma_access/qdma_access_version.h
+++ b/QDMA/linux-kernel/driver/libqdma/qdma_access/qdma_access_version.h
@@ -19,9 +19,9 @@
 #define __QDMA_ACCESS_VERSION_H_
 
 
-#define QDMA_VERSION_MAJOR	2022
+#define QDMA_VERSION_MAJOR	2023
 #define QDMA_VERSION_MINOR	1
-#define QDMA_VERSION_PATCH	5
+#define QDMA_VERSION_PATCH	0
 
 #define QDMA_VERSION_STR	\
 	__stringify(QDMA_VERSION_MAJOR) "." \
diff --git a/QDMA/linux-kernel/driver/libqdma/qdma_access/qdma_platform.h b/QDMA/linux-kernel/driver/libqdma/qdma_access/qdma_platform.h
index a6c7d1c..996b891 100755
--- a/QDMA/linux-kernel/driver/libqdma/qdma_access/qdma_platform.h
+++ b/QDMA/linux-kernel/driver/libqdma/qdma_access/qdma_platform.h
@@ -162,6 +162,14 @@ void qdma_strncpy(char *dest, const char *src, size_t n);
  *****************************************************************************/
 int qdma_get_err_code(int acc_err_code);
 
+/*****************************************************************************/
+/**
+ * qdma_io_wmb() - Write memory barrier for IO device
+ *
+ * Return:	0   - success and < 0 - failure
+ *****************************************************************************/
+int qdma_io_wmb(void);
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/QDMA/linux-kernel/driver/libqdma/qdma_access/qdma_soft_access/qdma_soft_access.c b/QDMA/linux-kernel/driver/libqdma/qdma_access/qdma_soft_access/qdma_soft_access.c
index 26d10b2..a7b3467 100755
--- a/QDMA/linux-kernel/driver/libqdma/qdma_access/qdma_soft_access/qdma_soft_access.c
+++ b/QDMA/linux-kernel/driver/libqdma/qdma_access/qdma_soft_access/qdma_soft_access.c
@@ -4033,6 +4033,11 @@ int qdma_queue_pidx_update(void *dev_hndl, uint8_t is_vf, uint16_t qid,
 			  FIELD_SET(QDMA_DMA_SEL_IRQ_EN_MASK,
 			  reg_info->irq_en);
 
+	/* Make sure writes to the H2C/C2H descriptors are synchronized
+	 * before updating PIDX
+	 */
+	qdma_io_wmb();
+
 	qdma_reg_write(dev_hndl, reg_addr, reg_val);
 
 	return QDMA_SUCCESS;
@@ -4085,6 +4090,11 @@ int qdma_queue_cmpt_cidx_update(void *dev_hndl, uint8_t is_vf,
 				reg_info->wrb_en) |
 		FIELD_SET(QDMA_DMAP_SEL_CMPT_IRQ_EN_MASK, reg_info->irq_en);
 
+	/* Make sure writes to the CMPT ring are synchronized
+	 * before updating CIDX
+	 */
+	qdma_io_wmb();
+
 	qdma_reg_write(dev_hndl, reg_addr, reg_val);
 
 	return QDMA_SUCCESS;
diff --git a/QDMA/linux-kernel/driver/libqdma/qdma_descq.c b/QDMA/linux-kernel/driver/libqdma/qdma_descq.c
index f62a927..db8e44e 100755
--- a/QDMA/linux-kernel/driver/libqdma/qdma_descq.c
+++ b/QDMA/linux-kernel/driver/libqdma/qdma_descq.c
@@ -1876,6 +1876,8 @@ int qdma_queue_packet_write(unsigned long dev_hndl, unsigned long id,
 		return -EINVAL;
 	}
 
+	memset(cb, 0, QDMA_REQ_OPAQUE_SIZE);
+	qdma_waitq_init(&cb->wq);
 	qdma_work_queue_add(descq, cb);
 
 	if (!req->dma_mapped) {
diff --git a/QDMA/linux-kernel/driver/libqdma/qdma_device.c b/QDMA/linux-kernel/driver/libqdma/qdma_device.c
index a0ea5fc..fcf8058 100755
--- a/QDMA/linux-kernel/driver/libqdma/qdma_device.c
+++ b/QDMA/linux-kernel/driver/libqdma/qdma_device.c
@@ -253,7 +253,6 @@ int qdma_device_init(struct xlnx_dma_dev *xdev)
 	}
 #endif
 
-	descq = (struct qdma_descq *)(qdev + 1);
 	qdev->h2c_descq = kmalloc(sizeof(struct qdma_descq) * qmax, GFP_KERNEL);
 	qdev->c2h_descq = kmalloc(sizeof(struct qdma_descq) * qmax, GFP_KERNEL);
 	qdev->cmpt_descq = kmalloc(sizeof(struct qdma_descq) * qmax,
diff --git a/QDMA/linux-kernel/driver/libqdma/qdma_intr.c b/QDMA/linux-kernel/driver/libqdma/qdma_intr.c
index 14e88ca..4de9268 100755
--- a/QDMA/linux-kernel/driver/libqdma/qdma_intr.c
+++ b/QDMA/linux-kernel/driver/libqdma/qdma_intr.c
@@ -116,7 +116,7 @@ static irqreturn_t user_intr_handler(int irq_index, int irq, void *dev_id)
 {
 	struct xlnx_dma_dev *xdev = dev_id;
 
-	pr_info("User IRQ fired on Funtion#%d: index=%d, vector=%d\n",
+	pr_debug("User IRQ fired on Funtion#%d: index=%d, vector=%d\n",
 		xdev->func_id, irq_index, irq);
 
 	if (xdev->conf.fp_user_isr_handler) {
diff --git a/QDMA/linux-kernel/driver/libqdma/qdma_platform.c b/QDMA/linux-kernel/driver/libqdma/qdma_platform.c
index 2f1470f..d008d92 100755
--- a/QDMA/linux-kernel/driver/libqdma/qdma_platform.c
+++ b/QDMA/linux-kernel/driver/libqdma/qdma_platform.c
@@ -130,3 +130,16 @@ int qdma_get_err_code(int acc_err_code)
 	acc_err_code *= -1;
 	return -(error_code_map_list[acc_err_code].err_code);
 }
+
+int qdma_io_wmb(void)
+{
+	/*
+	 * TODO: Write memory barrier(wmb) calls are happening differently
+	 * for DPDK and Linux drivers. DPDK driver is calling wmb() before
+	 * pidx/cmpt_cidx updates, where as linux driver calls wmb() after
+	 * pidx/cmpt_cidx updates. As linux driver performance numbers
+	 * are good with current changes, so keeping this function
+	 * as place holder for furure changes related to memory barriers.
+	 */
+	return 0;
+}
diff --git a/QDMA/linux-kernel/driver/libqdma/qdma_st_c2h.c b/QDMA/linux-kernel/driver/libqdma/qdma_st_c2h.c
index fe3355e..80a8d73 100755
--- a/QDMA/linux-kernel/driver/libqdma/qdma_st_c2h.c
+++ b/QDMA/linux-kernel/driver/libqdma/qdma_st_c2h.c
@@ -216,7 +216,7 @@ static inline int flq_fill_page_one(struct qdma_sw_pg_sg *pg_sdesc,
 	}
 
 	mapping = dma_map_page(dev, pg, 0, (PAGE_SIZE << pg_order),
-				PCI_DMA_FROMDEVICE);
+					DMA_FROM_DEVICE);
 	if (unlikely(dma_mapping_error(dev, mapping))) {
 		dev_err(dev, "page 0x%p mapping error 0x%llx.\n",
 			pg, (unsigned long long)mapping);
diff --git a/QDMA/linux-kernel/driver/libqdma/version.h b/QDMA/linux-kernel/driver/libqdma/version.h
index 5d9a25a..2246946 100755
--- a/QDMA/linux-kernel/driver/libqdma/version.h
+++ b/QDMA/linux-kernel/driver/libqdma/version.h
@@ -23,9 +23,9 @@
 #define LIBQDMA_MODULE_NAME	"libqdma"
 #define LIBQDMA_MODULE_DESC	"Xilinx QDMA Library"
 
-#define LIBQDMA_VERSION_MAJOR	2022
+#define LIBQDMA_VERSION_MAJOR	2023
 #define LIBQDMA_VERSION_MINOR	1
-#define LIBQDMA_VERSION_PATCH	5
+#define LIBQDMA_VERSION_PATCH	0
 
 #define LIBQDMA_VERSION_STR	\
 	__stringify(LIBQDMA_VERSION_MAJOR) "." \
diff --git a/QDMA/linux-kernel/driver/libqdma/xdev.c b/QDMA/linux-kernel/driver/libqdma/xdev.c
index 3ef679e..9f0d694 100755
--- a/QDMA/linux-kernel/driver/libqdma/xdev.c
+++ b/QDMA/linux-kernel/driver/libqdma/xdev.c
@@ -96,12 +96,13 @@ struct qdma_resource_lock {
 static int pci_dma_mask_set(struct pci_dev *pdev)
 {
 	/** 64-bit addressing capability for XDMA? */
-	if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
+
+	if (!dma_set_mask(&pdev->dev, DMA_BIT_MASK(64))) {
 		/** use 64-bit DMA for descriptors */
-		pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
+		dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
 		/** use 64-bit DMA, 32-bit for consistent */
-	} else if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
-		pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
+	} else if (!dma_set_mask(&pdev->dev, DMA_BIT_MASK(32))) {
+		dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
 		/** use 32-bit DMA */
 		dev_info(&pdev->dev, "Using a 32-bit DMA mask.\n");
 	} else {
@@ -905,7 +906,7 @@ int qdma_device_online(struct pci_dev *pdev, unsigned long dev_hndl, int reset)
 		xdev->err_mon_cancel = 0;
 		INIT_DELAYED_WORK(&xdev->err_mon, qdma_err_mon);
 		schedule_delayed_work(&xdev->err_mon,
-				      msecs_to_jiffies(1000));
+					  msecs_to_jiffies(1000));
 	}
 
 	/**
@@ -1159,8 +1160,6 @@ int qdma_device_open(const char *mod_name, struct qdma_dev_conf *conf,
 		goto unmap_bars;
 	}
 
-	memcpy(conf, &xdev->conf, sizeof(*conf));
-
 	rv = qdma_device_online(pdev, (unsigned long)xdev, XDEV_FLR_INACTIVE);
 	if (rv < 0) {
 		pr_warn("Failed to set the dma device  online, err = %d", rv);
@@ -1173,6 +1172,8 @@ int qdma_device_open(const char *mod_name, struct qdma_dev_conf *conf,
 		goto unmap_bars;
 	}
 
+	memcpy(conf, &xdev->conf, sizeof(*conf));
+
 	pr_info("%s, %05x, pdev 0x%p, xdev 0x%p, ch %u, q %u, vf %u.\n",
 		dev_name(&pdev->dev), xdev->conf.bdf, pdev, xdev,
 		xdev->dev_cap.mm_channel_max, conf->qsets_max, conf->vf_max);
diff --git a/QDMA/linux-kernel/driver/make_rules/common_flags.mk b/QDMA/linux-kernel/driver/make_rules/common_flags.mk
index 5929b0c..69bebde 100755
--- a/QDMA/linux-kernel/driver/make_rules/common_flags.mk
+++ b/QDMA/linux-kernel/driver/make_rules/common_flags.mk
@@ -2,7 +2,7 @@
 # * This file is part of the Xilinx DMA IP Core driver for Linux
 # *
 # * Copyright (c) 2017-2022, Xilinx, Inc. All rights reserved.
-# * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+# * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
 # *
 # * This source code is free software; you can redistribute it and/or modify it
 # * under the terms and conditions of the GNU General Public License,
diff --git a/QDMA/linux-kernel/driver/make_rules/distro_check.mk b/QDMA/linux-kernel/driver/make_rules/distro_check.mk
index 104c288..0f23d35 100755
--- a/QDMA/linux-kernel/driver/make_rules/distro_check.mk
+++ b/QDMA/linux-kernel/driver/make_rules/distro_check.mk
@@ -2,7 +2,7 @@
 # * This file is part of the Xilinx DMA IP Core driver for Linux
 # *
 # * Copyright (c) 2017-2022, Xilinx, Inc. All rights reserved.
-# * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+# * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
 # *
 # * This source code is free software; you can redistribute it and/or modify it
 # * under the terms and conditions of the GNU General Public License,
diff --git a/QDMA/linux-kernel/driver/make_rules/kernel_check.mk b/QDMA/linux-kernel/driver/make_rules/kernel_check.mk
index c9a1f0b..ab2b369 100755
--- a/QDMA/linux-kernel/driver/make_rules/kernel_check.mk
+++ b/QDMA/linux-kernel/driver/make_rules/kernel_check.mk
@@ -2,7 +2,7 @@
 # * This file is part of the Xilinx DMA IP Core driver for Linux
 # *
 # * Copyright (c) 2017-2022, Xilinx, Inc. All rights reserved.
-# * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+# * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
 # *
 # * This source code is free software; you can redistribute it and/or modify it
 # * under the terms and conditions of the GNU General Public License,
diff --git a/QDMA/linux-kernel/driver/src/Makefile b/QDMA/linux-kernel/driver/src/Makefile
index fcbe577..1b5b9bd 100755
--- a/QDMA/linux-kernel/driver/src/Makefile
+++ b/QDMA/linux-kernel/driver/src/Makefile
@@ -2,7 +2,7 @@
 # * This file is part of the Xilinx DMA IP Core driver for Linux
 # *
 # * Copyright (c) 2017-2022, Xilinx, Inc. All rights reserved.
-# * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+# * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
 # *
 # * This source code is free software; you can redistribute it and/or modify it
 # * under the terms and conditions of the GNU General Public License,
diff --git a/QDMA/linux-kernel/driver/src/cdev.c b/QDMA/linux-kernel/driver/src/cdev.c
index 2a7de5b..e341be7 100755
--- a/QDMA/linux-kernel/driver/src/cdev.c
+++ b/QDMA/linux-kernel/driver/src/cdev.c
@@ -2,7 +2,7 @@
  * This file is part of the Xilinx DMA IP Core driver for Linux
  *
  * Copyright (c) 2017-2022, Xilinx, Inc. All rights reserved.
- * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+ * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
  *
  * This source code is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
diff --git a/QDMA/linux-kernel/driver/src/cdev.h b/QDMA/linux-kernel/driver/src/cdev.h
index 616aec8..371e528 100755
--- a/QDMA/linux-kernel/driver/src/cdev.h
+++ b/QDMA/linux-kernel/driver/src/cdev.h
@@ -2,7 +2,7 @@
  * This file is part of the Xilinx DMA IP Core driver for Linux
  *
  * Copyright (c) 2017-2022, Xilinx, Inc. All rights reserved.
- * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+ * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
  *
  * This source code is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
diff --git a/QDMA/linux-kernel/driver/src/nl.c b/QDMA/linux-kernel/driver/src/nl.c
index 55812f1..45dbc94 100755
--- a/QDMA/linux-kernel/driver/src/nl.c
+++ b/QDMA/linux-kernel/driver/src/nl.c
@@ -2,7 +2,7 @@
  * This file is part of the Xilinx DMA IP Core driver for Linux
  *
  * Copyright (c) 2017-2022, Xilinx, Inc. All rights reserved.
- * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+ * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
  *
  * This source code is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
@@ -1548,9 +1548,14 @@ static int xnl_q_list(struct sk_buff *skb2, struct genl_info *info)
 	struct xlnx_pci_dev *xpdev;
 	char *buf;
 	int rv = 0;
+	char ebuf[XNL_RESP_BUFLEN_MIN];
+	struct qdma_queue_conf qconf;
+	unsigned char is_qp;
 	uint32_t qmax = 0;
 	uint32_t buflen = 0, max_buflen = 0;
 	struct qdma_queue_count q_count;
+	unsigned int qidx, num_q;
+	struct xlnx_qdata *qdata;
 
 	if (info == NULL)
 		return -EINVAL;
@@ -1565,6 +1570,12 @@ static int xnl_q_list(struct sk_buff *skb2, struct genl_info *info)
 	if (!buf)
 		return -ENOMEM;
 	buflen = XNL_RESP_BUFLEN_MIN;
+	rv = qconf_get(&qconf, info, ebuf, XNL_RESP_BUFLEN_MIN, &is_qp);
+	if (rv < 0)
+		return rv;
+
+	qidx = qconf.qidx;
+	num_q = nla_get_u32(info->attrs[XNL_ATTR_NUM_Q]);
 
 	rv = qdma_get_queue_count(xpdev->dev_hndl, &q_count, buf, buflen);
 	if (rv < 0) {
@@ -1574,20 +1585,33 @@ static int xnl_q_list(struct sk_buff *skb2, struct genl_info *info)
 	}
 
 	qmax = q_count.h2c_qcnt + q_count.c2h_qcnt;
-
 	if (!qmax) {
 		rv += snprintf(buf, 8, "Zero Qs\n\n");
 		goto send_rsp;
 	}
 
-	max_buflen = (qmax * QDMA_Q_LIST_LINE_SZ);
+	qdata = xnl_rcv_check_qidx(info, xpdev, &qconf, buf, buflen);
+	if (!qdata)
+		goto send_rsp;
+
+	num_q = nla_get_u32(info->attrs[XNL_ATTR_NUM_Q]);
+
+	if (num_q > QDMA_Q_DUMP_MAX_QUEUES) {
+		pr_err("Can not dump more than %d queues\n",
+			   QDMA_Q_DUMP_MAX_QUEUES);
+		rv += snprintf(buf, 40, "Can not dump more than %d queues\n",
+				QDMA_Q_DUMP_MAX_QUEUES);
+		goto send_rsp;
+	}
+
 	kfree(buf);
+	max_buflen = (num_q * 2 * QDMA_Q_LIST_LINE_SZ);
 	buf = xnl_mem_alloc(max_buflen, info);
 	if (!buf)
 		return -ENOMEM;
 
 	buflen = max_buflen;
-	rv = qdma_queue_list(xpdev->dev_hndl, buf, buflen);
+	rv = qdma_queue_list(xpdev->dev_hndl, qidx, num_q, buf, buflen);
 	if (rv < 0) {
 		pr_err("qdma_queue_list() failed: %d", rv);
 		goto send_rsp;
@@ -1673,8 +1697,16 @@ add_q:
 			}
 		}
 	}
-
-	cur += snprintf(cur, end - cur, "Added %u Queues.\n", i);
+/* Suppress Q additions prints if num_q's greater than 2048.
+ * And print only consolidated Q's added, to overcome attr failure.
+ * TODO: This is a workaround. Need to comeup with proper fix.
+ */
+	if (num_q > 2048) {
+		memset(buf, 0, strlen(buf) + 1);
+		snprintf(buf, 25, "Added %u Queues.\n", i);
+	} else {
+		cur += snprintf(cur, end - cur, "Added %u Queues.\n", i);
+	}
 
 send_resp:
 	rv2 = xnl_respond_buffer(info, buf, strlen(buf), rv);
diff --git a/QDMA/linux-kernel/driver/src/nl.h b/QDMA/linux-kernel/driver/src/nl.h
index 40d91f2..e1d4024 100755
--- a/QDMA/linux-kernel/driver/src/nl.h
+++ b/QDMA/linux-kernel/driver/src/nl.h
@@ -2,7 +2,7 @@
  * This file is part of the Xilinx DMA IP Core driver for Linux
  *
  * Copyright (c) 2017-2022, Xilinx, Inc. All rights reserved.
- * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+ * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
  *
  * This source code is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
diff --git a/QDMA/linux-kernel/driver/src/pci_ids.h b/QDMA/linux-kernel/driver/src/pci_ids.h
index 1411045..61a3da1 100755
--- a/QDMA/linux-kernel/driver/src/pci_ids.h
+++ b/QDMA/linux-kernel/driver/src/pci_ids.h
@@ -2,7 +2,7 @@
  * This file is part of the Xilinx DMA IP Core driver for Linux
  *
  * Copyright (c) 2017-2022, Xilinx, Inc. All rights reserved.
- * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+ * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
  *
  * This source code is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
diff --git a/QDMA/linux-kernel/driver/src/qdma_mod.c b/QDMA/linux-kernel/driver/src/qdma_mod.c
index ae2a923..11791f9 100755
--- a/QDMA/linux-kernel/driver/src/qdma_mod.c
+++ b/QDMA/linux-kernel/driver/src/qdma_mod.c
@@ -2,7 +2,7 @@
  * This file is part of the Xilinx DMA IP Core driver for Linux
  *
  * Copyright (c) 2017-2022, Xilinx, Inc. All rights reserved.
- * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+ * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
  *
  * This source code is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
diff --git a/QDMA/linux-kernel/driver/src/qdma_mod.h b/QDMA/linux-kernel/driver/src/qdma_mod.h
index 079d95a..3cd04a5 100755
--- a/QDMA/linux-kernel/driver/src/qdma_mod.h
+++ b/QDMA/linux-kernel/driver/src/qdma_mod.h
@@ -2,7 +2,7 @@
  * This file is part of the Xilinx DMA IP Core driver for Linux
  *
  * Copyright (c) 2017-2022, Xilinx, Inc. All rights reserved.
- * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+ * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
  *
  * This source code is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
diff --git a/QDMA/linux-kernel/driver/src/version.h b/QDMA/linux-kernel/driver/src/version.h
index 5906c95..2b97f66 100755
--- a/QDMA/linux-kernel/driver/src/version.h
+++ b/QDMA/linux-kernel/driver/src/version.h
@@ -2,7 +2,7 @@
  * This file is part of the Xilinx DMA IP Core driver for Linux
  *
  * Copyright (c) 2017-2022, Xilinx, Inc. All rights reserved.
- * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+ * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
  *
  * This source code is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
@@ -29,11 +29,11 @@
 #define DRV_MODULE_NAME		"qdma-pf"
 #define DRV_MODULE_DESC		"Xilinx QDMA PF Reference Driver"
 #endif /* #ifdef __QDMA_VF__ */
-#define DRV_MODULE_RELDATE	"Jun 2022"
+#define DRV_MODULE_RELDATE	"Jan 2023"
 
-#define DRV_MOD_MAJOR		2022
+#define DRV_MOD_MAJOR		2023
 #define DRV_MOD_MINOR		1
-#define DRV_MOD_PATCHLEVEL	5
+#define DRV_MOD_PATCHLEVEL	0
 
 #define DRV_MODULE_VERSION      \
 	__stringify(DRV_MOD_MAJOR) "." \
diff --git a/QDMA/linux-kernel/scripts/qdma_generate_conf_file.sh b/QDMA/linux-kernel/scripts/qdma_generate_conf_file.sh
index 07d5b3a..c66cb1a 100755
--- a/QDMA/linux-kernel/scripts/qdma_generate_conf_file.sh
+++ b/QDMA/linux-kernel/scripts/qdma_generate_conf_file.sh
@@ -2,7 +2,7 @@
 # * This file is part of the Xilinx DMA IP Core driver for Linux
 # *
 # * Copyright (c) 2017-2022, Xilinx, Inc. All rights reserved.
-# * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+# * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
 # *
 # * This source code is free software; you can redistribute it and/or modify it
 # * under the terms and conditions of the GNU General Public License,
diff --git a/QDMA/linux-kernel/scripts/qdma_run_test_mm_vf.sh b/QDMA/linux-kernel/scripts/qdma_run_test_mm_vf.sh
index de584fe..1692277 100755
--- a/QDMA/linux-kernel/scripts/qdma_run_test_mm_vf.sh
+++ b/QDMA/linux-kernel/scripts/qdma_run_test_mm_vf.sh
@@ -2,7 +2,7 @@
 # * This file is part of the Xilinx DMA IP Core driver for Linux
 # *
 # * Copyright (c) 2017-2022, Xilinx, Inc. All rights reserved.
-# * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+# * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
 # *
 # * This source code is free software; you can redistribute it and/or modify it
 # * under the terms and conditions of the GNU General Public License,
diff --git a/QDMA/linux-kernel/scripts/qdma_run_test_pf.sh b/QDMA/linux-kernel/scripts/qdma_run_test_pf.sh
index d328ec9..f49bead 100755
--- a/QDMA/linux-kernel/scripts/qdma_run_test_pf.sh
+++ b/QDMA/linux-kernel/scripts/qdma_run_test_pf.sh
@@ -2,7 +2,7 @@
 # * This file is part of the Xilinx DMA IP Core driver for Linux
 # *
 # * Copyright (c) 2017-2022, Xilinx, Inc. All rights reserved.
-# * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+# * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
 # *
 # * This source code is free software; you can redistribute it and/or modify it
 # * under the terms and conditions of the GNU General Public License,
diff --git a/QDMA/linux-kernel/scripts/qdma_run_test_st_vf.sh b/QDMA/linux-kernel/scripts/qdma_run_test_st_vf.sh
index a9b620d..754a408 100755
--- a/QDMA/linux-kernel/scripts/qdma_run_test_st_vf.sh
+++ b/QDMA/linux-kernel/scripts/qdma_run_test_st_vf.sh
@@ -2,7 +2,7 @@
 # * This file is part of the Xilinx DMA IP Core driver for Linux
 # *
 # * Copyright (c) 2017-2022, Xilinx, Inc. All rights reserved.
-# * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+# * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
 # *
 # * This source code is free software; you can redistribute it and/or modify it
 # * under the terms and conditions of the GNU General Public License,
diff --git a/QDMA/linux-kernel/scripts/qdma_vf_auto_tst.sh b/QDMA/linux-kernel/scripts/qdma_vf_auto_tst.sh
index bcb84d7..4d7fed1 100755
--- a/QDMA/linux-kernel/scripts/qdma_vf_auto_tst.sh
+++ b/QDMA/linux-kernel/scripts/qdma_vf_auto_tst.sh
@@ -2,7 +2,7 @@
 # * This file is part of the Xilinx DMA IP Core driver for Linux
 # *
 # * Copyright (c) 2017-2022, Xilinx, Inc. All rights reserved.
-# * Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
+# * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
 # *
 # * This source code is free software; you can redistribute it and/or modify it
 # * under the terms and conditions of the GNU General Public License,
-- 
GitLab