DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Singh, Jasvinder" <jasvinder.singh@intel.com>
To: Shyam Shrivastav <shrivastav.shyam@gmail.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] Fixed : ip_pipeline firewall port range filtering
Date: Mon, 20 Mar 2017 09:34:26 +0000	[thread overview]
Message-ID: <54CBAA185211B4429112C315DA58FF6D31B0AF27@IRSMSX101.ger.corp.intel.com> (raw)
In-Reply-To: <CAGSp03=yrB0UmNzGyNQSSsfXBH=it-u7uKfx9su7EcAVh4hgoA@mail.gmail.com>

Hi Shayam,


> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Shyam Shrivastav
> Sent: Sunday, March 19, 2017 4:11 PM
> To: dev@dpdk.org
> Cc: Shyam Shrivastav <shrivastav.shyam@gmail.com>
> Subject: [dpdk-dev] Fixed : ip_pipeline firewall port range filtering
> 
> Found the issue,was debugging acl library while issue was with firewall acl
> definition/registration, simple fix makes udp/tcp src/dest based port filtering
> work with ip_pipeline firewall. Below is git diff, will submit patch if members
> suggest . I am very new here ..
> 
> Also I was going through low level acl compilation/classify code, taking time
> to understand,if some dev/code doc is there please pass it on.
> 
> 
> [root@localhost pipeline]# git diff pipeline_firewall_be.c diff --git
> a/examples/ip_pipeline/pipeline/pipeline_firewall_be.c
> b/examples/ip_pipeline/pipeline/pipeline_firewall_be.c
> index b61f303..2980492 100644
> --- a/examples/ip_pipeline/pipeline/pipeline_firewall_be.c
> +++ b/examples/ip_pipeline/pipeline/pipeline_firewall_be.c
> @@ -161,7 +161,7 @@ struct firewall_table_entry {
>                 .type = RTE_ACL_FIELD_TYPE_RANGE,
>                 .size = sizeof(uint16_t),
>                 .field_index = 4,
> -               .input_index = 4,
> +               .input_index = 3,
>                 .offset = sizeof(struct ether_hdr) +
>                         sizeof(struct ipv4_hdr) +
>                         offsetof(struct tcp_hdr, dst_port), @@ -221,7 +221,7 @@ struct
> firewall_table_entry {
>                 .type = RTE_ACL_FIELD_TYPE_RANGE,
>                 .size = sizeof(uint16_t),
>                 .field_index = 4,
> -               .input_index = 4,
> +               .input_index = 3,
>                 .offset = sizeof(struct ether_hdr) +
>                         SIZEOF_VLAN_HDR +
>                         sizeof(struct ipv4_hdr) + @@ -282,7 +282,7 @@ struct
> firewall_table_entry {
>                 .type = RTE_ACL_FIELD_TYPE_RANGE,
>                 .size = sizeof(uint16_t),
>                 .field_index = 4,
> -               .input_index = 4,
> +               .input_index = 3,
>                 .offset = sizeof(struct ether_hdr) +
>                         SIZEOF_QINQ_HEADER +
>                         sizeof(struct ipv4_hdr) +


Looks like a bug as all the fields except the first one has to be grouped into sets of 4 consecutive bytes. Therefore, src & dst ports fields should be grouped under input_index =3, Reference -http://dpdk.org/doc/guides/prog_guide/packet_classif_access_ctrl.html

Please send  a patch on this fix on dpdk.org. Guidelines to send patch on dpdk.org are available at http://dpdk.org/doc/guides/contributing/patches.html#sending-patches

Thanks,
Jasvinder

  reply	other threads:[~2017-03-20  9:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-19 16:11 Shyam Shrivastav
2017-03-20  9:34 ` Singh, Jasvinder [this message]
2017-03-20  9:53   ` Shyam Shrivastav

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54CBAA185211B4429112C315DA58FF6D31B0AF27@IRSMSX101.ger.corp.intel.com \
    --to=jasvinder.singh@intel.com \
    --cc=dev@dpdk.org \
    --cc=shrivastav.shyam@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).