Skip to content
Snippets Groups Projects
Unverified Commit 8c583b82 authored by Suryanarayana Raju Sangani's avatar Suryanarayana Raju Sangani
Browse files

Linux Driver 2022.1.5 patch: Added support for PF/VF 4k queues

parent 56d97f21
Branches
No related tags found
No related merge requests found
Showing
with 404 additions and 399 deletions
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
#/*
# * This file is part of the Xilinx DMA IP Core driver for Linux
# *
# * Copyright (c) 2017-2022, Xilinx, Inc.
# * All rights reserved.
# * Copyright (c) 2017-2022, Xilinx, Inc. All rights reserved.
# * Copyright (c) 2022, 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,
......
RELEASE: 2022.1.4 Patch
RELEASE: 2022.1.5 Patch
=======================
This release is validated for
- QDMA4.0 2020.1 Patch based example design
- XCVP1202 for CPM5 2022.1 example design
This release is validated
- On VCU1525 for QDMA5.0 2022.1 example design
- On VCU1525 for QDMA4.0 2020.2 example design
- On VCU1525 for QDMA3.1 2019.2 example design
- On XCVP1202 for CPM5 2022.1 example design
SUPPORTED FEATURES:
===================
......@@ -121,11 +123,14 @@ CPM5
- Added support for more than 2K queues for PF/VF
- Added support for Fedora36
2022.1.5 Patch Updates
----------------------
- Added PF/VF 4K queues support for CPM5 design. This feature is applicable only when corresponding RTL support is added.
KNOWN ISSUES:
=============
- CPM5 Only
- Sufficient host memory is required to accommodate 4K queues. Tested only upto 2099 queues for PFs with our test environment though driver supports 4K queues.
- VF 4K queue support is not fully verified due to pdi issues
- 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.
- All Designs
- In interrupt mode, Sometimes completions are not received when C2H PIDX updates are held for 64 descriptors
......@@ -151,8 +156,8 @@ 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) 2017-2022, Xilinx, Inc. All rights reserved.
* Copyright (c) 2022, 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,
......
......@@ -3,8 +3,8 @@
# * This file is part of the QDMA userspace application
# * to enable the user to execute the QDMA functionality
# *
# * Copyright (c) 2018-2022, Xilinx, Inc.
# * All rights reserved.
# * Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
# * Copyright (c) 2022, 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)
......
......@@ -3,8 +3,8 @@
# * This file is part of the QDMA userspace application
# * to enable the user to execute the QDMA functionality
# *
# * Copyright (c) 2018-2022, Xilinx, Inc.
# * All rights reserved.
# * Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
# * Copyright (c) 2022, 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)
......
......@@ -2,8 +2,8 @@
* This file is part of the QDMA userspace application
* to enable the user to execute the QDMA functionality
*
* Copyright (c) 2018-2022, Xilinx, Inc.
* All rights reserved.
* Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
* Copyright (c) 2022, 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)
......@@ -331,7 +331,7 @@ static int validate_regcmd(enum xnl_op_t qcmd, struct xcmd_reg *regcmd)
case XNL_CMD_REG_RD:
case XNL_CMD_REG_INFO_READ:
case XNL_CMD_REG_WRT:
if ((regcmd->bar != 0) && (regcmd->bar != 2)) {
if ((regcmd->bar != 0) && (regcmd->bar != 2) && (regcmd->bar != 4)) {
printf("dmactl: bar %u number out of range\n",
regcmd->bar);
invalid = -EINVAL;
......
/*
* This file is part of the QDMA userspace application
* to enable the user to execute the QDMA functionality
*
* Copyright (c) 2018-2022, Xilinx, 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)
*/
#ifndef USER_CLI_CMD_PARSE_H_
#define USER_CLI_CMD_PARSE_H_
#include "qdma_nl.h"
#include "dmautils.h"
int parse_cmd(int argc, char *argv[], struct xcmd_info *xcmd);
#endif /* USER_CLI_CMD_PARSE_H_ */
/*
* This file is part of the QDMA userspace application
* 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.
*
* This source code is licensed under BSD-style license (found in the
* LICENSE file in the root directory of this source tree)
*/
#ifndef USER_CLI_CMD_PARSE_H_
#define USER_CLI_CMD_PARSE_H_
#include "qdma_nl.h"
#include "dmautils.h"
int parse_cmd(int argc, char *argv[], struct xcmd_info *xcmd);
#endif /* USER_CLI_CMD_PARSE_H_ */
......@@ -2,8 +2,8 @@
* This file is part of the QDMA userspace application
* to enable the user to execute the QDMA functionality
*
* Copyright (c) 2018-2022, Xilinx, Inc.
* All rights reserved.
* Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
* Copyright (c) 2022, 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)
......
......@@ -2,8 +2,8 @@
* This file is part of the QDMA userspace application
* to enable the user to execute the QDMA functionality
*
* Copyright (c) 2018-2022, Xilinx, Inc.
* All rights reserved.
* Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
* Copyright (c) 2022, 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.1.0"
#define VERSION "2022.2.0"
#define COPYRIGHT "Copyright (c) 2018-2022 Xilinx Inc."
#endif
CC ?= gcc
CFLAGS += -g
#CFLAGS += -O2 -fno-inline -Wall -Wstrict-prototypes
CFLAGS += -I. -I../include -I../dma-utils
CFLAGS += $(EXTRA_FLAGS)
DMA-FROM-DEVICE = dma-from-device
DMA-UTILS_OBJS := $(patsubst %.c,%.o,$(wildcard ../dma-utils/*.c))
DMA-FROM-DEVICE_OBJS := dma_from_device.o
DMA-FROM-DEVICE_OBJS += $(DMA-UTILS_OBJS)
ifneq ($(CROSS_COMPILE_FLAG),)
CC=$(CROSS_COMPILE_FLAG)gcc
endif
all: clean dma-from-device
dma-from-device: $(DMA-FROM-DEVICE_OBJS)
$(CC) -lrt -o $@ $< -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGE_FILE_SOURCE
%.o: %.c
$(CC) $(CFLAGS) -c -std=c99 -o $@ $< -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGE_FILE_SOURCE -D_AIO_AIX_SOURCE
clean:
@rm -f *.o */*.o ../dma-utils/*.o
rm -rf *.o *.bin dma-from-device
CC ?= gcc
CFLAGS += -g
#CFLAGS += -O2 -fno-inline -Wall -Wstrict-prototypes
CFLAGS += -I. -I../include -I../dma-utils
CFLAGS += $(EXTRA_FLAGS)
DMA-FROM-DEVICE = dma-from-device
DMA-UTILS_OBJS := $(patsubst %.c,%.o,$(wildcard ../dma-utils/*.c))
DMA-FROM-DEVICE_OBJS := dma_from_device.o
DMA-FROM-DEVICE_OBJS += $(DMA-UTILS_OBJS)
ifneq ($(CROSS_COMPILE_FLAG),)
CC=$(CROSS_COMPILE_FLAG)gcc
endif
all: clean dma-from-device
dma-from-device: $(DMA-FROM-DEVICE_OBJS)
$(CC) -lrt -o $@ $< -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGE_FILE_SOURCE
%.o: %.c
$(CC) $(CFLAGS) -c -std=c99 -o $@ $< -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGE_FILE_SOURCE -D_AIO_AIX_SOURCE
clean:
@rm -f *.o */*.o ../dma-utils/*.o
rm -rf *.o *.bin dma-from-device
/*
* This file is part of the QDMA userspace application
* to enable the user to execute the QDMA functionality
*
* Copyright (c) 2018-2022, Xilinx, 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)
*/
#define _DEFAULT_SOURCE
#define _XOPEN_SOURCE 500
#include <assert.h>
#include <fcntl.h>
#include <getopt.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <time.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include "dma_xfer_utils.c"
#define DEVICE_NAME_DEFAULT "/dev/qdma01000-MM-0"
#define SIZE_DEFAULT (32)
#define COUNT_DEFAULT (1)
static struct option const long_opts[] = {
{"device", required_argument, NULL, 'd'},
{"address", required_argument, NULL, 'a'},
{"size", required_argument, NULL, 's'},
{"offset", required_argument, NULL, 'o'},
{"count", required_argument, NULL, 'c'},
{"file", required_argument, NULL, 'f'},
{"help", no_argument, NULL, 'h'},
{"verbose", no_argument, NULL, 'v'},
{0, 0, 0, 0}
};
static int test_dma(char *devname, uint64_t addr, uint64_t size,
uint64_t offset, uint64_t count, char *ofname);
static int no_write = 0;
static void usage(const char *name)
{
int i = 0;
fprintf(stdout, "%s\n\n", name);
fprintf(stdout, "usage: %s [OPTIONS]\n\n", name);
fprintf(stdout, "Read via SGDMA, optionally save output to a file\n\n");
fprintf(stdout, " -%c (--%s) device (defaults to %s)\n",
long_opts[i].val, long_opts[i].name, DEVICE_NAME_DEFAULT);
i++;
fprintf(stdout, " -%c (--%s) the start address on the AXI bus\n",
long_opts[i].val, long_opts[i].name);
i++;
fprintf(stdout,
" -%c (--%s) size of a single transfer in bytes, default %d.\n",
long_opts[i].val, long_opts[i].name, SIZE_DEFAULT);
i++;
fprintf(stdout, " -%c (--%s) page offset of transfer\n",
long_opts[i].val, long_opts[i].name);
i++;
fprintf(stdout, " -%c (--%s) number of transfers, default is %d.\n",
long_opts[i].val, long_opts[i].name, COUNT_DEFAULT);
i++;
fprintf(stdout,
" -%c (--%s) file to write the data of the transfers\n",
long_opts[i].val, long_opts[i].name);
i++;
fprintf(stdout, " -%c (--%s) print usage help and exit\n",
long_opts[i].val, long_opts[i].name);
i++;
fprintf(stdout, " -%c (--%s) verbose output\n",
long_opts[i].val, long_opts[i].name);
}
int main(int argc, char *argv[])
{
int cmd_opt;
char *device = DEVICE_NAME_DEFAULT;
uint64_t address = 0;
uint64_t size = SIZE_DEFAULT;
uint64_t offset = 0;
uint64_t count = COUNT_DEFAULT;
char *ofname = NULL;
while ((cmd_opt = getopt_long(argc, argv, "vhxc:f:d:a:s:o:", long_opts,
NULL)) != -1) {
switch (cmd_opt) {
case 0:
/* long option */
break;
case 'd':
/* device node name */
device = strdup(optarg);
break;
case 'a':
/* RAM address on the AXI bus in bytes */
address = getopt_integer(optarg);
break;
/* RAM size in bytes */
case 's':
size = getopt_integer(optarg);
break;
case 'o':
offset = getopt_integer(optarg) & 4095;
break;
/* count */
case 'c':
count = getopt_integer(optarg);
break;
/* count */
case 'f':
ofname = strdup(optarg);
break;
/* print usage help and exit */
case 'x':
no_write++;
break;
case 'v':
verbose = 1;
break;
case 'h':
default:
usage(argv[0]);
exit(0);
break;
}
}
if (verbose)
fprintf(stdout,
"dev %s, addr 0x%lx, size 0x%lx, offset 0x%lx, count %lu\n",
device, address, size, offset, count);
return test_dma(device, address, size, offset, count, ofname);
}
static int test_dma(char *devname, uint64_t addr, uint64_t size,
uint64_t offset, uint64_t count, char *ofname)
{
ssize_t rc;
uint64_t i;
char *buffer = NULL;
char *allocated = NULL;
struct timespec ts_start, ts_end;
int out_fd = -1;
int fpga_fd = open(devname, O_RDWR | O_NONBLOCK);
double total_time = 0;
double result;
double avg_time = 0;
if (fpga_fd < 0) {
fprintf(stderr, "unable to open device %s, %d.\n",
devname, fpga_fd);
perror("open device");
return -EINVAL;
}
/* create file to write data to */
if (ofname) {
out_fd = open(ofname, O_RDWR | O_CREAT | O_TRUNC | O_SYNC,
0666);
if (out_fd < 0) {
fprintf(stderr, "unable to open output file %s, %d.\n",
ofname, out_fd);
perror("open output file");
rc = -EINVAL;
goto out;
}
}
posix_memalign((void **)&allocated, 4096 /*alignment */ , size + 4096);
if (!allocated) {
fprintf(stderr, "OOM %lu.\n", size + 4096);
rc = -ENOMEM;
goto out;
}
buffer = allocated + offset;
if (verbose)
fprintf(stdout, "host buffer 0x%lx, %p.\n", size + 4096, buffer);
for (i = 0; i < count; i++) {
clock_gettime(CLOCK_MONOTONIC, &ts_start);
/* lseek & read data from AXI MM into buffer using SGDMA */
rc = read_to_buffer(devname, fpga_fd, buffer, size, addr);
if (rc < 0)
goto out;
clock_gettime(CLOCK_MONOTONIC, &ts_end);
/* subtract the start time from the end time */
timespec_sub(&ts_end, &ts_start);
total_time += (ts_end.tv_sec + ((double)ts_end.tv_nsec/NSEC_DIV));
/* a bit less accurate but side-effects are accounted for */
if (verbose)
fprintf(stdout,
"#%lu: CLOCK_MONOTONIC %ld.%09ld sec. read %lu bytes\n",
i, ts_end.tv_sec, ts_end.tv_nsec, size);
/* file argument given? */
if ((out_fd >= 0) & (no_write == 0)) {
rc = write_from_buffer(ofname, out_fd, buffer,
size, i*size);
if (rc < 0)
goto out;
}
}
avg_time = (double)total_time/(double)count;
result = ((double)size)/avg_time;
if (verbose)
printf("** Avg time device %s, total time %f nsec, avg_time = %f, size = %lu, BW = %f bytes/sec\n",
devname, total_time, avg_time, size, result);
dump_throughput_result(size, result);
rc = 0;
out:
close(fpga_fd);
if (out_fd >= 0)
close(out_fd);
free(allocated);
return rc;
}
/*
* This file is part of the QDMA userspace application
* 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.
*
* This source code is licensed under BSD-style license (found in the
* LICENSE file in the root directory of this source tree)
*/
#define _DEFAULT_SOURCE
#define _XOPEN_SOURCE 500
#include <assert.h>
#include <fcntl.h>
#include <getopt.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <time.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include "dma_xfer_utils.c"
#define DEVICE_NAME_DEFAULT "/dev/qdma01000-MM-0"
#define SIZE_DEFAULT (32)
#define COUNT_DEFAULT (1)
static struct option const long_opts[] = {
{"device", required_argument, NULL, 'd'},
{"address", required_argument, NULL, 'a'},
{"size", required_argument, NULL, 's'},
{"offset", required_argument, NULL, 'o'},
{"count", required_argument, NULL, 'c'},
{"file", required_argument, NULL, 'f'},
{"help", no_argument, NULL, 'h'},
{"verbose", no_argument, NULL, 'v'},
{0, 0, 0, 0}
};
static int test_dma(char *devname, uint64_t addr, uint64_t size,
uint64_t offset, uint64_t count, char *ofname);
static int no_write = 0;
static void usage(const char *name)
{
int i = 0;
fprintf(stdout, "%s\n\n", name);
fprintf(stdout, "usage: %s [OPTIONS]\n\n", name);
fprintf(stdout, "Read via SGDMA, optionally save output to a file\n\n");
fprintf(stdout, " -%c (--%s) device (defaults to %s)\n",
long_opts[i].val, long_opts[i].name, DEVICE_NAME_DEFAULT);
i++;
fprintf(stdout, " -%c (--%s) the start address on the AXI bus\n",
long_opts[i].val, long_opts[i].name);
i++;
fprintf(stdout,
" -%c (--%s) size of a single transfer in bytes, default %d.\n",
long_opts[i].val, long_opts[i].name, SIZE_DEFAULT);
i++;
fprintf(stdout, " -%c (--%s) page offset of transfer\n",
long_opts[i].val, long_opts[i].name);
i++;
fprintf(stdout, " -%c (--%s) number of transfers, default is %d.\n",
long_opts[i].val, long_opts[i].name, COUNT_DEFAULT);
i++;
fprintf(stdout,
" -%c (--%s) file to write the data of the transfers\n",
long_opts[i].val, long_opts[i].name);
i++;
fprintf(stdout, " -%c (--%s) print usage help and exit\n",
long_opts[i].val, long_opts[i].name);
i++;
fprintf(stdout, " -%c (--%s) verbose output\n",
long_opts[i].val, long_opts[i].name);
}
int main(int argc, char *argv[])
{
int cmd_opt;
char *device = DEVICE_NAME_DEFAULT;
uint64_t address = 0;
uint64_t size = SIZE_DEFAULT;
uint64_t offset = 0;
uint64_t count = COUNT_DEFAULT;
char *ofname = NULL;
while ((cmd_opt = getopt_long(argc, argv, "vhxc:f:d:a:s:o:", long_opts,
NULL)) != -1) {
switch (cmd_opt) {
case 0:
/* long option */
break;
case 'd':
/* device node name */
device = strdup(optarg);
break;
case 'a':
/* RAM address on the AXI bus in bytes */
address = getopt_integer(optarg);
break;
/* RAM size in bytes */
case 's':
size = getopt_integer(optarg);
break;
case 'o':
offset = getopt_integer(optarg) & 4095;
break;
/* count */
case 'c':
count = getopt_integer(optarg);
break;
/* count */
case 'f':
ofname = strdup(optarg);
break;
/* print usage help and exit */
case 'x':
no_write++;
break;
case 'v':
verbose = 1;
break;
case 'h':
default:
usage(argv[0]);
exit(0);
break;
}
}
if (verbose)
fprintf(stdout,
"dev %s, addr 0x%lx, size 0x%lx, offset 0x%lx, count %lu\n",
device, address, size, offset, count);
return test_dma(device, address, size, offset, count, ofname);
}
static int test_dma(char *devname, uint64_t addr, uint64_t size,
uint64_t offset, uint64_t count, char *ofname)
{
ssize_t rc;
uint64_t i;
char *buffer = NULL;
char *allocated = NULL;
struct timespec ts_start, ts_end;
int out_fd = -1;
int fpga_fd = open(devname, O_RDWR | O_NONBLOCK);
double total_time = 0;
double result;
double avg_time = 0;
if (fpga_fd < 0) {
fprintf(stderr, "unable to open device %s, %d.\n",
devname, fpga_fd);
perror("open device");
return -EINVAL;
}
/* create file to write data to */
if (ofname) {
out_fd = open(ofname, O_RDWR | O_CREAT | O_TRUNC | O_SYNC,
0666);
if (out_fd < 0) {
fprintf(stderr, "unable to open output file %s, %d.\n",
ofname, out_fd);
perror("open output file");
rc = -EINVAL;
goto out;
}
}
posix_memalign((void **)&allocated, 4096 /*alignment */ , size + 4096);
if (!allocated) {
fprintf(stderr, "OOM %lu.\n", size + 4096);
rc = -ENOMEM;
goto out;
}
buffer = allocated + offset;
if (verbose)
fprintf(stdout, "host buffer 0x%lx, %p.\n", size + 4096, buffer);
for (i = 0; i < count; i++) {
clock_gettime(CLOCK_MONOTONIC, &ts_start);
/* lseek & read data from AXI MM into buffer using SGDMA */
rc = read_to_buffer(devname, fpga_fd, buffer, size, addr);
if (rc < 0)
goto out;
clock_gettime(CLOCK_MONOTONIC, &ts_end);
/* subtract the start time from the end time */
timespec_sub(&ts_end, &ts_start);
total_time += (ts_end.tv_sec + ((double)ts_end.tv_nsec/NSEC_DIV));
/* a bit less accurate but side-effects are accounted for */
if (verbose)
fprintf(stdout,
"#%lu: CLOCK_MONOTONIC %ld.%09ld sec. read %lu bytes\n",
i, ts_end.tv_sec, ts_end.tv_nsec, size);
/* file argument given? */
if ((out_fd >= 0) & (no_write == 0)) {
rc = write_from_buffer(ofname, out_fd, buffer,
size, i*size);
if (rc < 0)
goto out;
}
}
avg_time = (double)total_time/(double)count;
result = ((double)size)/avg_time;
if (verbose)
printf("** Avg time device %s, total time %f nsec, avg_time = %f, size = %lu, BW = %f bytes/sec\n",
devname, total_time, avg_time, size, result);
dump_throughput_result(size, result);
rc = 0;
out:
close(fpga_fd);
if (out_fd >= 0)
close(out_fd);
free(allocated);
return rc;
}
......@@ -2,8 +2,8 @@
* This file is part of the QDMA userspace application
* to enable the user to execute the QDMA functionality
*
* Copyright (c) 2018-2022, Xilinx, Inc.
* All rights reserved.
* Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
* Copyright (c) 2022, 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.1.0"
#define VERSION "2022.2.0"
#define COPYRIGHT "Copyright (c) 2018-2022 Xilinx Inc."
#endif
#
#/*
# * This file is part of the QDMA userspace application
# * to enable the user to execute the QDMA functionality
# *
# * Copyright (c) 2018-2022, Xilinx, 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)
# */
CC ?= gcc
CFLAGS += -g
#CFLAGS += -O2 -fno-inline -Wall -Wstrict-prototypes
CFLAGS += -I. -I../include -I../dma-utils
CFLAGS += $(EXTRA_FLAGS)
DMA-LATENCY = dma-latency
DMA-UTILS_OBJS := $(patsubst %.c,%.o,$(wildcard ../dma-utils/*.c))
DMA-LAT_OBJS := dmalat.o
DMA-LAT_OBJS += $(DMA-UTILS_OBJS)
ifneq ($(CROSS_COMPILE_FLAG),)
CC=$(CROSS_COMPILE_FLAG)gcc
endif
all: clean dma-latency
dma-latency: $(DMA-LAT_OBJS)
$(CC) -pthread -lrt -o $@ $^ -laio -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGE_FILE_SOURCE
%.o: %.c
$(CC) $(CFLAGS) -c -std=c99 -o $@ $< -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGE_FILE_SOURCE -D_AIO_AIX_SOURCE
clean:
@rm -f *.o */*.o ../dma-utils/*.o
rm -rf *.o *.bin dma-latency
#
#/*
# * This file is part of the QDMA userspace application
# * 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.
# *
# * This source code is licensed under BSD-style license (found in the
# * LICENSE file in the root directory of this source tree)
# */
CC ?= gcc
CFLAGS += -g
#CFLAGS += -O2 -fno-inline -Wall -Wstrict-prototypes
CFLAGS += -I. -I../include -I../dma-utils
CFLAGS += $(EXTRA_FLAGS)
DMA-LATENCY = dma-latency
DMA-UTILS_OBJS := $(patsubst %.c,%.o,$(wildcard ../dma-utils/*.c))
DMA-LAT_OBJS := dmalat.o
DMA-LAT_OBJS += $(DMA-UTILS_OBJS)
ifneq ($(CROSS_COMPILE_FLAG),)
CC=$(CROSS_COMPILE_FLAG)gcc
endif
all: clean dma-latency
dma-latency: $(DMA-LAT_OBJS)
$(CC) -pthread -lrt -o $@ $^ -laio -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGE_FILE_SOURCE
%.o: %.c
$(CC) $(CFLAGS) -c -std=c99 -o $@ $< -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGE_FILE_SOURCE -D_AIO_AIX_SOURCE
clean:
@rm -f *.o */*.o ../dma-utils/*.o
rm -rf *.o *.bin dma-latency
/*
* This file is part of the Xilinx DMA IP Core driver for Linux
*
* Copyright (c) 2018-2022, Xilinx, Inc.
* All rights reserved.
* Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
* Copyright (c) 2022, 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
......
......@@ -2,8 +2,8 @@
* This file is part of the QDMA userspace application
* to enable the user to execute the QDMA functionality
*
* Copyright (c) 2018-2022, Xilinx, Inc.
* All rights reserved.
* Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
* Copyright (c) 2022, 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)
......@@ -871,7 +871,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], 99);
ret = read(rng_sz_fd, &rng_sz[1], 100);
if (ret < 0) {
printf("Error: Could not read the file\n");
exit(1);
......
......@@ -3,8 +3,8 @@
# * This file is part of the QDMA userspace application
# * to enable the user to execute the QDMA functionality
# *
# * Copyright (c) 2018-2022, Xilinx, Inc.
# * All rights reserved.
# * Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
* Copyright (c) 2022, 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)
......
......@@ -2,8 +2,8 @@
* This file is part of the QDMA userspace application
* to enable the user to execute the QDMA functionality
*
* Copyright (c) 2018-2022, Xilinx, Inc.
* All rights reserved.
* Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
* Copyright (c) 2022, 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.1.0"
#define VERSION "2022.2.0"
#define COPYRIGHT "Copyright (c) 2018-2022 Xilinx Inc."
#endif
#
#/*
# * This file is part of the QDMA userspace application
# * to enable the user to execute the QDMA functionality
# *
# * Copyright (c) 2018-2022, Xilinx, 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)
# */
CC ?= gcc
CFLAGS += -g
#CFLAGS += -O2 -fno-inline -Wall -Wstrict-prototypes
CFLAGS += -I. -I../include -I../dma-utils
CFLAGS += $(EXTRA_FLAGS)
DMA-PERF = dma-perf
DMA-UTILS_OBJS := $(patsubst %.c,%.o,$(wildcard ../dma-utils/*.c))
DMA-PERF_OBJS := dmaperf.o
DMA-PERF_OBJS += $(DMA-UTILS_OBJS)
ifneq ($(CROSS_COMPILE_FLAG),)
CC=$(CROSS_COMPILE_FLAG)gcc
endif
all: clean dma-perf
dma-perf: $(DMA-PERF_OBJS)
$(CC) -pthread -lrt -o $@ $^ -laio -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGE_FILE_SOURCE
%.o: %.c
$(CC) $(CFLAGS) -c -std=c99 -o $@ $< -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGE_FILE_SOURCE -D_AIO_AIX_SOURCE
clean:
@rm -f *.o */*.o ../dma-utils/*.o
rm -rf *.o *.bin dma-perf
#
#/*
# * This file is part of the QDMA userspace application
# * 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.
# *
# * This source code is licensed under BSD-style license (found in the
# * LICENSE file in the root directory of this source tree)
# */
CC ?= gcc
CFLAGS += -g
#CFLAGS += -O2 -fno-inline -Wall -Wstrict-prototypes
CFLAGS += -I. -I../include -I../dma-utils
CFLAGS += $(EXTRA_FLAGS)
DMA-PERF = dma-perf
DMA-UTILS_OBJS := $(patsubst %.c,%.o,$(wildcard ../dma-utils/*.c))
DMA-PERF_OBJS := dmaperf.o
DMA-PERF_OBJS += $(DMA-UTILS_OBJS)
ifneq ($(CROSS_COMPILE_FLAG),)
CC=$(CROSS_COMPILE_FLAG)gcc
endif
all: clean dma-perf
dma-perf: $(DMA-PERF_OBJS)
$(CC) -pthread -lrt -o $@ $^ -laio -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGE_FILE_SOURCE
%.o: %.c
$(CC) $(CFLAGS) -c -std=c99 -o $@ $< -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGE_FILE_SOURCE -D_AIO_AIX_SOURCE
clean:
@rm -f *.o */*.o ../dma-utils/*.o
rm -rf *.o *.bin dma-perf
......@@ -2,8 +2,8 @@
* This file is part of the QDMA userspace application
* to enable the user to execute the QDMA functionality
*
* Copyright (c) 2018-2022, Xilinx, Inc.
* All rights reserved.
* Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
* Copyright (c) 2022, 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)
......@@ -1051,7 +1051,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], 99);
ret = read(rng_sz_fd, &rng_sz[1], 100);
if (ret < 0) {
printf("Error: Could not read the file\n");
exit(1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment