From: Rasesh Mody <rasesh.mody@qlogic.com>
To: <dev@dpdk.org>
Cc: <Dept-EngDPDKDev@qlogic.com>, Sony Chacko <sony.chacko@qlogic.com>
Subject: [dpdk-dev] [PATCH 8/9] qede: enable vf-vf traffic with unmatched dest addr
Date: Fri, 6 May 2016 21:30:20 -0700 [thread overview]
Message-ID: <1462595421-22505-9-git-send-email-rasesh.mody@qlogic.com> (raw)
In-Reply-To: <1462595421-22505-1-git-send-email-rasesh.mody@qlogic.com>
From: Sony Chacko <sony.chacko@qlogic.com>
This patch enables VF to VF traffic with unmatched destination address.
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
---
drivers/net/qede/base/ecore_l2.c | 19 +++++++++++-----
drivers/net/qede/qede_eth_if.c | 45 +++++++++++++++++++++-----------------
2 files changed, 39 insertions(+), 25 deletions(-)
diff --git a/drivers/net/qede/base/ecore_l2.c b/drivers/net/qede/base/ecore_l2.c
index 8a1a26a..9e6ef5a 100644
--- a/drivers/net/qede/base/ecore_l2.c
+++ b/drivers/net/qede/base/ecore_l2.c
@@ -227,11 +227,11 @@ ecore_sp_update_accept_mode(struct ecore_hwfn *p_hwfn,
* SET_FIELD(*state, ETH_VPORT_RX_MODE_UCAST_DROP_ALL,
* !!(accept_filter & ECORE_ACCEPT_NONE));
*/
-/*
- * SET_FIELD(*state, ETH_VPORT_RX_MODE_UCAST_ACCEPT_ALL,
- * (!!(accept_filter & ECORE_ACCEPT_UCAST_MATCHED) &&
- * !!(accept_filter & ECORE_ACCEPT_UCAST_UNMATCHED)));
- */
+
+ SET_FIELD(*state, ETH_VPORT_RX_MODE_UCAST_ACCEPT_ALL,
+ (!!(accept_filter & ECORE_ACCEPT_UCAST_MATCHED) &&
+ !!(accept_filter & ECORE_ACCEPT_UCAST_UNMATCHED)));
+
SET_FIELD(*state, ETH_VPORT_RX_MODE_UCAST_DROP_ALL,
!(!!(accept_filter & ECORE_ACCEPT_UCAST_MATCHED) ||
!!(accept_filter & ECORE_ACCEPT_UCAST_UNMATCHED)));
@@ -275,6 +275,15 @@ ecore_sp_update_accept_mode(struct ecore_hwfn *p_hwfn,
SET_FIELD(*state, ETH_VPORT_TX_MODE_BCAST_ACCEPT_ALL,
!!(accept_filter & ECORE_ACCEPT_BCAST));
+ /* @DPDK */
+ /* ETH_VPORT_RX_MODE_UCAST_ACCEPT_ALL and
+ * ETH_VPORT_TX_MODE_UCAST_ACCEPT_ALL
+ * needs to be set for VF-VF communication to work
+ * when dest macaddr is unknown.
+ */
+ SET_FIELD(*state, ETH_VPORT_TX_MODE_UCAST_ACCEPT_ALL,
+ (!!(accept_filter & ECORE_ACCEPT_UCAST_MATCHED) &&
+ !!(accept_filter & ECORE_ACCEPT_UCAST_UNMATCHED)));
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
"p_ramrod->tx_mode.state = 0x%x\n",
diff --git a/drivers/net/qede/qede_eth_if.c b/drivers/net/qede/qede_eth_if.c
index fd07d8b..b6f6487 100644
--- a/drivers/net/qede/qede_eth_if.c
+++ b/drivers/net/qede/qede_eth_if.c
@@ -377,33 +377,38 @@ qed_configure_filter_mcast(struct ecore_dev *edev,
return ecore_filter_mcast_cmd(edev, &mcast, ECORE_SPQ_MODE_CB, NULL);
}
-int
-qed_configure_filter_rx_mode(struct ecore_dev *edev,
- enum qed_filter_rx_mode_type type)
+int qed_configure_filter_rx_mode(struct ecore_dev *edev,
+ enum qed_filter_rx_mode_type type)
{
- struct ecore_filter_accept_flags accept_flags;
+ struct ecore_filter_accept_flags flags;
- memset(&accept_flags, 0, sizeof(accept_flags));
+ memset(&flags, 0, sizeof(flags));
- accept_flags.update_rx_mode_config = 1;
- accept_flags.update_tx_mode_config = 1;
- accept_flags.rx_accept_filter = ECORE_ACCEPT_UCAST_MATCHED |
- ECORE_ACCEPT_MCAST_MATCHED |
- ECORE_ACCEPT_BCAST;
- accept_flags.tx_accept_filter = ECORE_ACCEPT_UCAST_MATCHED |
+ flags.update_rx_mode_config = 1;
+ flags.update_tx_mode_config = 1;
+ flags.rx_accept_filter = ECORE_ACCEPT_UCAST_MATCHED |
ECORE_ACCEPT_MCAST_MATCHED |
ECORE_ACCEPT_BCAST;
- if (type == QED_FILTER_RX_MODE_TYPE_PROMISC)
- accept_flags.rx_accept_filter |= ECORE_ACCEPT_UCAST_UNMATCHED;
- else if (type == QED_FILTER_RX_MODE_TYPE_MULTI_PROMISC)
- accept_flags.rx_accept_filter |= ECORE_ACCEPT_MCAST_UNMATCHED;
- else if (type == (QED_FILTER_RX_MODE_TYPE_MULTI_PROMISC |
- QED_FILTER_RX_MODE_TYPE_PROMISC))
- accept_flags.rx_accept_filter |= ECORE_ACCEPT_UCAST_UNMATCHED |
- ECORE_ACCEPT_MCAST_UNMATCHED;
+ flags.tx_accept_filter = ECORE_ACCEPT_UCAST_MATCHED |
+ ECORE_ACCEPT_MCAST_MATCHED |
+ ECORE_ACCEPT_BCAST;
+
+ if (type == QED_FILTER_RX_MODE_TYPE_PROMISC) {
+ flags.rx_accept_filter |= ECORE_ACCEPT_UCAST_UNMATCHED;
+ if (IS_VF(edev)) {
+ flags.tx_accept_filter |= ECORE_ACCEPT_UCAST_UNMATCHED;
+ DP_INFO(edev, "Enabling Tx unmatched flag for VF\n");
+ }
+ } else if (type == QED_FILTER_RX_MODE_TYPE_MULTI_PROMISC) {
+ flags.rx_accept_filter |= ECORE_ACCEPT_MCAST_UNMATCHED;
+ } else if (type == (QED_FILTER_RX_MODE_TYPE_MULTI_PROMISC |
+ QED_FILTER_RX_MODE_TYPE_PROMISC)) {
+ flags.rx_accept_filter |= ECORE_ACCEPT_UCAST_UNMATCHED |
+ ECORE_ACCEPT_MCAST_UNMATCHED;
+ }
- return ecore_filter_accept_cmd(edev, 0, accept_flags, false, false,
+ return ecore_filter_accept_cmd(edev, 0, flags, false, false,
ECORE_SPQ_MODE_CB, NULL);
}
--
1.7.10.3
next prev parent reply other threads:[~2016-05-07 4:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-07 4:30 [dpdk-dev] [PATCH 0/9] qede: update qede PMD to 1.1.0.1 Rasesh Mody
2016-05-07 4:30 ` [dpdk-dev] [PATCH 1/9] qede: update hash config Rasesh Mody
2016-05-07 4:30 ` [dpdk-dev] [PATCH 2/9] qede: get hash configuration Rasesh Mody
2016-05-07 4:30 ` [dpdk-dev] [PATCH 3/9] qede: rss redirection table update Rasesh Mody
2016-05-07 4:30 ` [dpdk-dev] [PATCH 4/9] qede: rss redirection table query Rasesh Mody
2016-05-07 4:30 ` [dpdk-dev] [PATCH 5/9] qede: set mtu Rasesh Mody
2016-05-07 4:30 ` [dpdk-dev] [PATCH 6/9] qede: add support for xstats Rasesh Mody
2016-05-09 17:56 ` Van Haaren, Harry
2016-05-07 4:30 ` [dpdk-dev] [PATCH 7/9] qede: add 100g mode support Rasesh Mody
2016-06-07 11:09 ` Bruce Richardson
2016-05-07 4:30 ` Rasesh Mody [this message]
2016-06-07 12:37 ` [dpdk-dev] [PATCH 8/9] qede: enable vf-vf traffic with unmatched dest addr Bruce Richardson
2016-05-07 4:30 ` [dpdk-dev] [PATCH 9/9] qede: update version to 8.7.9.0_1.1.0.1 Rasesh Mody
2016-05-23 0:56 ` [dpdk-dev] [PATCH 0/9] qede: update qede PMD to 1.1.0.1 Rasesh Mody
2016-06-07 12:47 ` Bruce Richardson
2016-06-07 18:26 ` Rasesh Mody
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=1462595421-22505-9-git-send-email-rasesh.mody@qlogic.com \
--to=rasesh.mody@qlogic.com \
--cc=Dept-EngDPDKDev@qlogic.com \
--cc=dev@dpdk.org \
--cc=sony.chacko@qlogic.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).