From: Yuval Mintz <Yuval.Mintz@cavium.com>
To: <davem@davemloft.net>, <netdev@vger.kernel.org>
Cc: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>,
Yuval Mintz <Yuval.Mintz@cavium.com>
Subject: [PATCH net-next 02/10] qed: Correct DCBx update scheme
Date: Sun, 28 May 2017 18:01:52 +0300 [thread overview]
Message-ID: <1495983720-10853-3-git-send-email-Yuval.Mintz@cavium.com> (raw)
In-Reply-To: <1495983720-10853-1-git-send-email-Yuval.Mintz@cavium.com>
From: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
Instead of using a boolean value that propagates to FW configuration,
use the proper firmware HSI values.
Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
---
drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 15 ++++++++-------
drivers/net/ethernet/qlogic/qed/qed_dcbx.h | 2 +-
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qed/qed_dcbx.c b/drivers/net/ethernet/qlogic/qed/qed_dcbx.c
index efe309e..af34638 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_dcbx.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_dcbx.c
@@ -191,17 +191,19 @@ static bool qed_dcbx_roce_v2_tlv(u32 app_info_bitmap, u16 proto_id, bool ieee)
qed_dcbx_set_params(struct qed_dcbx_results *p_data,
struct qed_hw_info *p_info,
bool enable,
- bool update,
u8 prio,
u8 tc,
enum dcbx_protocol_type type,
enum qed_pci_personality personality)
{
/* PF update ramrod data */
- p_data->arr[type].update = update;
p_data->arr[type].enable = enable;
p_data->arr[type].priority = prio;
p_data->arr[type].tc = tc;
+ if (enable)
+ p_data->arr[type].update = UPDATE_DCB;
+ else
+ p_data->arr[type].update = DONT_UPDATE_DCB_DSCP;
/* QM reconf data */
if (p_info->personality == personality)
@@ -213,7 +215,6 @@ static bool qed_dcbx_roce_v2_tlv(u32 app_info_bitmap, u16 proto_id, bool ieee)
qed_dcbx_update_app_info(struct qed_dcbx_results *p_data,
struct qed_hwfn *p_hwfn,
bool enable,
- bool update,
u8 prio, u8 tc, enum dcbx_protocol_type type)
{
struct qed_hw_info *p_info = &p_hwfn->hw_info;
@@ -231,7 +232,7 @@ static bool qed_dcbx_roce_v2_tlv(u32 app_info_bitmap, u16 proto_id, bool ieee)
personality = qed_dcbx_app_update[i].personality;
name = qed_dcbx_app_update[i].name;
- qed_dcbx_set_params(p_data, p_info, enable, update,
+ qed_dcbx_set_params(p_data, p_info, enable,
prio, tc, type, personality);
}
}
@@ -304,7 +305,7 @@ static bool qed_dcbx_roce_v2_tlv(u32 app_info_bitmap, u16 proto_id, bool ieee)
*/
enable = !(type == DCBX_PROTOCOL_ETH);
- qed_dcbx_update_app_info(p_data, p_hwfn, enable, true,
+ qed_dcbx_update_app_info(p_data, p_hwfn, enable,
priority, tc, type);
}
}
@@ -332,8 +333,8 @@ static bool qed_dcbx_roce_v2_tlv(u32 app_info_bitmap, u16 proto_id, bool ieee)
if (p_data->arr[type].update)
continue;
- enable = !(type == DCBX_PROTOCOL_ETH);
- qed_dcbx_update_app_info(p_data, p_hwfn, enable, true,
+ enable = (type == DCBX_PROTOCOL_ETH) ? false : !!dcbx_version;
+ qed_dcbx_update_app_info(p_data, p_hwfn, enable,
priority, tc, type);
}
diff --git a/drivers/net/ethernet/qlogic/qed/qed_dcbx.h b/drivers/net/ethernet/qlogic/qed/qed_dcbx.h
index 414e262..5feb90e 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_dcbx.h
+++ b/drivers/net/ethernet/qlogic/qed/qed_dcbx.h
@@ -52,7 +52,7 @@ enum qed_mib_read_type {
struct qed_dcbx_app_data {
bool enable; /* DCB enabled */
- bool update; /* Update indication */
+ u8 update; /* Update indication */
u8 priority; /* Priority */
u8 tc; /* Traffic Class */
};
--
1.9.3
next prev parent reply other threads:[~2017-05-28 15:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-28 15:01 [PATCH net-next 00/10] qed: DCBx and Attentions series Yuval Mintz
2017-05-28 15:01 ` [PATCH net-next 01/10] qed: Add missing static/local dcbx info Yuval Mintz
2017-05-28 15:01 ` Yuval Mintz [this message]
2017-05-28 15:58 ` [PATCH net-next 02/10] qed: Correct DCBx update scheme kbuild test robot
2017-05-28 15:01 ` [PATCH net-next 03/10] qed: Don't inherit RoCE DCBx for V2 Yuval Mintz
2017-05-28 15:01 ` [PATCH net-next 04/10] qed: QL41xxx VF MSI-x table Yuval Mintz
2017-05-28 15:01 ` [PATCH net-next 05/10] qed: Support dynamic s-tag change Yuval Mintz
2017-05-28 15:01 ` [PATCH net-next 06/10] qed: Get rid of the attention-arrays Yuval Mintz
2017-05-28 15:01 ` [PATCH net-next 07/10] qed: Diffrentiate adapter-specific attentions Yuval Mintz
2017-05-28 15:01 ` [PATCH net-next 08/10] qed: Print multi-bit attentions properly Yuval Mintz
2017-05-28 15:01 ` [PATCH net-next 09/10] qed: Mask parities after occurance Yuval Mintz
2017-05-28 15:02 ` [PATCH net-next 10/10] qed: Cache alignemnt padding to match host Yuval Mintz
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=1495983720-10853-3-git-send-email-Yuval.Mintz@cavium.com \
--to=yuval.mintz@cavium.com \
--cc=Sudarsana.Kalluru@cavium.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.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