DPDK patches and discussions
 help / color / mirror / Atom feed
From: Michael Habibi <mikehabibi@gmail.com>
To: dev@dpdk.org
Subject: [dpdk-dev] Bug in i40e PMD for flexible payload
Date: Wed, 23 Mar 2016 13:44:46 -0500	[thread overview]
Message-ID: <CAOsp8o-F-QAqmEV=9GkeB4DZz+YhHwNY=GYW1C9q8EdoVQ9R1g@mail.gmail.com> (raw)

We are using the i40 implementation to configure flow director with
flexible payload rules. When setting up rules, it allows you to set a value
to 63 to disable the rule (NONUSE_FLX_PIT_DEST_OFF). However, the macro in
question is always adding an offset value 50
(I40E_FLX_OFFSET_IN_FIELD_VECTOR). This doesn't work when you use it in
conjunction with NONUSE_FLX_PIT_DEST_OFF to disable it, because instead of
taking 63 as is, it does 63 + 50 and breaks the functionality.

We used the following fix and it appears to work. Just sharing with the
DPDK team in case they want to bring it in.

Index: i40e_fdir.c

===================================================================

--- i40e_fdir.c (revision 30006)

+++ i40e_fdir.c (working copy)

@@ -90,7 +90,8 @@

          I40E_PRTQF_FLX_PIT_SOURCE_OFF_MASK) | \

    (((fsize) << I40E_PRTQF_FLX_PIT_FSIZE_SHIFT) & \

               I40E_PRTQF_FLX_PIT_FSIZE_MASK) | \

-    ((((dst_offset) + I40E_FLX_OFFSET_IN_FIELD_VECTOR) << \

+    ((((dst_offset) + ((dst_offset < NONUSE_FLX_PIT_DEST_OFF) ? \

+               I40E_FLX_OFFSET_IN_FIELD_VECTOR : 0)) << \

               I40E_PRTQF_FLX_PIT_DEST_OFF_SHIFT) & \

               I40E_PRTQF_FLX_PIT_DEST_OFF_MASK))

             reply	other threads:[~2016-03-23 18:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-23 18:44 Michael Habibi [this message]
2016-03-24 12:04 ` Bruce Richardson
2016-03-28 18:36   ` Michael Habibi
2016-04-14  3:31 ` Wu, Jingjing

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='CAOsp8o-F-QAqmEV=9GkeB4DZz+YhHwNY=GYW1C9q8EdoVQ9R1g@mail.gmail.com' \
    --to=mikehabibi@gmail.com \
    --cc=dev@dpdk.org \
    /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).