devargs: remove deprecated functions
rte_eal_parse_devargs_str() does not support parsing the bus name at the start of devargs. So it was renamed and deprecated. rte_eal_devargs_add(), rte_eal_devargs_type_count() and rte_eal_devargs_dump() were declared deprecated and had their implementation body renamed. All these functions were deprecated in release 18.05. Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com> Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com> Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
This commit is contained in:
parent
3f7a40c670
commit
e7ec4d2fc8
@ -137,6 +137,11 @@ API Changes
|
|||||||
instead leave it to the memory subsystem to decide whether socket ID is a
|
instead leave it to the memory subsystem to decide whether socket ID is a
|
||||||
valid one.
|
valid one.
|
||||||
|
|
||||||
|
* eal: The following devargs functions, which were deprecated in 18.05,
|
||||||
|
were removed in 18.11:
|
||||||
|
``rte_eal_parse_devargs_str()``, ``rte_eal_devargs_add()``,
|
||||||
|
``rte_eal_devargs_type_count()``, and ``rte_eal_devargs_dump()``.
|
||||||
|
|
||||||
* mbuf: The ``__rte_mbuf_raw_free()`` and ``__rte_pktmbuf_prefree_seg()``
|
* mbuf: The ``__rte_mbuf_raw_free()`` and ``__rte_pktmbuf_prefree_seg()``
|
||||||
functions were deprecated since 17.05 and are replaced by
|
functions were deprecated since 17.05 and are replaced by
|
||||||
``rte_mbuf_raw_free()`` and ``rte_pktmbuf_prefree_seg()``.
|
``rte_mbuf_raw_free()`` and ``rte_pktmbuf_prefree_seg()``.
|
||||||
|
@ -28,36 +28,6 @@ TAILQ_HEAD(rte_devargs_list, rte_devargs);
|
|||||||
struct rte_devargs_list devargs_list =
|
struct rte_devargs_list devargs_list =
|
||||||
TAILQ_HEAD_INITIALIZER(devargs_list);
|
TAILQ_HEAD_INITIALIZER(devargs_list);
|
||||||
|
|
||||||
int
|
|
||||||
rte_eal_parse_devargs_str(const char *devargs_str,
|
|
||||||
char **drvname, char **drvargs)
|
|
||||||
{
|
|
||||||
char *sep;
|
|
||||||
|
|
||||||
if ((devargs_str) == NULL || (drvname) == NULL || (drvargs == NULL))
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
*drvname = strdup(devargs_str);
|
|
||||||
if (*drvname == NULL)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
/* set the first ',' to '\0' to split name and arguments */
|
|
||||||
sep = strchr(*drvname, ',');
|
|
||||||
if (sep != NULL) {
|
|
||||||
sep[0] = '\0';
|
|
||||||
*drvargs = strdup(sep + 1);
|
|
||||||
} else {
|
|
||||||
*drvargs = strdup("");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (*drvargs == NULL) {
|
|
||||||
free(*drvname);
|
|
||||||
*drvname = NULL;
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static size_t
|
static size_t
|
||||||
devargs_layer_count(const char *s)
|
devargs_layer_count(const char *s)
|
||||||
{
|
{
|
||||||
|
@ -66,36 +66,6 @@ struct rte_devargs {
|
|||||||
const char *data; /**< Device string storage. */
|
const char *data; /**< Device string storage. */
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated
|
|
||||||
* Parse a devargs string.
|
|
||||||
*
|
|
||||||
* For PCI devices, the format of arguments string is "PCI_ADDR" or
|
|
||||||
* "PCI_ADDR,key=val,key2=val2,...". Examples: "08:00.1", "0000:5:00.0",
|
|
||||||
* "04:00.0,arg=val".
|
|
||||||
*
|
|
||||||
* For virtual devices, the format of arguments string is "DRIVER_NAME*"
|
|
||||||
* or "DRIVER_NAME*,key=val,key2=val2,...". Examples: "net_ring",
|
|
||||||
* "net_ring0", "net_pmdAnything,arg=0:arg2=1".
|
|
||||||
*
|
|
||||||
* The function parses the arguments string to get driver name and driver
|
|
||||||
* arguments.
|
|
||||||
*
|
|
||||||
* @param devargs_str
|
|
||||||
* The arguments as given by the user.
|
|
||||||
* @param drvname
|
|
||||||
* The pointer to the string to store parsed driver name.
|
|
||||||
* @param drvargs
|
|
||||||
* The pointer to the string to store parsed driver arguments.
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
* - 0 on success
|
|
||||||
* - A negative value on error
|
|
||||||
*/
|
|
||||||
__rte_deprecated
|
|
||||||
int rte_eal_parse_devargs_str(const char *devargs_str,
|
|
||||||
char **drvname, char **drvargs);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse a device string.
|
* Parse a device string.
|
||||||
*
|
*
|
||||||
@ -201,23 +171,6 @@ rte_devargs_insert(struct rte_devargs *da);
|
|||||||
__rte_experimental
|
__rte_experimental
|
||||||
int rte_devargs_add(enum rte_devtype devtype, const char *devargs_str);
|
int rte_devargs_add(enum rte_devtype devtype, const char *devargs_str);
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated
|
|
||||||
* Add a device to the user device list
|
|
||||||
* See rte_devargs_parse() for details.
|
|
||||||
*
|
|
||||||
* @param devtype
|
|
||||||
* The type of the device.
|
|
||||||
* @param devargs_str
|
|
||||||
* The arguments as given by the user.
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
* - 0 on success
|
|
||||||
* - A negative value on error
|
|
||||||
*/
|
|
||||||
__rte_deprecated
|
|
||||||
int rte_eal_devargs_add(enum rte_devtype devtype, const char *devargs_str);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove a device from the user device list.
|
* Remove a device from the user device list.
|
||||||
* Its resources are freed.
|
* Its resources are freed.
|
||||||
@ -251,20 +204,6 @@ __rte_experimental
|
|||||||
unsigned int
|
unsigned int
|
||||||
rte_devargs_type_count(enum rte_devtype devtype);
|
rte_devargs_type_count(enum rte_devtype devtype);
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated
|
|
||||||
* Count the number of user devices of a specified type
|
|
||||||
*
|
|
||||||
* @param devtype
|
|
||||||
* The type of the devices to counted.
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
* The number of devices.
|
|
||||||
*/
|
|
||||||
__rte_deprecated
|
|
||||||
unsigned int
|
|
||||||
rte_eal_devargs_type_count(enum rte_devtype devtype);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function dumps the list of user device and their arguments.
|
* This function dumps the list of user device and their arguments.
|
||||||
*
|
*
|
||||||
@ -274,16 +213,6 @@ rte_eal_devargs_type_count(enum rte_devtype devtype);
|
|||||||
__rte_experimental
|
__rte_experimental
|
||||||
void rte_devargs_dump(FILE *f);
|
void rte_devargs_dump(FILE *f);
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated
|
|
||||||
* This function dumps the list of user device and their arguments.
|
|
||||||
*
|
|
||||||
* @param f
|
|
||||||
* A pointer to a file for output
|
|
||||||
*/
|
|
||||||
__rte_deprecated
|
|
||||||
void rte_eal_devargs_dump(FILE *f);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find next rte_devargs matching the provided bus name.
|
* Find next rte_devargs matching the provided bus name.
|
||||||
*
|
*
|
||||||
|
@ -19,9 +19,6 @@ DPDK_2.0 {
|
|||||||
rte_dump_tailq;
|
rte_dump_tailq;
|
||||||
rte_eal_alarm_cancel;
|
rte_eal_alarm_cancel;
|
||||||
rte_eal_alarm_set;
|
rte_eal_alarm_set;
|
||||||
rte_eal_devargs_add;
|
|
||||||
rte_eal_devargs_dump;
|
|
||||||
rte_eal_devargs_type_count;
|
|
||||||
rte_eal_get_configuration;
|
rte_eal_get_configuration;
|
||||||
rte_eal_get_lcore_state;
|
rte_eal_get_lcore_state;
|
||||||
rte_eal_get_physmem_size;
|
rte_eal_get_physmem_size;
|
||||||
@ -32,7 +29,6 @@ DPDK_2.0 {
|
|||||||
rte_eal_lcore_role;
|
rte_eal_lcore_role;
|
||||||
rte_eal_mp_remote_launch;
|
rte_eal_mp_remote_launch;
|
||||||
rte_eal_mp_wait_lcore;
|
rte_eal_mp_wait_lcore;
|
||||||
rte_eal_parse_devargs_str;
|
|
||||||
rte_eal_process_type;
|
rte_eal_process_type;
|
||||||
rte_eal_remote_launch;
|
rte_eal_remote_launch;
|
||||||
rte_eal_tailq_lookup;
|
rte_eal_tailq_lookup;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user