The ``rte_net_ice_dump_proto_xtr_metadata`` routine shows how to
access the protocol extraction result in ``struct rte_mbuf``.
+- ``Hardware debug mask log support`` (default ``0``)
+
+ User can enable the related hardware debug mask such as ICE_DBG_NVM::
+
+ -a 0000:88:00.0,hw_debug_mask=0x80 --log-level=pmd.net.ice.driver:8
+
+ These ICE_DBG_XXX are defined in ``drivers/net/ice/base/ice_type.h``.
+
Driver compilation and testing
------------------------------
#define ICE_SAFE_MODE_SUPPORT_ARG "safe-mode-support"
#define ICE_PIPELINE_MODE_SUPPORT_ARG "pipeline-mode-support"
#define ICE_PROTO_XTR_ARG "proto_xtr"
+#define ICE_HW_DEBUG_MASK_ARG "hw_debug_mask"
static const char * const ice_valid_args[] = {
ICE_SAFE_MODE_SUPPORT_ARG,
ICE_PIPELINE_MODE_SUPPORT_ARG,
ICE_PROTO_XTR_ARG,
+ ICE_HW_DEBUG_MASK_ARG,
NULL
};
return 0;
}
+static int
+parse_u64(const char *key, const char *value, void *args)
+{
+ u64 *num = (u64 *)args;
+ u64 tmp;
+
+ errno = 0;
+ tmp = strtoull(value, NULL, 16);
+ if (errno) {
+ PMD_DRV_LOG(WARNING, "%s: \"%s\" is not a valid u64",
+ key, value);
+ return -1;
+ }
+
+ *num = tmp;
+
+ return 0;
+}
+
static int ice_parse_devargs(struct rte_eth_dev *dev)
{
struct ice_adapter *ad =
if (ret)
goto bail;
+ ret = rte_kvargs_process(kvlist, ICE_HW_DEBUG_MASK_ARG,
+ &parse_u64, &ad->hw.debug_mask);
+ if (ret)
+ goto bail;
+
bail:
rte_kvargs_free(kvlist);
return ret;
RTE_PMD_REGISTER_PCI_TABLE(net_ice, pci_id_ice_map);
RTE_PMD_REGISTER_KMOD_DEP(net_ice, "* igb_uio | uio_pci_generic | vfio-pci");
RTE_PMD_REGISTER_PARAM_STRING(net_ice,
+ ICE_HW_DEBUG_MASK_ARG "=0xXXX"
ICE_PROTO_XTR_ARG "=[queue:]<vlan|ipv4|ipv6|ipv6_flow|tcp|ip_offset>"
ICE_SAFE_MODE_SUPPORT_ARG "=<0|1>"
ICE_PIPELINE_MODE_SUPPORT_ARG "=<0|1>");