[dpdk-dev,3/3] acl: mark deprecated functions
Commit Message
From: Stephen Hemminger <shemming@brocade.com>
To allow for compatiablity with later releases, any functions
to be removed should be marked as deprecated for one release.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
app/test/Makefile | 8 +++++++-
lib/librte_acl/rte_acl.h | 4 ++--
2 files changed, 9 insertions(+), 3 deletions(-)
Comments
On 06/15/2015 07:51 PM, Stephen Hemminger wrote:
> From: Stephen Hemminger <shemming@brocade.com>
>
> To allow for compatiablity with later releases, any functions
> to be removed should be marked as deprecated for one release.
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
[...]
> diff --git a/lib/librte_acl/rte_acl.h b/lib/librte_acl/rte_acl.h
> index 3a93730..0c32df0 100644
> --- a/lib/librte_acl/rte_acl.h
> +++ b/lib/librte_acl/rte_acl.h
> @@ -456,7 +456,7 @@ enum {
> int
> rte_acl_ipv4vlan_add_rules(struct rte_acl_ctx *ctx,
> const struct rte_acl_ipv4vlan_rule *rules,
> - uint32_t num);
> + uint32_t num) __attribute__((deprecated));
>
> /**
> * Analyze set of ipv4vlan rules and build required internal
> @@ -478,7 +478,7 @@ rte_acl_ipv4vlan_add_rules(struct rte_acl_ctx *ctx,
> int
> rte_acl_ipv4vlan_build(struct rte_acl_ctx *ctx,
> const uint32_t layout[RTE_ACL_IPV4VLAN_NUM],
> - uint32_t num_categories);
> + uint32_t num_categories) __attribute__((deprecated));
>
>
> #ifdef __cplusplus
>
I've no objections to the patch as such, but I think the ABI policy is
asking all deprecation notices to be added to the "Deprecation Notices"
section in the policy document itself.
That said, the average developer is MUCH likelier to notice the compiler
warning from these than a deprecation notice in some "who reads those"
document :) Perhaps we could generate a list of functions marked for
removal for the ABI policy document automatically based on the
deprecated attributes.
- Panu -
@@ -141,9 +141,15 @@ SRCS-$(CONFIG_RTE_LIBRTE_KVARGS) += test_kvargs.c
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
-
CFLAGS += -D_GNU_SOURCE
+# Disable warnings of deprecated-declarations in test_acl.c
+ifeq ($(CC), icc)
+CFLAGS_test_acl.o += -wd1478
+else
+CFLAGS_test_acl.o += -Wno-deprecated-declarations
+endif
+
# Disable VTA for memcpy test
ifeq ($(CC), gcc)
ifeq ($(shell test $(GCC_VERSION) -ge 44 && echo 1), 1)
@@ -456,7 +456,7 @@ enum {
int
rte_acl_ipv4vlan_add_rules(struct rte_acl_ctx *ctx,
const struct rte_acl_ipv4vlan_rule *rules,
- uint32_t num);
+ uint32_t num) __attribute__((deprecated));
/**
* Analyze set of ipv4vlan rules and build required internal
@@ -478,7 +478,7 @@ rte_acl_ipv4vlan_add_rules(struct rte_acl_ctx *ctx,
int
rte_acl_ipv4vlan_build(struct rte_acl_ctx *ctx,
const uint32_t layout[RTE_ACL_IPV4VLAN_NUM],
- uint32_t num_categories);
+ uint32_t num_categories) __attribute__((deprecated));
#ifdef __cplusplus