Skip to contentSkip to conversation

add telemetry for inline IPsec

PATCH Applied Ankur Dwivedi 3 participants 8 messages Feb 10, 2022 – Feb 17, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover add telemetry for inline IPsec

Adds telemetry function for inline ipsec in net CNXK driver.

This series depends on the following patch series:

Series: Adding new features and improvements in cnxk crypto PMD
http://patches.dpdk.org/project/dpdk/list/?series=21433

Ankur Dwivedi (2):
net/cnxk: add telemetry for inline IPsec for cn9k net/cnxk: add telemetry for inline IPsec for cn10k

 drivers/net/cnxk/cnxk_ethdev_sec_telemetry.c | 292 +++++++++++++++++++
 drivers/net/cnxk/meson.build                 |   1 +
 2 files changed, 293 insertions(+)
 create mode 100644 drivers/net/cnxk/cnxk_ethdev_sec_telemetry.c
Signature · 1 line
2.28.0
#1 lore raw

PATCH 1/2 net/cnxk: add telemetry for inline IPsec for cn9k

Adds telemetry function to get information about inline outbound and inline inbound sa's. The function takes port id as input. Some fields in the structures roc_onf_ipsec_outb_sa and roc_onf_ipsec_inb_sa are returned as output.

---
 drivers/net/cnxk/cnxk_ethdev_sec_telemetry.c | 140 +++++++++++++++++++
 drivers/net/cnxk/meson.build                 |   1 +
 2 files changed, 141 insertions(+)
 create mode 100644 drivers/net/cnxk/cnxk_ethdev_sec_telemetry.c
