#include <rte_bus_pci.h>
#include <rte_gro.h>
#include <rte_gso.h>
+#include <rte_os_shim.h>
#include <cmdline.h>
#include <sys/queue.h>
extern uint64_t noisy_lkup_num_reads_writes;
extern uint8_t dcb_config;
-extern uint8_t dcb_test;
extern uint32_t mbuf_data_size_n;
extern uint16_t mbuf_data_size[MAX_SEGS_BUFFER_SPLIT];
extern uint16_t nb_pkt_per_burst;
extern uint16_t nb_pkt_flowgen_clones;
+extern int nb_flows_flowgen;
extern uint16_t mb_mempool_cache;
extern int8_t rx_pthresh;
extern int8_t rx_hthresh;
extern struct rte_flow_action_conntrack conntrack_context;
+extern int proc_id;
+extern unsigned int num_procs;
+
+static inline bool
+is_proc_primary(void)
+{
+ return rte_eal_process_type() == RTE_PROC_PRIMARY;
+}
+
static inline unsigned int
lcore_num(void)
{
uint32_t reg_v;
if (!port->dev_info.device) {
- printf("Invalid device\n");
+ fprintf(stderr, "Invalid device\n");
return 0;
}
if (bus && !strcmp(bus->name, "pci")) {
pci_dev = RTE_DEV_TO_PCI(port->dev_info.device);
} else {
- printf("Not a PCI device\n");
+ fprintf(stderr, "Not a PCI device\n");
return 0;
}
void *reg_addr;
if (!port->dev_info.device) {
- printf("Invalid device\n");
+ fprintf(stderr, "Invalid device\n");
return;
}
if (bus && !strcmp(bus->name, "pci")) {
pci_dev = RTE_DEV_TO_PCI(port->dev_info.device);
} else {
- printf("Not a PCI device\n");
+ fprintf(stderr, "Not a PCI device\n");
return;
}
}
/* Prototypes */
-unsigned int parse_item_list(char* str, const char* item_name,
+unsigned int parse_item_list(const char *str, const char *item_name,
unsigned int max_items,
unsigned int *parsed_items, int check_unique_values);
void launch_args_parse(int argc, char** argv);
void port_flow_tunnel_destroy(portid_t port_id, uint32_t tunnel_id);
void port_flow_tunnel_create(portid_t port_id, const struct tunnel_ops *ops);
int port_flow_isolate(portid_t port_id, int set);
+int port_meter_policy_add(portid_t port_id, uint32_t policy_id,
+ const struct rte_flow_action *actions);
void rx_ring_desc_display(portid_t port_id, queueid_t rxq_id, uint16_t rxd_id);
void tx_ring_desc_display(portid_t port_id, queueid_t txq_id, uint16_t txd_id);
void set_tx_pkt_times(unsigned int *tx_times);
void show_tx_pkt_times(void);
void set_tx_pkt_split(const char *name);
-int parse_fec_mode(const char *name, enum rte_eth_fec_mode *mode);
+int parse_fec_mode(const char *name, uint32_t *fec_capa);
void show_fec_capability(uint32_t num, struct rte_eth_fec_capa *speed_fec_capa);
void set_nb_pkt_per_burst(uint16_t pkt_burst);
char *list_pkt_forwarding_modes(void);