All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Miller <john.miller@atomicrules.com>
To: dev@dpdk.org
Cc: ferruh.yigit@xilinx.com, ed.czeck@atomicrules.com,
	John Miller <john.miller@atomicrules.com>
Subject: [PATCH 03/10] common/ark: move common files to common subdirectory
Date: Thu, 21 Apr 2022 10:18:53 -0500	[thread overview]
Message-ID: <20220421151900.703467-3-john.miller@atomicrules.com> (raw)
In-Reply-To: <20220421151900.703467-1-john.miller@atomicrules.com>

Add common ark files to drivers/common directory in
preparation to support Arkville baseband device.

Signed-off-by: John Miller <john.miller@atomicrules.com>
---
 drivers/common/ark/ark_common.c |   7 ++
 drivers/common/ark/ark_common.h |  48 ++++++++++++++
 drivers/common/ark/meson.build  |  13 ++++
 drivers/common/ark/version.map  | 109 ++++++++++++++++++++++++++++++++
 4 files changed, 177 insertions(+)
 create mode 100644 drivers/common/ark/ark_common.c
 create mode 100644 drivers/common/ark/ark_common.h
 create mode 100644 drivers/common/ark/meson.build
 create mode 100644 drivers/common/ark/version.map

diff --git a/drivers/common/ark/ark_common.c b/drivers/common/ark/ark_common.c
new file mode 100644
index 0000000000..18d1832ede
--- /dev/null
+++ b/drivers/common/ark/ark_common.c
@@ -0,0 +1,7 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright (c) 2020-2021 Atomic Rules LLC
+ */
+
+#include "ark_common.h"
+
+RTE_LOG_REGISTER_DEFAULT(ark_common_logtype, NOTICE);
diff --git a/drivers/common/ark/ark_common.h b/drivers/common/ark/ark_common.h
new file mode 100644
index 0000000000..6bb168098b
--- /dev/null
+++ b/drivers/common/ark/ark_common.h
@@ -0,0 +1,48 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright (c) 2015-2018 Atomic Rules LLC
+ */
+
+#ifndef _ARK_COMMON_H_
+#define _ARK_COMMON_H_
+
+#include <inttypes.h>
+#include <rte_log.h>
+
+/* system camel case definition changed to upper case */
+#define PRIU32 PRIu32
+#define PRIU64 PRIu64
+
+/* Atomic Rules vendor id */
+#define AR_VENDOR_ID 0x1d6c
+
+/*
+ * This structure is used to statically define the capabilities
+ * of supported devices.
+ * Capabilities:
+ *  rqpacing -
+ * Some HW variants require that PCIe read-requests be correctly throttled.
+ * This is called "rqpacing" and has to do with credit and flow control
+ * on certain Arkville implementations.
+ */
+struct ark_caps {
+	bool rqpacing;
+};
+struct ark_dev_caps {
+	uint32_t  device_id;
+	struct ark_caps  caps;
+};
+#define SET_DEV_CAPS(id, rqp) \
+	{id, {.rqpacing = rqp} }
+
+/* Format specifiers for string data pairs */
+#define ARK_SU32  "\n\t%-20s    %'20" PRIU32
+#define ARK_SU64  "\n\t%-20s    %'20" PRIU64
+#define ARK_SU64X "\n\t%-20s    %#20" PRIx64
+#define ARK_SPTR  "\n\t%-20s    %20p"
+
+extern int ark_common_logtype;
+
+#define ARK_PMD_LOG(level, fmt, args...)	\
+	rte_log(RTE_LOG_ ##level, ark_common_logtype, "ARK_COMMON: " fmt, ## args)
+
+#endif
diff --git a/drivers/common/ark/meson.build b/drivers/common/ark/meson.build
new file mode 100644
index 0000000000..fbdfceecea
--- /dev/null
+++ b/drivers/common/ark/meson.build
@@ -0,0 +1,13 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright 2019 Mellanox Technologies, Ltd
+
+sources += files(
+	'ark_ddm.c',
+	'ark_common.c',
+	'ark_mpu.c',
+	'ark_pktchkr.c',
+	'ark_pktdir.c',
+	'ark_pktgen.c',
+	'ark_rqp.c',
+	'ark_udm.c'
+)
diff --git a/drivers/common/ark/version.map b/drivers/common/ark/version.map
new file mode 100644
index 0000000000..063d065df2
--- /dev/null
+++ b/drivers/common/ark/version.map
@@ -0,0 +1,109 @@
+DPDK_22 {
+	local: *;
+};
+
+INTERNAL {
+	global:
+
+	ark_api_num_queues;
+	ark_api_num_queues_per_port;
+
+	ark_ddm_dump;
+	ark_ddm_dump_stats;
+	ark_ddm_is_stopped;
+	ark_ddm_queue_byte_count;
+	ark_ddm_queue_pkt_count;
+	ark_ddm_queue_reset_stats;
+	ark_ddm_reset;
+	ark_ddm_setup;
+	ark_ddm_start;
+	ark_ddm_stats_reset;
+	ark_ddm_stop;
+	ark_ddm_verify;
+
+	ark_mpu_configure;
+	ark_mpu_dump;
+	ark_mpu_dump_setup;
+	ark_mpu_reset;
+	ark_mpu_reset_stats;
+	ark_mpu_start;
+	ark_mpu_stop;
+	ark_mpu_verify;
+
+	ark_pktchkr_dump_stats;
+	ark_pktchkr_get_pkts_sent;
+	ark_pktchkr_init;
+	ark_pktchkr_is_running;
+	ark_pktchkr_parse;
+	ark_pktchkr_run;
+	ark_pktchkr_set_dst_mac_addr;
+	ark_pktchkr_set_eth_type;
+	ark_pktchkr_set_hdr_dW;
+	ark_pktchkr_set_num_pkts;
+	ark_pktchkr_set_payload_byte;
+	ark_pktchkr_set_pkt_size_incr;
+	ark_pktchkr_set_pkt_size_max;
+	ark_pktchkr_set_pkt_size_min;
+	ark_pktchkr_set_src_mac_addr;
+	ark_pktchkr_setup;
+	ark_pktchkr_stop;
+	ark_pktchkr_stopped;
+	ark_pktchkr_uninit;
+	ark_pktchkr_wait_done;
+	ark_pktdir_init;
+	ark_pktdir_setup;
+	ark_pktdir_stall_cnt;
+	ark_pktdir_status;
+	ark_pktdir_uninit;
+
+	ark_pktgen_get_pkts_sent;
+	ark_pktgen_init;
+	ark_pktgen_is_gen_forever;
+	ark_pktgen_is_running;
+	ark_pktgen_parse;
+	ark_pktgen_pause;
+	ark_pktgen_paused;
+	ark_pktgen_reset;
+	ark_pktgen_run;
+	ark_pktgen_set_dst_mac_addr;
+	ark_pktgen_set_eth_type;
+	ark_pktgen_set_hdr_dW;
+	ark_pktgen_set_num_pkts;
+	ark_pktgen_set_payload_byte;
+	ark_pktgen_set_pkt_size_incr;
+	ark_pktgen_set_pkt_size_max;
+	ark_pktgen_set_pkt_size_min;
+	ark_pktgen_set_pkt_spacing;
+	ark_pktgen_set_src_mac_addr;
+	ark_pktgen_set_start_offset;
+	ark_pktgen_setup;
+	ark_pktgen_tx_done;
+	ark_pktgen_uninit;
+	ark_pktgen_wait_done;
+
+	ark_rqp_dump;
+	ark_rqp_lasped;
+	ark_rqp_stats_reset;
+
+	ark_udm_bytes;
+	ark_udm_configure;
+	ark_udm_dropped;
+	ark_udm_dump;
+	ark_udm_dump_perf;
+	ark_udm_dump_queue_stats;
+	ark_udm_dump_setup;
+	ark_udm_dump_stats;
+	ark_udm_is_flushed;
+	ark_udm_packets;
+	ark_udm_queue_enable;
+	ark_udm_queue_stats_reset;
+	ark_udm_reset;
+	ark_udm_start;
+	ark_udm_stats_reset;
+	ark_udm_stop;
+	ark_udm_verify;
+	ark_udm_write_addr;
+	ark_pktgen_delay_start;
+
+	local: *;
+};
-- 
2.25.1


  parent reply	other threads:[~2022-04-21 15:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-21 15:18 [PATCH 01/10] doc/guides/bbdevs: add ark baseband device documentation John Miller
2022-04-21 15:18 ` [PATCH 02/10] common/ark: create common subdirectory for baseband support John Miller
2022-04-21 15:18 ` John Miller [this message]
2022-04-21 15:18 ` [PATCH 04/10] common/meson.build: John Miller
2022-04-21 15:18 ` [PATCH 05/10] baseband/ark: add ark baseband device John Miller
2022-04-27 18:38   ` Chautru, Nicolas
2022-04-28 10:01     ` John Miller
2022-04-21 15:18 ` [PATCH 06/10] net/ark: add ark PMD log interface John Miller
2022-04-21 15:18 ` [PATCH 07/10] maintainers: add baseband ark maintainers John Miller
2022-04-21 15:18 ` [PATCH 08/10] baseband/ark: add ark baseband user extensions John Miller
2022-04-21 15:18 ` [PATCH 09/10] baseband/meson.build: John Miller
2022-04-21 15:19 ` [PATCH 10/10] net/ark: repair meson dependency format John Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220421151900.703467-3-john.miller@atomicrules.com \
    --to=john.miller@atomicrules.com \
    --cc=dev@dpdk.org \
    --cc=ed.czeck@atomicrules.com \
    --cc=ferruh.yigit@xilinx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.