X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest-pmd%2Ftestpmd.h;h=f925df792af00fdedb39c53506f1b59c3c909fcf;hb=7acf894d07d1cfbab50c525300e5c61fce2468d6;hp=f2c84d958d7e3dc55a7866e82169da0429924069;hpb=8fff667578a7541acc2e55b71366af6255646d4d;p=dpdk.git diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index f2c84d958d..f925df792a 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h @@ -1,7 +1,7 @@ /*- * BSD LICENSE * - * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. + * Copyright(c) 2010-2015 Intel Corporation. All rights reserved. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -133,6 +133,8 @@ struct fwd_stream { #define TESTPMD_TX_OFFLOAD_PARSE_TUNNEL 0x0020 /** Insert VLAN header in forward engine */ #define TESTPMD_TX_OFFLOAD_INSERT_VLAN 0x0040 +/** Insert double VLAN header in forward engine */ +#define TESTPMD_TX_OFFLOAD_INSERT_QINQ 0x0080 /** * The data structure associated with each port. @@ -149,7 +151,8 @@ struct rte_port { unsigned int socket_id; /**< For NUMA support */ uint16_t tx_ol_flags;/**< TX Offload Flags (TESTPMD_TX_OFFLOAD...). */ uint16_t tso_segsz; /**< MSS for segmentation offload. */ - uint16_t tx_vlan_id; /**< Tag Id. in TX VLAN packets. */ + uint16_t tx_vlan_id;/**< The tag ID */ + uint16_t tx_vlan_id_outer;/**< The outer tag ID */ void *fwd_ctx; /**< Forwarding mode context */ uint64_t rx_bad_ip_csum; /**< rx pkts with bad ip checksum */ uint64_t rx_bad_l4_csum; /**< rx pkts with bad l4 checksum */ @@ -159,11 +162,12 @@ struct rte_port { uint8_t need_reconfig; /**< need reconfiguring port or not */ uint8_t need_reconfig_queues; /**< need reconfiguring queues or not */ uint8_t rss_flag; /**< enable rss or not */ - uint8_t dcb_flag; /**< enable dcb */ + uint8_t dcb_flag; /**< enable dcb */ struct rte_eth_rxconf rx_conf; /**< rx configuration */ struct rte_eth_txconf tx_conf; /**< tx configuration */ struct ether_addr *mc_addr_pool; /**< pool of multicast addrs */ uint32_t mc_addr_nb; /**< nb. of addr. in mc_addr_pool */ + uint8_t slave_flag; /**< bonding slave port */ }; extern portid_t __rte_unused @@ -304,8 +308,6 @@ extern volatile int test_done; /* stop packet forwarding when set to 1. */ extern uint32_t bypass_timeout; /**< Store the NIC bypass watchdog timeout */ #endif -#define MAX_SOCKET 2 /*MAX SOCKET:currently, it is 2 */ - /* * Store specified sockets on which memory pool to be used by ports * is allocated. @@ -334,6 +336,7 @@ extern lcoreid_t nb_lcores; /**< Number of logical cores probed at init time. */ extern lcoreid_t nb_cfg_lcores; /**< Number of configured logical cores. */ extern lcoreid_t nb_fwd_lcores; /**< Number of forwarding logical cores. */ extern unsigned int fwd_lcores_cpuids[RTE_MAX_LCORE]; +extern unsigned max_socket; /* * Configuration of Ethernet ports: @@ -515,6 +518,7 @@ int rx_vft_set(portid_t port_id, uint16_t vlan_id, int on); void vlan_extend_set(portid_t port_id, int on); void vlan_tpid_set(portid_t port_id, uint16_t tp_id); void tx_vlan_set(portid_t port_id, uint16_t vlan_id); +void tx_qinq_set(portid_t port_id, uint16_t vlan_id, uint16_t vlan_id_outer); void tx_vlan_reset(portid_t port_id); void tx_vlan_pvid_set(portid_t port_id, uint16_t vlan_id, int on); @@ -530,6 +534,8 @@ void stop_packet_forwarding(void); void dev_set_link_up(portid_t pid); void dev_set_link_down(portid_t pid); void init_port_config(void); +void set_port_slave_flag(portid_t slave_pid); +void clear_port_slave_flag(portid_t slave_pid); int init_port_dcb_config(portid_t pid,struct dcb_config *dcb_conf); int start_port(portid_t pid); void stop_port(portid_t pid);