X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fsoftnic%2Frte_eth_softnic_internals.h;h=07285ca315a51d81557f6f2f5c9b7936f362f8c7;hb=7206a1ca2bfe289aeacd92e39cfefd9a19f6c64f;hp=e12b8ae4ca7d4c052b352a6b644af7eaa48776ee;hpb=3b7f2b9e17d8e2c02935eea16f306384bdf1641a;p=dpdk.git diff --git a/drivers/net/softnic/rte_eth_softnic_internals.h b/drivers/net/softnic/rte_eth_softnic_internals.h index e12b8ae4ca..07285ca315 100644 --- a/drivers/net/softnic/rte_eth_softnic_internals.h +++ b/drivers/net/softnic/rte_eth_softnic_internals.h @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include #include @@ -28,16 +28,18 @@ #include "conn.h" #define NAME_SIZE 64 +#define SOFTNIC_PATH_MAX 4096 /** * PMD Parameters */ struct pmd_params { - const char *name; - const char *firmware; + char name[NAME_SIZE]; + char firmware[SOFTNIC_PATH_MAX]; uint16_t conn_port; uint32_t cpu_id; + int sc; /**< Service cores. */ /** Traffic Management (TM) */ struct { @@ -82,6 +84,16 @@ struct softnic_mtr_meter_profile { TAILQ_HEAD(softnic_mtr_meter_profile_list, softnic_mtr_meter_profile); +/* MTR meter policy */ +struct softnic_mtr_meter_policy { + TAILQ_ENTRY(softnic_mtr_meter_policy) node; + uint32_t meter_policy_id; + enum rte_table_action_policer policer[RTE_COLORS]; + uint32_t n_users; +}; + +TAILQ_HEAD(softnic_mtr_meter_policy_list, softnic_mtr_meter_policy); + /* MTR meter object */ struct softnic_mtr { TAILQ_ENTRY(softnic_mtr) node; @@ -94,6 +106,7 @@ TAILQ_HEAD(softnic_mtr_list, softnic_mtr); struct mtr_internals { struct softnic_mtr_meter_profile_list meter_profiles; + struct softnic_mtr_meter_policy_list meter_policies; struct softnic_mtr_list mtrs; }; @@ -160,13 +173,22 @@ TAILQ_HEAD(softnic_link_list, softnic_link); #define TM_MAX_PIPES_PER_SUBPORT 4096 #endif +#ifndef TM_MAX_PIPE_PROFILE +#define TM_MAX_PIPE_PROFILE 256 +#endif + +#ifndef TM_MAX_SUBPORT_PROFILE +#define TM_MAX_SUBPORT_PROFILE 256 +#endif + struct tm_params { struct rte_sched_port_params port_params; - struct rte_sched_subport_params subport_params[TM_MAX_SUBPORTS]; - - struct rte_sched_pipe_params - pipe_profiles[RTE_SCHED_PIPE_PROFILES_PER_PORT]; + struct rte_sched_subport_profile_params + subport_profile[TM_MAX_SUBPORT_PROFILE]; + uint32_t n_subport_profiles; + uint32_t subport_to_profile[TM_MAX_SUBPORT_PROFILE]; + struct rte_sched_pipe_params pipe_profiles[TM_MAX_PIPE_PROFILE]; uint32_t n_pipe_profiles; uint32_t pipe_to_profile[TM_MAX_SUBPORTS * TM_MAX_PIPES_PER_SUBPORT]; }; @@ -286,6 +308,7 @@ struct softnic_cryptodev_params { uint32_t dev_id; /**< Valid only when *dev_name* is NULL. */ uint32_t n_queues; uint32_t queue_size; + uint32_t session_pool_size; }; struct softnic_cryptodev { @@ -293,6 +316,8 @@ struct softnic_cryptodev { char name[NAME_SIZE]; uint16_t dev_id; uint32_t n_queues; + struct rte_mempool *mp_create; + struct rte_mempool *mp_init; }; TAILQ_HEAD(softnic_cryptodev_list, softnic_cryptodev); @@ -541,13 +566,13 @@ TAILQ_HEAD(pipeline_list, pipeline); #endif /** - * Master thead: data plane thread context + * Main thread: data plane thread context */ struct softnic_thread { struct rte_ring *msgq_req; struct rte_ring *msgq_rsp; - uint32_t enabled; + uint32_t service_id; }; /** @@ -665,6 +690,10 @@ struct softnic_mtr_meter_profile * softnic_mtr_meter_profile_find(struct pmd_internals *p, uint32_t meter_profile_id); +struct softnic_mtr_meter_policy * +softnic_mtr_meter_policy_find(struct pmd_internals *p, + uint32_t meter_policy_id); + extern const struct rte_mtr_ops pmd_mtr_ops; /** @@ -840,6 +869,9 @@ softnic_pipeline_free(struct pmd_internals *p); void softnic_pipeline_disable_all(struct pmd_internals *p); +uint32_t +softnic_pipeline_thread_count(struct pmd_internals *p, uint32_t thread_id); + struct pipeline * softnic_pipeline_find(struct pmd_internals *p, const char *name); @@ -938,6 +970,9 @@ struct softnic_table_rule_match { } match; }; +#ifndef SYM_CRYPTO_MAX_KEY_SIZE +#define SYM_CRYPTO_MAX_KEY_SIZE (256) +#endif struct softnic_table_rule_action { uint64_t action_mask; struct rte_table_action_fwd_params fwd; @@ -952,6 +987,7 @@ struct softnic_table_rule_action { struct rte_table_action_tag_params tag; struct rte_table_action_decap_params decap; struct rte_table_action_sym_crypto_params sym_crypto; + uint8_t sym_crypto_key[SYM_CRYPTO_MAX_KEY_SIZE]; }; struct rte_flow {