[dpdk-dev] acl: remove invalid test
Checks
Commit Message
rte_acl_add_rules() has no way of checking rule size.
This was hidden because the test effectively checked that
adding a rule with userdata == 0 failed.
Signed-off-by: Michał Mirosław <michal.miroslaw@atendesoftware.pl>
---
app/test/test_acl.c | 20 --------------------
1 file changed, 20 deletions(-)
Comments
Hi Michal,
> -----Original Message-----
> From: Michał Mirosław [mailto:mirq-linux@rere.qmqm.pl]
> Sent: Wednesday, December 14, 2016 5:24 PM
> To: dev@dpdk.org
> Cc: Ananyev, Konstantin <konstantin.ananyev@intel.com>
> Subject: [PATCH] acl: remove invalid test
>
> rte_acl_add_rules() has no way of checking rule size.
>
> This was hidden because the test effectively checked that
> adding a rule with userdata == 0 failed.
I suppose that changes have to be inside:
[PATCH v2] acl: allow zero verdict.
Konstantin
>
> Signed-off-by: Michał Mirosław <michal.miroslaw@atendesoftware.pl>
> ---
> app/test/test_acl.c | 20 --------------------
> 1 file changed, 20 deletions(-)
>
> diff --git a/app/test/test_acl.c b/app/test/test_acl.c
> index 28955f0..be744ec 100644
> --- a/app/test/test_acl.c
> +++ b/app/test/test_acl.c
> @@ -1515,26 +1515,6 @@ test_invalid_parameters(void)
> /* free ACL context */
> rte_acl_free(acx);
>
> - /* set wrong rule_size so that adding any rules would fail */
> - param.rule_size = RTE_ACL_IPV4VLAN_RULE_SZ + 4;
> - acx = rte_acl_create(¶m);
> - if (acx == NULL) {
> - printf("Line %i: ACL context creation failed!\n", __LINE__);
> - return -1;
> - }
> -
> - /* try adding a rule with size different from context rule_size */
> - result = rte_acl_ipv4vlan_add_rules(acx, &rule, 1);
> - if (result == 0) {
> - printf("Line %i: Adding an invalid sized rule "
> - "should have failed!\n", __LINE__);
> - rte_acl_free(acx);
> - return -1;
> - }
> -
> - /* free ACL context */
> - rte_acl_free(acx);
> -
>
> /**
> * rte_acl_ipv4vlan_build
> --
> 2.10.2
On Mon, Dec 19, 2016 at 06:48:52PM +0000, Ananyev, Konstantin wrote:
> Hi Michal,
>
> > -----Original Message-----
> > From: Michał Mirosław [mailto:mirq-linux@rere.qmqm.pl]
> > Sent: Wednesday, December 14, 2016 5:24 PM
> > To: dev@dpdk.org
> > Cc: Ananyev, Konstantin <konstantin.ananyev@intel.com>
> > Subject: [PATCH] acl: remove invalid test
> >
> > rte_acl_add_rules() has no way of checking rule size.
> >
> > This was hidden because the test effectively checked that
> > adding a rule with userdata == 0 failed.
> I suppose that changes have to be inside:
> [PATCH v2] acl: allow zero verdict.
The 'allow zero verdict' patch depends on this one if we are to not have
a breaking tests inbetween. Otherwise, it is an independent change.
I guess I can merge them, though, if you prefer it that way.
Best Regards,
Michał Mirosław
> -----Original Message-----
> From: Michal Miroslaw [mailto:mirq-linux@rere.qmqm.pl]
> Sent: Friday, December 23, 2016 1:48 AM
> To: Ananyev, Konstantin <konstantin.ananyev@intel.com>
> Cc: dev@dpdk.org
> Subject: Re: [PATCH] acl: remove invalid test
>
> On Mon, Dec 19, 2016 at 06:48:52PM +0000, Ananyev, Konstantin wrote:
> > Hi Michal,
> >
> > > -----Original Message-----
> > > From: Michał Mirosław [mailto:mirq-linux@rere.qmqm.pl]
> > > Sent: Wednesday, December 14, 2016 5:24 PM
> > > To: dev@dpdk.org
> > > Cc: Ananyev, Konstantin <konstantin.ananyev@intel.com>
> > > Subject: [PATCH] acl: remove invalid test
> > >
> > > rte_acl_add_rules() has no way of checking rule size.
> > >
> > > This was hidden because the test effectively checked that
> > > adding a rule with userdata == 0 failed.
> > I suppose that changes have to be inside:
> > [PATCH v2] acl: allow zero verdict.
>
> The 'allow zero verdict' patch depends on this one if we are to not have
> a breaking tests inbetween.
Exactly, that's why I think they either has to be in one series of patches,
with this one coming first and ' PATCH v2] acl: allow zero verdict' as the second one,
or just merge them into one.
Konstantin
>Otherwise, it is an independent change.
>
> I guess I can merge them, though, if you prefer it that way.
>
> Best Regards,
> Michał Mirosław
2016-12-23 09:36, Ananyev, Konstantin:
> From: Michal Miroslaw [mailto:mirq-linux@rere.qmqm.pl]
> > On Mon, Dec 19, 2016 at 06:48:52PM +0000, Ananyev, Konstantin wrote:
> > > I suppose that changes have to be inside:
> > > [PATCH v2] acl: allow zero verdict.
> >
> > The 'allow zero verdict' patch depends on this one if we are to not have
> > a breaking tests inbetween.
>
> Exactly, that's why I think they either has to be in one series of patches,
> with this one coming first and ' PATCH v2] acl: allow zero verdict' as the second one,
> or just merge them into one.
No progress here.
Konstantin, do you ack this patch?
I could apply it as a standalone patch.
Hi Thomas,
>
> 2016-12-23 09:36, Ananyev, Konstantin:
> > From: Michal Miroslaw [mailto:mirq-linux@rere.qmqm.pl]
> > > On Mon, Dec 19, 2016 at 06:48:52PM +0000, Ananyev, Konstantin wrote:
> > > > I suppose that changes have to be inside:
> > > > [PATCH v2] acl: allow zero verdict.
> > >
> > > The 'allow zero verdict' patch depends on this one if we are to not have
> > > a breaking tests inbetween.
> >
> > Exactly, that's why I think they either has to be in one series of patches,
> > with this one coming first and ' PATCH v2] acl: allow zero verdict' as the second one,
> > or just merge them into one.
>
> No progress here.
> Konstantin, do you ack this patch?
Yes, I do.
I just thought that the author would resubmit it as part of
' PATCH v2] acl: allow zero verdict'
to comply with DPDK patch submission rules.
Konstantin
> I could apply it as a standalone patch.
On Wed, Jan 18, 2017 at 09:51:45AM +0000, Ananyev, Konstantin wrote:
> Hi Thomas,
>
> >
> > 2016-12-23 09:36, Ananyev, Konstantin:
> > > From: Michal Miroslaw [mailto:mirq-linux@rere.qmqm.pl]
> > > > On Mon, Dec 19, 2016 at 06:48:52PM +0000, Ananyev, Konstantin wrote:
> > > > > I suppose that changes have to be inside:
> > > > > [PATCH v2] acl: allow zero verdict.
> > > >
> > > > The 'allow zero verdict' patch depends on this one if we are to not have
> > > > a breaking tests inbetween.
> > >
> > > Exactly, that's why I think they either has to be in one series of patches,
> > > with this one coming first and ' PATCH v2] acl: allow zero verdict' as the second one,
> > > or just merge them into one.
> > No progress here.
> > Konstantin, do you ack this patch?
> Yes, I do.
> I just thought that the author would resubmit it as part of
> ' PATCH v2] acl: allow zero verdict'
> to comply with DPDK patch submission rules.
> Konstantin
> > I could apply it as a standalone patch.
Sorry for the delay. I'll do just that in a moment.
Best Regards,
Michał Mirosław
@@ -1515,26 +1515,6 @@ test_invalid_parameters(void)
/* free ACL context */
rte_acl_free(acx);
- /* set wrong rule_size so that adding any rules would fail */
- param.rule_size = RTE_ACL_IPV4VLAN_RULE_SZ + 4;
- acx = rte_acl_create(¶m);
- if (acx == NULL) {
- printf("Line %i: ACL context creation failed!\n", __LINE__);
- return -1;
- }
-
- /* try adding a rule with size different from context rule_size */
- result = rte_acl_ipv4vlan_add_rules(acx, &rule, 1);
- if (result == 0) {
- printf("Line %i: Adding an invalid sized rule "
- "should have failed!\n", __LINE__);
- rte_acl_free(acx);
- return -1;
- }
-
- /* free ACL context */
- rte_acl_free(acx);
-
/**
* rte_acl_ipv4vlan_build