fully qualified function ``p``, so that if a symbol becomes versioned, it
can still be mapped back to the public symbol name.
+* ``__vsym``: Annotation to be used in a declaration of the internal symbol
+ ``be`` to signal that it is being used as an implementation of a particular
+ version of symbol ``b``.
+
Examples of ABI Macro use
^^^^^^^^^^^^^^^^^^^^^^^^^
.. code-block:: c
- struct rte_acl_ctx *
+ -struct rte_acl_ctx *
-rte_acl_create(const struct rte_acl_param *param)
+ +struct rte_acl_ctx * __vsym
+rte_acl_create_v20(const struct rte_acl_param *param)
{
size_t sz;
...
Note that the base name of the symbol was kept intact, as this is conducive to
-the macros used for versioning symbols. That is our next step, mapping this new
+the macros used for versioning symbols and we have annotated the function as an
+implementation of versioned symbol. That is our next step, mapping this new
symbol name to the initial symbol name at version node 2.0. Immediately after
the function, we add this line of code
.. code-block:: c
- struct rte_acl_ctx *
+ struct rte_acl_ctx * __vsym
rte_acl_create_v21(const struct rte_acl_param *param, int debug);
{
struct rte_acl_ctx *ctx = rte_acl_create_v20(param);
.. code-block:: c
- struct rte_acl_ctx *
+ struct rte_acl_ctx * __vsym
rte_acl_create_v21(const struct rte_acl_param *param, int debug)
{
...
/**** Burst Packet APIs called by workers ****/
-void
+void __vsym
rte_distributor_request_pkt_v1705(struct rte_distributor *d,
unsigned int worker_id, struct rte_mbuf **oldpkt,
unsigned int count)
unsigned int count),
rte_distributor_request_pkt_v1705);
-int
+int __vsym
rte_distributor_poll_pkt_v1705(struct rte_distributor *d,
unsigned int worker_id, struct rte_mbuf **pkts)
{
unsigned int worker_id, struct rte_mbuf **pkts),
rte_distributor_poll_pkt_v1705);
-int
+int __vsym
rte_distributor_get_pkt_v1705(struct rte_distributor *d,
unsigned int worker_id, struct rte_mbuf **pkts,
struct rte_mbuf **oldpkt, unsigned int return_count)
struct rte_mbuf **oldpkt, unsigned int return_count),
rte_distributor_get_pkt_v1705);
-int
+int __vsym
rte_distributor_return_pkt_v1705(struct rte_distributor *d,
unsigned int worker_id, struct rte_mbuf **oldpkt, int num)
{
/* process a set of packets to distribute them to workers */
-int
+int __vsym
rte_distributor_process_v1705(struct rte_distributor *d,
struct rte_mbuf **mbufs, unsigned int num_mbufs)
{
rte_distributor_process_v1705);
/* return to the caller, packets returned from workers */
-int
+int __vsym
rte_distributor_returned_pkts_v1705(struct rte_distributor *d,
struct rte_mbuf **mbufs, unsigned int max_mbufs)
{
* Flush the distributor, so that there are no outstanding packets in flight or
* queued up.
*/
-int
+int __vsym
rte_distributor_flush_v1705(struct rte_distributor *d)
{
unsigned int flushed;
rte_distributor_flush_v1705);
/* clears the internal returns array in the distributor */
-void
+void __vsym
rte_distributor_clear_returns_v1705(struct rte_distributor *d)
{
unsigned int wkr;
rte_distributor_clear_returns_v1705);
/* creates a distributor instance */
-struct rte_distributor *
+struct rte_distributor * __vsym
rte_distributor_create_v1705(const char *name,
unsigned int socket_id,
unsigned int num_workers,
/**** APIs called by workers ****/
-void
+void __vsym
rte_distributor_request_pkt_v20(struct rte_distributor_v20 *d,
unsigned worker_id, struct rte_mbuf *oldpkt)
{
}
VERSION_SYMBOL(rte_distributor_request_pkt, _v20, 2.0);
-struct rte_mbuf *
+struct rte_mbuf * __vsym
rte_distributor_poll_pkt_v20(struct rte_distributor_v20 *d,
unsigned worker_id)
{
}
VERSION_SYMBOL(rte_distributor_poll_pkt, _v20, 2.0);
-struct rte_mbuf *
+struct rte_mbuf * __vsym
rte_distributor_get_pkt_v20(struct rte_distributor_v20 *d,
unsigned worker_id, struct rte_mbuf *oldpkt)
{
}
VERSION_SYMBOL(rte_distributor_get_pkt, _v20, 2.0);
-int
+int __vsym
rte_distributor_return_pkt_v20(struct rte_distributor_v20 *d,
unsigned worker_id, struct rte_mbuf *oldpkt)
{
}
/* process a set of packets to distribute them to workers */
-int
+int __vsym
rte_distributor_process_v20(struct rte_distributor_v20 *d,
struct rte_mbuf **mbufs, unsigned num_mbufs)
{
VERSION_SYMBOL(rte_distributor_process, _v20, 2.0);
/* return to the caller, packets returned from workers */
-int
+int __vsym
rte_distributor_returned_pkts_v20(struct rte_distributor_v20 *d,
struct rte_mbuf **mbufs, unsigned max_mbufs)
{
/* flush the distributor, so that there are no outstanding packets in flight or
* queued up. */
-int
+int __vsym
rte_distributor_flush_v20(struct rte_distributor_v20 *d)
{
const unsigned flushed = total_outstanding(d);
VERSION_SYMBOL(rte_distributor_flush, _v20, 2.0);
/* clears the internal returns array in the distributor */
-void
+void __vsym
rte_distributor_clear_returns_v20(struct rte_distributor_v20 *d)
{
d->returns.start = d->returns.count = 0;
VERSION_SYMBOL(rte_distributor_clear_returns, _v20, 2.0);
/* creates a distributor instance */
-struct rte_distributor_v20 *
+struct rte_distributor_v20 * __vsym
rte_distributor_create_v20(const char *name,
unsigned socket_id,
unsigned num_workers)
* symbol <b> to the internal symbol <b><e>
*/
#define BIND_DEFAULT_SYMBOL(b, e, n) __asm__(".symver " RTE_STR(b) RTE_STR(e) ", " RTE_STR(b) "@@DPDK_" RTE_STR(n))
+
+/*
+ * __vsym
+ * Annotation to be used in declaration of the internal symbol <b><e> to signal
+ * that it is being used as an implementation of a particular version of symbol
+ * <b>.
+ */
#define __vsym __attribute__((used))
/*
/*
* Find an existing lpm table and return a pointer to it.
*/
-struct rte_lpm_v20 *
+struct rte_lpm_v20 * __vsym
rte_lpm_find_existing_v20(const char *name)
{
struct rte_lpm_v20 *l = NULL;
}
VERSION_SYMBOL(rte_lpm_find_existing, _v20, 2.0);
-struct rte_lpm *
+struct rte_lpm * __vsym
rte_lpm_find_existing_v1604(const char *name)
{
struct rte_lpm *l = NULL;
/*
* Allocates memory for LPM object
*/
-struct rte_lpm_v20 *
+struct rte_lpm_v20 * __vsym
rte_lpm_create_v20(const char *name, int socket_id, int max_rules,
__rte_unused int flags)
{
}
VERSION_SYMBOL(rte_lpm_create, _v20, 2.0);
-struct rte_lpm *
+struct rte_lpm * __vsym
rte_lpm_create_v1604(const char *name, int socket_id,
const struct rte_lpm_config *config)
{
/*
* Deallocates memory for given LPM table.
*/
-void
+void __vsym
rte_lpm_free_v20(struct rte_lpm_v20 *lpm)
{
struct rte_lpm_list *lpm_list;
}
VERSION_SYMBOL(rte_lpm_free, _v20, 2.0);
-void
+void __vsym
rte_lpm_free_v1604(struct rte_lpm *lpm)
{
struct rte_lpm_list *lpm_list;
/*
* Add a route
*/
-int
+int __vsym
rte_lpm_add_v20(struct rte_lpm_v20 *lpm, uint32_t ip, uint8_t depth,
uint8_t next_hop)
{
}
VERSION_SYMBOL(rte_lpm_add, _v20, 2.0);
-int
+int __vsym
rte_lpm_add_v1604(struct rte_lpm *lpm, uint32_t ip, uint8_t depth,
uint32_t next_hop)
{
/*
* Look for a rule in the high-level rules table
*/
-int
+int __vsym
rte_lpm_is_rule_present_v20(struct rte_lpm_v20 *lpm, uint32_t ip, uint8_t depth,
uint8_t *next_hop)
{
}
VERSION_SYMBOL(rte_lpm_is_rule_present, _v20, 2.0);
-int
+int __vsym
rte_lpm_is_rule_present_v1604(struct rte_lpm *lpm, uint32_t ip, uint8_t depth,
uint32_t *next_hop)
{
/*
* Deletes a rule
*/
-int
+int __vsym
rte_lpm_delete_v20(struct rte_lpm_v20 *lpm, uint32_t ip, uint8_t depth)
{
int32_t rule_to_delete_index, sub_rule_index;
}
VERSION_SYMBOL(rte_lpm_delete, _v20, 2.0);
-int
+int __vsym
rte_lpm_delete_v1604(struct rte_lpm *lpm, uint32_t ip, uint8_t depth)
{
int32_t rule_to_delete_index, sub_rule_index;
/*
* Delete all rules from the LPM table.
*/
-void
+void __vsym
rte_lpm_delete_all_v20(struct rte_lpm_v20 *lpm)
{
/* Zero rule information. */
}
VERSION_SYMBOL(rte_lpm_delete_all, _v20, 2.0);
-void
+void __vsym
rte_lpm_delete_all_v1604(struct rte_lpm *lpm)
{
/* Zero rule information. */
/*
* Add a route
*/
-int
+int __vsym
rte_lpm6_add_v20(struct rte_lpm6 *lpm, uint8_t *ip, uint8_t depth,
uint8_t next_hop)
{
return 0;
}
-int
+int __vsym
rte_lpm6_add_v1705(struct rte_lpm6 *lpm, uint8_t *ip, uint8_t depth,
uint32_t next_hop)
{
/*
* Looks up an IP
*/
-int
+int __vsym
rte_lpm6_lookup_v20(const struct rte_lpm6 *lpm, uint8_t *ip, uint8_t *next_hop)
{
uint32_t next_hop32 = 0;
}
VERSION_SYMBOL(rte_lpm6_lookup, _v20, 2.0);
-int
+int __vsym
rte_lpm6_lookup_v1705(const struct rte_lpm6 *lpm, uint8_t *ip,
uint32_t *next_hop)
{
/*
* Looks up a group of IP addresses
*/
-int
+int __vsym
rte_lpm6_lookup_bulk_func_v20(const struct rte_lpm6 *lpm,
uint8_t ips[][RTE_LPM6_IPV6_ADDR_SIZE],
int16_t * next_hops, unsigned n)
}
VERSION_SYMBOL(rte_lpm6_lookup_bulk_func, _v20, 2.0);
-int
+int __vsym
rte_lpm6_lookup_bulk_func_v1705(const struct rte_lpm6 *lpm,
uint8_t ips[][RTE_LPM6_IPV6_ADDR_SIZE],
int32_t *next_hops, unsigned int n)
/*
* Look for a rule in the high-level rules table
*/
-int
+int __vsym
rte_lpm6_is_rule_present_v20(struct rte_lpm6 *lpm, uint8_t *ip, uint8_t depth,
uint8_t *next_hop)
{
}
VERSION_SYMBOL(rte_lpm6_is_rule_present, _v20, 2.0);
-int
+int __vsym
rte_lpm6_is_rule_present_v1705(struct rte_lpm6 *lpm, uint8_t *ip, uint8_t depth,
uint32_t *next_hop)
{
return 0;
}
-void
+void __vsym
rte_timer_subsystem_init_v20(void)
{
unsigned lcore_id;
* secondary processes should be empty, the zeroth entry can be shared by
* multiple processes.
*/
-int
+int __vsym
rte_timer_subsystem_init_v1905(void)
{
const struct rte_memzone *mz;
}
/* Reset and start the timer associated with the timer handle tim */
-int
+int __vsym
rte_timer_reset_v20(struct rte_timer *tim, uint64_t ticks,
enum rte_timer_type type, unsigned int tim_lcore,
rte_timer_cb_t fct, void *arg)
}
VERSION_SYMBOL(rte_timer_reset, _v20, 2.0);
-int
+int __vsym
rte_timer_reset_v1905(struct rte_timer *tim, uint64_t ticks,
enum rte_timer_type type, unsigned int tim_lcore,
rte_timer_cb_t fct, void *arg)
}
/* Stop the timer associated with the timer handle tim */
-int
+int __vsym
rte_timer_stop_v20(struct rte_timer *tim)
{
return __rte_timer_stop(tim, 0, &default_timer_data);
}
VERSION_SYMBOL(rte_timer_stop, _v20, 2.0);
-int
+int __vsym
rte_timer_stop_v1905(struct rte_timer *tim)
{
return rte_timer_alt_stop(default_data_id, tim);
priv_timer[lcore_id].running_tim = NULL;
}
-void
+void __vsym
rte_timer_manage_v20(void)
{
__rte_timer_manage(&default_timer_data);
}
VERSION_SYMBOL(rte_timer_manage, _v20, 2.0);
-int
+int __vsym
rte_timer_manage_v1905(void)
{
struct rte_timer_data *timer_data;
#endif
}
-void
+void __vsym
rte_timer_dump_stats_v20(FILE *f)
{
__rte_timer_dump_stats(&default_timer_data, f);
}
VERSION_SYMBOL(rte_timer_dump_stats, _v20, 2.0);
-int
+int __vsym
rte_timer_dump_stats_v1905(FILE *f)
{
return rte_timer_alt_dump_stats(default_data_id, f);