dpdk/drivers/bus/dpaa/include/netcfg.h
<<
>>
Prefs
   1/* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
   2 *
   3 * Copyright 2010-2012 Freescale Semiconductor, Inc.
   4 * All rights reserved.
   5 *
   6 */
   7
   8#ifndef __NETCFG_H
   9#define __NETCFG_H
  10
  11#include <fman.h>
  12
  13/* Configuration information related to a specific ethernet port */
  14struct fm_eth_port_cfg {
  15        /**< A list of PCD FQ ranges, obtained from FMC configuration */
  16        struct list_head *list;
  17        /**< The "Rx default" FQID, obtained from FMC configuration */
  18        uint32_t rx_def;
  19        /**< Other interface details are in the fman driver interface */
  20        struct fman_if *fman_if;
  21};
  22
  23struct netcfg_info {
  24        uint8_t num_ethports;
  25        /**< Number of ports */
  26        struct fm_eth_port_cfg port_cfg[0];
  27        /**< Variable structure array of size num_ethports */
  28};
  29
  30struct interface_info {
  31        char *name;
  32        struct rte_ether_addr mac_addr;
  33        struct rte_ether_addr peer_mac;
  34        int mac_present;
  35        int fman_enabled_mac_interface;
  36};
  37
  38struct netcfg_interface {
  39        uint8_t numof_netcfg_interface;
  40        uint8_t numof_fman_enabled_macless;
  41        struct interface_info interface_info[0];
  42};
  43
  44/* pcd_file: FMC netpcd XML ("policy") file, that contains PCD information.
  45 * cfg_file: FMC config XML file
  46 * Returns the configuration information in newly allocated memory.
  47 */
  48__rte_internal
  49struct netcfg_info *netcfg_acquire(void);
  50
  51/* cfg_ptr: configuration information pointer.
  52 * Frees the resources allocated by the configuration layer.
  53 */
  54__rte_internal
  55void netcfg_release(struct netcfg_info *cfg_ptr);
  56
  57#ifdef RTE_LIBRTE_DPAA_DEBUG_DRIVER
  58/* cfg_ptr: configuration information pointer.
  59 * This function dumps configuration data to stdout.
  60 */
  61void dump_netcfg(struct netcfg_info *cfg_ptr);
  62#endif
  63
  64#endif /* __NETCFG_H */
  65