[v2 00/12] ENETC4 PMD support
Stephen Hemminger
stephen at networkplumber.org
Thu Nov 7 20:29:35 CET 2024
On Wed, 23 Oct 2024 11:54:21 +0530
vanshika.shukla at nxp.com wrote:
> From: Vanshika Shukla <vanshika.shukla at nxp.com>
>
> This series introduces a new ENETC4 PMD driver for NXP's i.MX95
> SoC, enabling basic network operations.
>
> V2 changes:
> Handled code comments by the reviewer in:
> "net/enetc: Add initial ENETC4 PMD driver support"
> "net/enetc: Optimize ENETC4 data path"
>
> Apeksha Gupta (6):
> net/enetc: Add initial ENETC4 PMD driver support
> net/enetc: Add RX and TX queue APIs for ENETC4 PMD
> net/enetc: Optimize ENETC4 data path
> net/enetc: Add TX checksum offload and RX checksum validation
> net/enetc: Add basic statistics
> net/enetc: Add packet type parsing support
>
> Gagandeep Singh (1):
> net/enetc: Add support for multiple queues with RSS
>
> Vanshika Shukla (5):
> net/enetc: Add VF to PF messaging support and primary MAC setup
> net/enetc: Add multicast and promiscuous mode support
> net/enetc: Add link speed and status support
> net/enetc: Add link status notification support
> net/enetc: Add MAC and VLAN filter support
>
> MAINTAINERS | 3 +
> config/arm/arm64_imx_linux_gcc | 17 +
> config/arm/meson.build | 14 +
> doc/guides/nics/enetc4.rst | 99 ++
> doc/guides/nics/features/enetc4.ini | 22 +
> doc/guides/nics/index.rst | 1 +
> doc/guides/rel_notes/release_24_11.rst | 4 +
> drivers/net/enetc/base/enetc4_hw.h | 186 ++++
> drivers/net/enetc/base/enetc_hw.h | 52 +-
> drivers/net/enetc/enetc.h | 246 ++++-
> drivers/net/enetc/enetc4_ethdev.c | 1040 ++++++++++++++++++
> drivers/net/enetc/enetc4_vf.c | 1364 ++++++++++++++++++++++++
> drivers/net/enetc/enetc_cbdr.c | 311 ++++++
> drivers/net/enetc/enetc_ethdev.c | 5 +-
> drivers/net/enetc/enetc_rxtx.c | 165 ++-
> drivers/net/enetc/kpage_ncache_api.h | 70 ++
> drivers/net/enetc/meson.build | 5 +-
> drivers/net/enetc/ntmp.h | 110 ++
> 18 files changed, 3673 insertions(+), 41 deletions(-)
> create mode 100644 config/arm/arm64_imx_linux_gcc
> create mode 100644 doc/guides/nics/enetc4.rst
> create mode 100644 doc/guides/nics/features/enetc4.ini
> create mode 100644 drivers/net/enetc/base/enetc4_hw.h
> create mode 100644 drivers/net/enetc/enetc4_ethdev.c
> create mode 100644 drivers/net/enetc/enetc4_vf.c
> create mode 100644 drivers/net/enetc/enetc_cbdr.c
> create mode 100644 drivers/net/enetc/kpage_ncache_api.h
> create mode 100644 drivers/net/enetc/ntmp.h
>
Tcd he files using rte_malloc are not the ones including rte_malloc.h
$ git grep rte_malloc
enetc4_ethdev.c: txr->q_swbd = rte_malloc(NULL, size, ENETC_BD_RING_ALIGN);
enetc4_ethdev.c: rxr->q_swbd = rte_malloc(NULL, size, ENETC_BD_RING_ALIGN);
enetc4_ethdev.c: rss_table = rte_malloc(NULL, hw->num_rss * sizeof(*rss_table), ENETC_CBDR_ALIGN);
enetc_cbdr.c: tmp = rte_malloc(NULL, data_size, ENETC_CBDR_ALIGN);
enetc_cbdr.c: cbdr->addr_base = rte_malloc(NULL, size, ENETC_CBDR_ALIGN);
enetc_ethdev.c: txr->q_swbd = rte_malloc(NULL, size, ENETC_BD_RING_ALIGN);
enetc_ethdev.c: txr->bd_base = rte_malloc(NULL, size, ENETC_BD_RING_ALIGN);
enetc_ethdev.c: rxr->q_swbd = rte_malloc(NULL, size, ENETC_BD_RING_ALIGN);
enetc_ethdev.c: rxr->bd_base = rte_malloc(NULL, size, ENETC_BD_RING_ALIGN);
enetc_rxtx.c:#include "rte_malloc.h"
The took iwyu gives hint as to recommended includes. Don't trust it blindly
but for example:
$ iwyu -I drivers/bus/pci -I drivers/common/dpaax -I lib/ethdev -I lib/net -I lib/eal/include -I drivers/bus/vdev -I lib/kvargs drivers/net/enetc/enetc_ethdev.c
drivers/net/enetc/enetc_ethdev.c should add these lines:
#include <errno.h> // for ENOMEM, EINVAL
#include <rte_build_config.h> // for RTE_PKTMBUF_HEADROOM
#include <rte_log.h> // for RTE_LOG_DEBUG, RTE_LOG_ERR, RTE_L...
#include <rte_mbuf.h> // for rte_pktmbuf_free, rte_pktmbuf_dat...
#include <rte_mbuf_ptype.h> // for RTE_PTYPE_L2_ETHER, RTE_PTYPE_L3_...
#include <rte_pci.h> // for rte_pci_id
#include <stdint.h> // for uint32_t, uint16_t, uint64_t, uin...
#include <string.h> // for NULL, size_t, memset
#include "base/enetc4_hw.h" // for L3_CKSUM, L4_CKSUM
#include "base/enetc_hw.h" // for enetc_port_wr, enetc_port_rd, ene...
#include "bus_pci_driver.h" // for rte_pci_device, RTE_PCI_DEVICE
#include "compat.h" // for lower_32_bits, upper_32_bits
#include "ethdev_driver.h" // for rte_eth_dev, rte_eth_dev_data
#include "ethdev_pci.h" // for rte_eth_dev_pci_generic_probe
#include "rte_branch_prediction.h" // for unlikely
#include "rte_common.h" // for __rte_unused, phys_addr_t, RTE_PR...
#include "rte_dev.h" // for rte_mem_resource, RTE_PMD_REGISTE...
#include "rte_eal.h" // for rte_eal_iova_mode, rte_eal_proces...
#include "rte_ethdev.h" // for rte_eth_link, RTE_ETH_QUEUE_STATE...
#include "rte_ether.h" // for RTE_ETHER_CRC_LEN, RTE_ETHER_HDR_LEN
#include "rte_malloc.h" // for rte_free, rte_malloc, rte_zmalloc
#include "rte_memory.h" // for rte_mem_virt2iova
struct rte_mempool;
drivers/net/enetc/enetc_ethdev.c should remove these lines:
- #include <stdbool.h> // lines 5-5
More information about the dev
mailing list