From: Andrew Rybchenko <arybchenko@solarflare.com>
To: <dev@dpdk.org>
Cc: Roman Zhukov <Roman.Zhukov@oktetlabs.ru>
Subject: [dpdk-dev] [PATCH 1/3] net/sfc/base: support drop filters on EF10 family NICs
Date: Tue, 27 Feb 2018 13:11:18 +0000 [thread overview]
Message-ID: <1519737080-7212-2-git-send-email-arybchenko@solarflare.com> (raw)
In-Reply-To: <1519737080-7212-1-git-send-email-arybchenko@solarflare.com>
From: Roman Zhukov <Roman.Zhukov@oktetlabs.ru>
Add support for filters which drop packets when forming MCDI request
for a filter.
Signed-off-by: Roman Zhukov <Roman.Zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
drivers/net/sfc/base/ef10_filter.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/drivers/net/sfc/base/ef10_filter.c b/drivers/net/sfc/base/ef10_filter.c
index 54e1c35..54ea9e3 100644
--- a/drivers/net/sfc/base/ef10_filter.c
+++ b/drivers/net/sfc/base/ef10_filter.c
@@ -209,10 +209,15 @@ efx_mcdi_filter_op_add(
EVB_PORT_ID_ASSIGNED);
MCDI_IN_SET_DWORD(req, FILTER_OP_EXT_IN_MATCH_FIELDS,
match_flags);
- MCDI_IN_SET_DWORD(req, FILTER_OP_EXT_IN_RX_DEST,
- MC_CMD_FILTER_OP_EXT_IN_RX_DEST_HOST);
- MCDI_IN_SET_DWORD(req, FILTER_OP_EXT_IN_RX_QUEUE,
- spec->efs_dmaq_id);
+ if (spec->efs_dmaq_id == EFX_FILTER_SPEC_RX_DMAQ_ID_DROP) {
+ MCDI_IN_SET_DWORD(req, FILTER_OP_EXT_IN_RX_DEST,
+ MC_CMD_FILTER_OP_EXT_IN_RX_DEST_DROP);
+ } else {
+ MCDI_IN_SET_DWORD(req, FILTER_OP_EXT_IN_RX_DEST,
+ MC_CMD_FILTER_OP_EXT_IN_RX_DEST_HOST);
+ MCDI_IN_SET_DWORD(req, FILTER_OP_EXT_IN_RX_QUEUE,
+ spec->efs_dmaq_id);
+ }
#if EFSYS_OPT_RX_SCALE
if (spec->efs_flags & EFX_FILTER_FLAG_RX_RSS) {
--
2.7.4
next prev parent reply other threads:[~2018-02-27 13:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-27 13:11 [dpdk-dev] [PATCH 00/3] net/sfc: support drop action in flow API Andrew Rybchenko
2018-02-27 13:11 ` Andrew Rybchenko [this message]
2018-02-27 13:11 ` [dpdk-dev] [PATCH 2/3] net/sfc: support DROP " Andrew Rybchenko
2018-02-27 13:11 ` [dpdk-dev] [PATCH 3/3] doc: add flow API drop action support to net/sfc Andrew Rybchenko
2018-03-09 10:52 ` [dpdk-dev] [PATCH 00/3] net/sfc: support drop action in flow API Ferruh Yigit
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=1519737080-7212-2-git-send-email-arybchenko@solarflare.com \
--to=arybchenko@solarflare.com \
--cc=Roman.Zhukov@oktetlabs.ru \
--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).