drivers/net/cnxk/cnxk_ethdev_sec_telemetry.c new file +140 -0
new file mode 100644
index 0000000000..83015e11e2
@@ -0,0 +1,140 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(C) 2022 Marvell.
+ */
+
+#include <rte_telemetry.h>
+
+#include <roc_api.h>
+
+#include "cnxk_ethdev.h"
+
+#define STR_MAXLEN 20
+#define W0_MAXLEN  21
+
+static int
+copy_outb_sa_9k(struct rte_tel_data *d, uint32_t i, void *sa)
+{
+	struct roc_onf_ipsec_outb_sa *out_sa;
+	union {
+		struct roc_ie_onf_sa_ctl ctl;
+		uint64_t u64;
+	} w0;
+	char strw0[W0_MAXLEN];
+	char str[STR_MAXLEN];
+
+	out_sa = (struct roc_onf_ipsec_outb_sa *)sa;
+	w0.ctl = out_sa->ctl;
+
+	snprintf(str, sizeof(str), "outsa_w0_%u", i);
+	snprintf(strw0, sizeof(strw0), "%" PRIu64, w0.u64);
+	rte_tel_data_add_dict_string(d, str, strw0);
+
+	snprintf(str, sizeof(str), "outsa_src_%u", i);
+	rte_tel_data_add_dict_u64(d, str, out_sa->udp_src);
+
+	snprintf(str, sizeof(str), "outsa_dst_%u", i);
+	rte_tel_data_add_dict_u64(d, str, out_sa->udp_dst);
+
+	snprintf(str, sizeof(str), "outsa_isrc_%u", i);
+	rte_tel_data_add_dict_u64(d, str, out_sa->ip_src);
+
+	snprintf(str, sizeof(str), "outsa_idst_%u", i);
+	rte_tel_data_add_dict_u64(d, str, out_sa->ip_dst);
+
+	return 0;
+}
+
+static int
+copy_inb_sa_9k(struct rte_tel_data *d, uint32_t i, void *sa)
+{
+	struct roc_onf_ipsec_inb_sa *in_sa;
+	union {
+		struct roc_ie_onf_sa_ctl ctl;
+		uint64_t u64;
+	} w0;
+	char strw0[W0_MAXLEN];
+	char str[STR_MAXLEN];
+
+	in_sa = (struct roc_onf_ipsec_inb_sa *)sa;
+	w0.ctl = in_sa->ctl;
+
+	snprintf(str, sizeof(str), "insa_w0_%u", i);
+	snprintf(strw0, sizeof(strw0), "%" PRIu64, w0.u64);
+	rte_tel_data_add_dict_string(d, str, strw0);
+
+	snprintf(str, sizeof(str), "insa_esnh_%u", i);
+	rte_tel_data_add_dict_u64(d, str, in_sa->esn_hi);
+
+	snprintf(str, sizeof(str), "insa_esnl_%u", i);
+	rte_tel_data_add_dict_u64(d, str, in_sa->esn_low);
+
+	return 0;
+}
+
+static int
+ethdev_sec_tel_handle_info(const char *cmd __rte_unused, const char *params,
+			   struct rte_tel_data *d)
+{
+	struct cnxk_eth_sec_sess *eth_sec, *tvar;
+	struct rte_eth_dev *eth_dev;
+	struct cnxk_eth_dev *dev;
+	uint16_t port_id;
+	char *end_p;
+	uint32_t i;
+	int ret;
+
+	port_id = strtoul(params, &end_p, 0);
+	if (errno != 0)
+		return -EINVAL;
+
+	if (*end_p != '\0')
+		plt_err("Extra parameters passed to telemetry, ignoring it");
+
+	if (!rte_eth_dev_is_valid_port(port_id)) {
+		plt_err("Invalid port id %u", port_id);
+		return -EINVAL;
+	}
+
+	eth_dev = &rte_eth_devices[port_id];
+	if (!eth_dev) {
+		plt_err("Ethdev not available");
+		return -EINVAL;
+	}
+
+	dev = cnxk_eth_pmd_priv(eth_dev);
+
+	rte_tel_data_start_dict(d);
+
+	rte_tel_data_add_dict_int(d, "nb_outb_sa", dev->outb.nb_sess);
+
+	i = 0;
+	if (dev->tx_offloads & RTE_ETH_TX_OFFLOAD_SECURITY) {
+		tvar = NULL;
+		RTE_TAILQ_FOREACH_SAFE(eth_sec, &dev->outb.list, entry, tvar) {
+			ret = copy_outb_sa_9k(d, i++, eth_sec->sa);
+			if (ret < 0)
+				return ret;
+		}
+	}
+
+	rte_tel_data_add_dict_int(d, "nb_inb_sa", dev->inb.nb_sess);
+
+	i = 0;
+	if (dev->rx_offloads & RTE_ETH_RX_OFFLOAD_SECURITY) {
+		tvar = NULL;
+		RTE_TAILQ_FOREACH_SAFE(eth_sec, &dev->inb.list, entry, tvar) {
+			ret = copy_inb_sa_9k(d, i++, eth_sec->sa);
+			if (ret < 0)
+				return ret;
+		}
+	}
+
+	return 0;
+}
+
+RTE_INIT(cnxk_ipsec_init_telemetry)
+{
+	rte_telemetry_register_cmd("/cnxk/ipsec/info",
+				   ethdev_sec_tel_handle_info,
+				   "Returns ipsec info. Parameters: port id");
+}
drivers/net/cnxk/meson.build +1 -0
index cd8c13bd1c..83af1f4d0c 100644
@@ -15,6 +15,7 @@ sources = files(
         'cnxk_ethdev_ops.c',
         'cnxk_ethdev_sec.c',
         'cnxk_ethdev_telemetry.c',
+        'cnxk_ethdev_sec_telemetry.c',
         'cnxk_link.c',
         'cnxk_lookup.c',
         'cnxk_ptp.c',
Signature · 1 line
2.28.0
Acked-by on v1 1/2 Applied
#2 lore raw

Re: [PATCH 1/2] net/cnxk: add telemetry for inline IPsec for cn9k

Quoted 5 lines · Ankur Dwivedi

Adds telemetry function to get information about inline outbound and inline inbound sa's. The function takes port id as input. Some fields in the structures roc_onf_ipsec_outb_sa and roc_onf_ipsec_inb_sa are returned as output.

Applied to dpdk-next-net-mrvl/for-next-net. Thanks

Quoted 170 lines
---
 drivers/net/cnxk/cnxk_ethdev_sec_telemetry.c | 140 +++++++++++++++++++
 drivers/net/cnxk/meson.build                 |   1 +
 2 files changed, 141 insertions(+)
 create mode 100644 drivers/net/cnxk/cnxk_ethdev_sec_telemetry.c
drivers/net/cnxk/cnxk_ethdev_sec_telemetry.c new file +140 -0
new file mode 100644
index 0000000000..83015e11e2
@@ -0,0 +1,140 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(C) 2022 Marvell.
+ */
+
+#include <rte_telemetry.h>
+
+#include <roc_api.h>
+
+#include "cnxk_ethdev.h"
+
+#define STR_MAXLEN 20
+#define W0_MAXLEN  21
+
+static int
+copy_outb_sa_9k(struct rte_tel_data *d, uint32_t i, void *sa)
+{
+       struct roc_onf_ipsec_outb_sa *out_sa;
+       union {
+               struct roc_ie_onf_sa_ctl ctl;
+               uint64_t u64;
+       } w0;
+       char strw0[W0_MAXLEN];
+       char str[STR_MAXLEN];
+
+       out_sa = (struct roc_onf_ipsec_outb_sa *)sa;
+       w0.ctl = out_sa->ctl;
+
+       snprintf(str, sizeof(str), "outsa_w0_%u", i);
+       snprintf(strw0, sizeof(strw0), "%" PRIu64, w0.u64);
+       rte_tel_data_add_dict_string(d, str, strw0);
+
+       snprintf(str, sizeof(str), "outsa_src_%u", i);
+       rte_tel_data_add_dict_u64(d, str, out_sa->udp_src);
+
+       snprintf(str, sizeof(str), "outsa_dst_%u", i);
+       rte_tel_data_add_dict_u64(d, str, out_sa->udp_dst);
+
+       snprintf(str, sizeof(str), "outsa_isrc_%u", i);
+       rte_tel_data_add_dict_u64(d, str, out_sa->ip_src);
+
+       snprintf(str, sizeof(str), "outsa_idst_%u", i);
+       rte_tel_data_add_dict_u64(d, str, out_sa->ip_dst);
+
+       return 0;
+}
+
+static int
+copy_inb_sa_9k(struct rte_tel_data *d, uint32_t i, void *sa)
+{
+       struct roc_onf_ipsec_inb_sa *in_sa;
+       union {
+               struct roc_ie_onf_sa_ctl ctl;
+               uint64_t u64;
+       } w0;
+       char strw0[W0_MAXLEN];
+       char str[STR_MAXLEN];
+
+       in_sa = (struct roc_onf_ipsec_inb_sa *)sa;
+       w0.ctl = in_sa->ctl;
+
+       snprintf(str, sizeof(str), "insa_w0_%u", i);
+       snprintf(strw0, sizeof(strw0), "%" PRIu64, w0.u64);
+       rte_tel_data_add_dict_string(d, str, strw0);
+
+       snprintf(str, sizeof(str), "insa_esnh_%u", i);
+       rte_tel_data_add_dict_u64(d, str, in_sa->esn_hi);
+
+       snprintf(str, sizeof(str), "insa_esnl_%u", i);
+       rte_tel_data_add_dict_u64(d, str, in_sa->esn_low);
+
+       return 0;
+}
+
+static int
+ethdev_sec_tel_handle_info(const char *cmd __rte_unused, const char *params,
+                          struct rte_tel_data *d)
+{
+       struct cnxk_eth_sec_sess *eth_sec, *tvar;
+       struct rte_eth_dev *eth_dev;
+       struct cnxk_eth_dev *dev;
+       uint16_t port_id;
+       char *end_p;
+       uint32_t i;
+       int ret;
+
+       port_id = strtoul(params, &end_p, 0);
+       if (errno != 0)
+               return -EINVAL;
+
+       if (*end_p != '\0')
+               plt_err("Extra parameters passed to telemetry, ignoring it");
+
+       if (!rte_eth_dev_is_valid_port(port_id)) {
+               plt_err("Invalid port id %u", port_id);
+               return -EINVAL;
+       }
+
+       eth_dev = &rte_eth_devices[port_id];
+       if (!eth_dev) {
+               plt_err("Ethdev not available");
+               return -EINVAL;
+       }
+
+       dev = cnxk_eth_pmd_priv(eth_dev);
+
+       rte_tel_data_start_dict(d);
+
+       rte_tel_data_add_dict_int(d, "nb_outb_sa", dev->outb.nb_sess);
+
+       i = 0;
+       if (dev->tx_offloads & RTE_ETH_TX_OFFLOAD_SECURITY) {
+               tvar = NULL;
+               RTE_TAILQ_FOREACH_SAFE(eth_sec, &dev->outb.list, entry, tvar) {
+                       ret = copy_outb_sa_9k(d, i++, eth_sec->sa);
+                       if (ret < 0)
+                               return ret;
+               }
+       }
+
+       rte_tel_data_add_dict_int(d, "nb_inb_sa", dev->inb.nb_sess);
+
+       i = 0;
+       if (dev->rx_offloads & RTE_ETH_RX_OFFLOAD_SECURITY) {
+               tvar = NULL;
+               RTE_TAILQ_FOREACH_SAFE(eth_sec, &dev->inb.list, entry, tvar) {
+                       ret = copy_inb_sa_9k(d, i++, eth_sec->sa);
+                       if (ret < 0)
+                               return ret;
+               }
+       }
+
+       return 0;
+}
+
+RTE_INIT(cnxk_ipsec_init_telemetry)
+{
+       rte_telemetry_register_cmd("/cnxk/ipsec/info",
+                                  ethdev_sec_tel_handle_info,
+                                  "Returns ipsec info. Parameters: port id");
+}
drivers/net/cnxk/meson.build +1 -1
index cd8c13bd1c..83af1f4d0c 100644
@@ -15,6 +15,7 @@ sources = files(
         'cnxk_ethdev_ops.c',
         'cnxk_ethdev_sec.c',
         'cnxk_ethdev_telemetry.c',
+        'cnxk_ethdev_sec_telemetry.c',
         'cnxk_link.c',
         'cnxk_lookup.c',
         'cnxk_ptp.c',
--

2.28.0

#3 lore raw

PATCH 2/2 net/cnxk: add telemetry for inline IPsec for cn10k

In reply to Ankur Dwivedi

Adds telemetry function to get information about inline outbound and inline inbound sa's. The function takes port id as input. Some fields in the structures roc_ot_ipsec_outb_sa and roc_ot_ipsec_inb_sa are returned as output.

---
 drivers/net/cnxk/cnxk_ethdev_sec_telemetry.c | 156 ++++++++++++++++++-
 1 file changed, 154 insertions(+), 2 deletions(-)
drivers/net/cnxk/cnxk_ethdev_sec_telemetry.c +154 -2
index 83015e11e2..dfad5af8fe 100644
@@ -71,6 +71,152 @@ copy_inb_sa_9k(struct rte_tel_data *d, uint32_t i, void *sa)
 	return 0;
 }
 
+static int
+copy_outb_sa_10k(struct rte_tel_data *d, uint32_t i, void *sa)
+{
+	struct roc_ot_ipsec_outb_sa *out_sa;
+	struct rte_tel_data *outer_hdr;
+	char str[STR_MAXLEN];
+	char s64[W0_MAXLEN];
+	uint32_t j;
+
+	out_sa = (struct roc_ot_ipsec_outb_sa *)sa;
+
+	snprintf(str, sizeof(str), "outsa_w0_%u", i);
+	snprintf(s64, sizeof(s64), "%" PRIu64, out_sa->w0.u64);
+	rte_tel_data_add_dict_string(d, str, s64);
+
+	snprintf(str, sizeof(str), "outsa_w1_%u", i);
+	snprintf(s64, sizeof(s64), "%" PRIu64, out_sa->w1.u64);
+	rte_tel_data_add_dict_string(d, str, s64);
+
+	snprintf(str, sizeof(str), "outsa_w2_%u", i);
+	snprintf(s64, sizeof(s64), "%" PRIu64, out_sa->w2.u64);
+	rte_tel_data_add_dict_string(d, str, s64);
+
+	snprintf(str, sizeof(str), "outsa_w10_%u", i);
+	snprintf(s64, sizeof(s64), "%" PRIu64, out_sa->w10.u64);
+	rte_tel_data_add_dict_string(d, str, s64);
+
+	outer_hdr = rte_tel_data_alloc();
+	if (!outer_hdr) {
+		plt_err("Could not allocate space for outer header");
+		return -ENOMEM;
+	}
+
+	rte_tel_data_start_array(outer_hdr, RTE_TEL_U64_VAL);
+
+	for (j = 0; j < RTE_DIM(out_sa->outer_hdr.ipv6.src_addr); j++)
+		rte_tel_data_add_array_u64(outer_hdr,
+					   out_sa->outer_hdr.ipv6.src_addr[j]);
+
+	for (j = 0; j < RTE_DIM(out_sa->outer_hdr.ipv6.dst_addr); j++)
+		rte_tel_data_add_array_u64(outer_hdr,
+					   out_sa->outer_hdr.ipv6.dst_addr[j]);
+
+	snprintf(str, sizeof(str), "outsa_outer_hdr_%u", i);
+	rte_tel_data_add_dict_container(d, str, outer_hdr, 0);
+
+	snprintf(str, sizeof(str), "outsa_errctl_%u", i);
+	snprintf(s64, sizeof(s64), "%" PRIu64, out_sa->ctx.err_ctl.u64);
+	rte_tel_data_add_dict_string(d, str, s64);
+
+	snprintf(str, sizeof(str), "outsa_esnval_%u", i);
+	snprintf(s64, sizeof(s64), "%" PRIu64, out_sa->ctx.esn_val);
+	rte_tel_data_add_dict_string(d, str, s64);
+
+	snprintf(str, sizeof(str), "outsa_hl_%u", i);
+	snprintf(s64, sizeof(s64), "%" PRIu64, out_sa->ctx.hard_life);
+	rte_tel_data_add_dict_string(d, str, s64);
+
+	snprintf(str, sizeof(str), "outsa_sl_%u", i);
+	snprintf(s64, sizeof(s64), "%" PRIu64, out_sa->ctx.soft_life);
+	rte_tel_data_add_dict_string(d, str, s64);
+
+	snprintf(str, sizeof(str), "outsa_octs_%u", i);
+	snprintf(s64, sizeof(s64), "%" PRIu64, out_sa->ctx.mib_octs);
+	rte_tel_data_add_dict_string(d, str, s64);
+
+	snprintf(str, sizeof(str), "outsa_pkts_%u", i);
+	snprintf(s64, sizeof(s64), "%" PRIu64, out_sa->ctx.mib_pkts);
+	rte_tel_data_add_dict_string(d, str, s64);
+
+	return 0;
+}
+
+static int
+copy_inb_sa_10k(struct rte_tel_data *d, uint32_t i, void *sa)
+{
+	struct roc_ot_ipsec_inb_sa *in_sa;
+	struct rte_tel_data *outer_hdr;
+	char str[STR_MAXLEN];
+	char s64[W0_MAXLEN];
+	uint32_t j;
+
+	in_sa = (struct roc_ot_ipsec_inb_sa *)sa;
+
+	snprintf(str, sizeof(str), "insa_w0_%u", i);
+	snprintf(s64, sizeof(s64), "%" PRIu64, in_sa->w0.u64);
+	rte_tel_data_add_dict_string(d, str, s64);
+
+	snprintf(str, sizeof(str), "insa_w1_%u", i);
+	snprintf(s64, sizeof(s64), "%" PRIu64, in_sa->w1.u64);
+	rte_tel_data_add_dict_string(d, str, s64);
+
+	snprintf(str, sizeof(str), "insa_w2_%u", i);
+	snprintf(s64, sizeof(s64), "%" PRIu64, in_sa->w2.u64);
+	rte_tel_data_add_dict_string(d, str, s64);
+
+	snprintf(str, sizeof(str), "insa_w10_%u", i);
+	snprintf(s64, sizeof(s64), "%" PRIu64, in_sa->w10.u64);
+	rte_tel_data_add_dict_string(d, str, s64);
+
+	outer_hdr = rte_tel_data_alloc();
+	if (!outer_hdr) {
+		plt_err("Could not allocate space for outer header");
+		return -ENOMEM;
+	}
+
+	rte_tel_data_start_array(outer_hdr, RTE_TEL_U64_VAL);
+
+	for (j = 0; j < RTE_DIM(in_sa->outer_hdr.ipv6.src_addr); j++)
+		rte_tel_data_add_array_u64(outer_hdr,
+					   in_sa->outer_hdr.ipv6.src_addr[j]);
+
+	for (j = 0; j < RTE_DIM(in_sa->outer_hdr.ipv6.dst_addr); j++)
+		rte_tel_data_add_array_u64(outer_hdr,
+					   in_sa->outer_hdr.ipv6.dst_addr[j]);
+
+	snprintf(str, sizeof(str), "insa_outer_hdr_%u", i);
+	rte_tel_data_add_dict_container(d, str, outer_hdr, 0);
+
+	snprintf(str, sizeof(str), "insa_arbase_%u", i);
+	snprintf(s64, sizeof(s64), "%" PRIu64, in_sa->ctx.ar_base);
+	rte_tel_data_add_dict_string(d, str, s64);
+
+	snprintf(str, sizeof(str), "insa_ar_validm_%u", i);
+	snprintf(s64, sizeof(s64), "%" PRIu64, in_sa->ctx.ar_valid_mask);
+	rte_tel_data_add_dict_string(d, str, s64);
+
+	snprintf(str, sizeof(str), "insa_hl_%u", i);
+	snprintf(s64, sizeof(s64), "%" PRIu64, in_sa->ctx.hard_life);
+	rte_tel_data_add_dict_string(d, str, s64);
+
+	snprintf(str, sizeof(str), "insa_sl_%u", i);
+	snprintf(s64, sizeof(s64), "%" PRIu64, in_sa->ctx.soft_life);
+	rte_tel_data_add_dict_string(d, str, s64);
+
+	snprintf(str, sizeof(str), "insa_octs_%u", i);
+	snprintf(s64, sizeof(s64), "%" PRIu64, in_sa->ctx.mib_octs);
+	rte_tel_data_add_dict_string(d, str, s64);
+
+	snprintf(str, sizeof(str), "insa_pkts_%u", i);
+	snprintf(s64, sizeof(s64), "%" PRIu64, in_sa->ctx.mib_pkts);
+	rte_tel_data_add_dict_string(d, str, s64);
+
+	return 0;
+}
+
 static int
 ethdev_sec_tel_handle_info(const char *cmd __rte_unused, const char *params,
 			   struct rte_tel_data *d)
@@ -111,7 +257,10 @@ ethdev_sec_tel_handle_info(const char *cmd __rte_unused, const char *params,
 	if (dev->tx_offloads & RTE_ETH_TX_OFFLOAD_SECURITY) {
 		tvar = NULL;
 		RTE_TAILQ_FOREACH_SAFE(eth_sec, &dev->outb.list, entry, tvar) {
-			ret = copy_outb_sa_9k(d, i++, eth_sec->sa);
+			if (roc_model_is_cn10k())
+				ret = copy_outb_sa_10k(d, i++, eth_sec->sa);
+			else
+				ret = copy_outb_sa_9k(d, i++, eth_sec->sa);
 			if (ret < 0)
 				return ret;
 		}
@@ -123,7 +272,10 @@ ethdev_sec_tel_handle_info(const char *cmd __rte_unused, const char *params,
 	if (dev->rx_offloads & RTE_ETH_RX_OFFLOAD_SECURITY) {
 		tvar = NULL;
 		RTE_TAILQ_FOREACH_SAFE(eth_sec, &dev->inb.list, entry, tvar) {
-			ret = copy_inb_sa_9k(d, i++, eth_sec->sa);
+			if (roc_model_is_cn10k())
+				ret = copy_inb_sa_10k(d, i++, eth_sec->sa);
+			else
+				ret = copy_inb_sa_9k(d, i++, eth_sec->sa);
 			if (ret < 0)
 				return ret;
 		}
Signature · 1 line
2.28.0
#4 lore raw
In reply to Ankur Dwivedi
Quoted 10 lines · Ankur Dwivedi

Adds telemetry function for inline ipsec in net CNXK driver.

This series depends on the following patch series:

Series: Adding new features and improvements in cnxk crypto PMD
http://patches.dpdk.org/project/dpdk/list/?series=21433

Ankur Dwivedi (2): net/cnxk: add telemetry for inline IPsec for cn9k net/cnxk: add telemetry for inline IPsec for cn10k

Out of interest, is there any of this telemetry that could be made generic and apply at a device-class or library level rather than being tied to the cnxk driver only?

#5 lore raw

Hi Bruce,

Please see my comment inline.

Regards,
Ankur

Quoted 30 lines

-----Original Message-----
From: Bruce Richardson <[email protected]>
Sent: Thursday, February 10, 2022 2:42 PM
To: Ankur Dwivedi <[email protected]>
Cc: [email protected]; Nithin Kumar Dabilpuram <[email protected]>; Kiran Kumar Kokkilagadda <[email protected]>; Sunil Kumar Kori <[email protected]>; Satha Koteswara Rao Kottidi <[email protected]>; Jerin Jacob Kollanukkaran <[email protected]>; Anoob Joseph <[email protected]>; Tejasree Kondoj <[email protected]>
Subject: [EXT] Re: [PATCH 0/2] add telemetry for inline IPsec

External Email

----------------------------------------------------------------------

Quoted 7 lines · Ankur Dwivedi

Adds telemetry function for inline ipsec in net CNXK driver.

This series depends on the following patch series:

Series: Adding new features and improvements in cnxk crypto PMD
https://urldefense.proofpoint.com/v2/url?u=http-3A__patches.dpdk.org_p
roject_dpdk_list_-3Fseries-

3D21433&d=DwIBAg&c=nKjWec2b6R0mOyPaz7xtfQ&r

Quoted 1 line

=ILjiNF3GF25y6QdHZUxMl6JrStU0MIuCtO5dMzn3Ybk&m=szcLmV4s_NiVroE4B vC5yW6

Quoted 1 line

litxm6Pfo2ymX7QhE1qDSpKTa56lnfmMqfnohRfI6&s=VtKHr9SAo3R0g7lGPoSJlg xVxn

Quoted 8 lines
Quoted 5 lines

r2t_TYhHbfH7rS4sE&e=

Ankur Dwivedi (2): net/cnxk: add telemetry for inline IPsec for cn9k net/cnxk: add telemetry for inline IPsec for cn10k

Out of interest, is there any of this telemetry that could be made generic and apply at a device-class or library level rather than being tied to the cnxk driver only?

I could think of that the callback function registered in rte_telemetry_register_cmd() can be a generic one. The net device (eth_dev) may have ops registered, which can be called depending on dev->tx_offloads and dev->rx_offloads flags. However the data to be returned by telemetry might depend on the PMD. Please let me know if this is possible.

#6 lore raw
Quoted 39 lines · Ankur Dwivedi

Hi Bruce,

Please see my comment inline.

Regards,
Ankur

Quoted 32 lines

-----Original Message-----
From: Bruce Richardson <[email protected]>
Sent: Thursday, February 10, 2022 2:42 PM
To: Ankur Dwivedi <[email protected]>
Cc: [email protected]; Nithin Kumar Dabilpuram <[email protected]>; Kiran Kumar Kokkilagadda <[email protected]>; Sunil Kumar Kori <[email protected]>; Satha Koteswara Rao Kottidi <[email protected]>; Jerin Jacob Kollanukkaran <[email protected]>; Anoob Joseph <[email protected]>; Tejasree Kondoj <[email protected]>
Subject: [EXT] Re: [PATCH 0/2] add telemetry for inline IPsec

External Email

----------------------------------------------------------------------

Quoted 7 lines · Ankur Dwivedi

Adds telemetry function for inline ipsec in net CNXK driver.

This series depends on the following patch series:

Series: Adding new features and improvements in cnxk crypto PMD
https://urldefense.proofpoint.com/v2/url?u=http-3A__patches.dpdk.org_p
roject_dpdk_list_-3Fseries-

3D21433&d=DwIBAg&c=nKjWec2b6R0mOyPaz7xtfQ&r

Quoted 1 line

=ILjiNF3GF25y6QdHZUxMl6JrStU0MIuCtO5dMzn3Ybk&m=szcLmV4s_NiVroE4B vC5yW6

Quoted 1 line

litxm6Pfo2ymX7QhE1qDSpKTa56lnfmMqfnohRfI6&s=VtKHr9SAo3R0g7lGPoSJlg xVxn

Quoted 2 lines

r2t_TYhHbfH7rS4sE&e=

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

Ankur Dwivedi (2): net/cnxk: add telemetry for inline IPsec for cn9k net/cnxk: add telemetry for inline IPsec for cn10k

Out of interest, is there any of this telemetry that could be made generic and apply at a device-class or library level rather than being tied to the cnxk driver only?

I could think of that the callback function registered in rte_telemetry_register_cmd() can be a generic one. The net device (eth_dev) may have ops registered, which can be called depending on dev->tx_offloads and dev->rx_offloads flags. However the data to be returned by telemetry might depend on the PMD. Please let me know if this is possible.

Thanks. So if I understand you correctly, the information returned would vary based on the offload flags only? If that is the case, it does sound like it could be generic, where the offload flags field in the return information identify what other fields are present in the reply. That would then make the telemetry generic and possible to implement at the ethdev level. Is that all correct?

#7 lore raw
Quoted 72 lines

-----Original Message-----
From: Bruce Richardson <[email protected]>
Sent: Thursday, February 10, 2022 5:02 PM
To: Ankur Dwivedi <[email protected]>
Cc: [email protected]; Nithin Kumar Dabilpuram <[email protected]>; Kiran Kumar Kokkilagadda <[email protected]>; Sunil Kumar Kori <[email protected]>; Satha Koteswara Rao Kottidi <[email protected]>; Jerin Jacob Kollanukkaran <[email protected]>; Anoob Joseph <[email protected]>; Tejasree Kondoj <[email protected]>; [email protected]
Subject: Re: [EXT] Re: [PATCH 0/2] add telemetry for inline IPsec

Quoted 12 lines · Ankur Dwivedi

Hi Bruce,

Please see my comment inline.

Regards,
Ankur

Quoted 5 lines

-----Original Message-----
From: Bruce Richardson <[email protected]>
Sent: Thursday, February 10, 2022 2:42 PM
To: Ankur Dwivedi <[email protected]>
Cc: [email protected]; Nithin Kumar Dabilpuram

<[email protected]>;

Quoted 15 lines
Quoted 15 lines

Kiran Kumar Kokkilagadda <[email protected]>; Sunil Kumar Kori <[email protected]>; Satha Koteswara Rao Kottidi <[email protected]>; Jerin Jacob Kollanukkaran <[email protected]>; Anoob Joseph <[email protected]>; Tejasree Kondoj <[email protected]>
Subject: [EXT] Re: [PATCH 0/2] add telemetry for inline IPsec

External Email

---------------------------------------------------------------------

Quoted 4 lines · Ankur Dwivedi

Adds telemetry function for inline ipsec in net CNXK driver.

This series depends on the following patch series:

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

Series: Adding new features and improvements in cnxk crypto PMD
https://urldefense.proofpoint.com/v2/url?u=http-3A__patches.dpdk.or
g_p
roject_dpdk_list_-3Fseries-

3D21433&d=DwIBAg&c=nKjWec2b6R0mOyPaz7xtfQ&r

Quoted 1 line

=ILjiNF3GF25y6QdHZUxMl6JrStU0MIuCtO5dMzn3Ybk&m=szcLmV4s_NiVroE4

B

Quoted 4 lines
Quoted 2 lines

vC5yW6

Quoted 1 line

litxm6Pfo2ymX7QhE1qDSpKTa56lnfmMqfnohRfI6&s=VtKHr9SAo3R0g7lGPoSJl

g

Quoted 11 lines
Quoted 10 lines

xVxn

Quoted 6 lines

r2t_TYhHbfH7rS4sE&e=

Ankur Dwivedi (2): net/cnxk: add telemetry for inline IPsec for cn9k
net/cnxk: add telemetry for inline IPsec for cn10k

Out of interest, is there any of this telemetry that could be made generic and apply at a device-class or library level rather than being tied to the cnxk driver only?

I could think of that the callback function registered in

rte_telemetry_register_cmd() can be a generic one. The net device (eth_dev) may have ops registered, which can be called depending on dev->tx_offloads and dev->rx_offloads flags. However the data to be returned by telemetry might depend on the PMD.

Quoted 8 lines
Quoted 1 line

Please let me know if this is possible.

Thanks. So if I understand you correctly, the information returned would vary based on the offload flags only? If that is the case, it does sound like it could be generic, where the offload flags field in the return information identify what other fields are present in the reply. That would then make the telemetry generic and possible to implement at the ethdev level. Is that all correct?

Apart from offload flags, the information would vary depending on what a PMD is willing to provide. That's why I was thinking ops callback function will be required in struct eth_dev_ops which will be PMD specific. This ops callback will be called from the registered telemetry callback.