X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fipsec-secgw%2Fevent_helper.h;h=b65b343367c3c5cb94b2024973fdd7cf32ee9307;hb=65e3a202ac6dd81acaa9623d7772e62043bbe28e;hp=25c85636b452f606c4c8fc496ecedf73dc2501d7;hpb=ec3cc53f5a66e1d3501ffc1afe53c59fe310c7f4;p=dpdk.git diff --git a/examples/ipsec-secgw/event_helper.h b/examples/ipsec-secgw/event_helper.h index 25c85636b4..b65b343367 100644 --- a/examples/ipsec-secgw/event_helper.h +++ b/examples/ipsec-secgw/event_helper.h @@ -46,6 +46,9 @@ /* Max adapters that one Tx core can handle */ #define EVENT_MODE_MAX_ADAPTERS_PER_TX_CORE EVENT_MODE_MAX_TX_ADAPTERS +/* Used to indicate that queue schedule type is not set */ +#define SCHED_TYPE_NOT_SET 3 + /** * Packet transfer mode of the application */ @@ -70,6 +73,14 @@ enum eh_tx_types { EH_TX_TYPE_NO_INTERNAL_PORT }; +/** + * Event mode ipsec mode types + */ +enum eh_ipsec_mode_types { + EH_IPSEC_MODE_TYPE_APP = 0, + EH_IPSEC_MODE_TYPE_DRIVER +}; + /* Event dev params */ struct eventdev_params { uint8_t eventdev_id; @@ -179,6 +190,10 @@ struct eh_conf { */ void *mode_params; /**< Mode specific parameters */ + + /** Application specific params */ + enum eh_ipsec_mode_types ipsec_mode; + /**< Mode of ipsec run */ }; /* Workers registered by the application */ @@ -190,6 +205,8 @@ struct eh_app_worker_params { /**< Specify status of rx type burst */ uint64_t tx_internal_port : 1; /**< Specify whether tx internal port is available */ + uint64_t ipsec_mode : 1; + /**< Specify ipsec processing level */ }; uint64_t u64; } cap; @@ -199,6 +216,26 @@ struct eh_app_worker_params { /**< Worker thread */ }; +/** + * Allocate memory for event helper configuration and initialize + * it with default values. + * + * @return + * - pointer to event helper configuration structure on success. + * - NULL on failure. + */ +struct eh_conf * +eh_conf_init(void); + +/** + * Uninitialize event helper configuration and release its memory +. * + * @param conf + * Event helper configuration + */ +void +eh_conf_uninit(struct eh_conf *conf); + /** * Initialize event mode devices *