From: yankejian@huawei.com (Yankejian (Hackim Yim))
To: linux-arm-kernel@lists.infradead.org
Subject: [patch] {1620} net: hns3: add dcb cap flag in init sequence
Date: Wed, 25 Jan 2017 15:19:22 +0800 [thread overview]
Message-ID: <5888517A.1020105@huawei.com> (raw)
In-Reply-To: <1485329200-64453-1-git-send-email-yankejian@huawei.com>
it is misoperation, please ignore. sorry to interrupt you!
On 2017/1/25 15:26, Kejian Yan wrote:
> If enable DCB feature, we need to add the capacity, and the current
> procedure cannot setting the dcb because of no capacity flag and every
> ops interface will implement by the capicity flag is enable.
>
> Signed-off-by: Kejian Yan <yankejian@huawei.com>
> ---
> drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 6 ++++--
> drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 5 +++++
> 2 files changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
> index 26b9b46..fffe781 100644
> --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
> +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
> @@ -314,12 +314,14 @@ static int hclge_configure(struct hclge_dev *hdev)
> hdev->tx_sch_mode = HCLGE_FLAG_TC_BASE_SCH_MODE;
> #ifdef CONFIG_HNS3_DCB
> hdev->dcbx_cap = DCB_CAP_DCBX_VER_CEE |
> - DCB_CAP_DCBX_VER_IEEE;
> + DCB_CAP_DCBX_VER_IEEE | DCB_CAP_DCBX_HOST;
> + hdev->flag |= HCLGE_FLAG_DCB_CAPABLE;
> #endif /* #ifdef CONFIG_HNS3_DCB */
> } else {
> hdev->tx_sch_mode = HCLGE_FLAG_VNET_BASE_SCH_MODE;
> #ifdef CONFIG_HNS3_DCB
> - hdev->dcbx_cap = DCB_CAP_DCBX_VER_IEEE;
> + hdev->dcbx_cap = DCB_CAP_DCBX_VER_IEEE | DCB_CAP_DCBX_HOST;
> + hdev->flag |= HCLGE_FLAG_DCB_CAPABLE;
> #endif /* #ifdef CONFIG_HNS3_DCB */
> }
>
> diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c
> index 903c413..6b00982 100644
> --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c
> +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c
> @@ -687,6 +687,11 @@ static void hclge_tm_tc_info_init(struct hclge_dev *hdev)
> hdev->dcb_info_tmp.num_tc = hdev->dcb_info.num_tc;
> memcpy(hdev->dcb_info_tmp.tc_info, hdev->dcb_info.tc_info,
> HNAE3_MAX_TC * sizeof(*hdev->dcb_info.tc_info));
> +
> + if (hdev->dcb_info.num_tc > 1)
> + hdev->flag |= HCLGE_FLAG_DCB_ENABLE;
> + else
> + hdev->flag &= ~HCLGE_FLAG_DCB_ENABLE;
> }
>
> static void hclge_tm_pg_info_init(struct hclge_dev *hdev)
--
MBR,
Yankejian (Hackim Yim)
WARNING: multiple messages have this Message-ID (diff)
From: "Yankejian (Hackim Yim)" <yankejian-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
To: liguozhu-hv44wF8Li93QT0dZR+AlfA@public.gmane.org,
yisen.zhuang-hv44wF8Li93QT0dZR+AlfA@public.gmane.org,
huangdaode-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org,
lipeng321-hv44wF8Li93QT0dZR+AlfA@public.gmane.org,
davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
pawel.moll-5wv7dgnIgG8@public.gmane.org,
mark.rutland-5wv7dgnIgG8@public.gmane.org,
ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org,
galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
catalin.marinas-5wv7dgnIgG8@public.gmane.org,
will.deacon-5wv7dgnIgG8@public.gmane.org
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linuxarm-hv44wF8Li93QT0dZR+AlfA@public.gmane.org
Subject: Re: [patch] {1620} net: hns3: add dcb cap flag in init sequence
Date: Wed, 25 Jan 2017 15:19:22 +0800 [thread overview]
Message-ID: <5888517A.1020105@huawei.com> (raw)
In-Reply-To: <1485329200-64453-1-git-send-email-yankejian-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
it is misoperation, please ignore. sorry to interrupt you!
On 2017/1/25 15:26, Kejian Yan wrote:
> If enable DCB feature, we need to add the capacity, and the current
> procedure cannot setting the dcb because of no capacity flag and every
> ops interface will implement by the capicity flag is enable.
>
> Signed-off-by: Kejian Yan <yankejian-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
> ---
> drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 6 ++++--
> drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 5 +++++
> 2 files changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
> index 26b9b46..fffe781 100644
> --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
> +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
> @@ -314,12 +314,14 @@ static int hclge_configure(struct hclge_dev *hdev)
> hdev->tx_sch_mode = HCLGE_FLAG_TC_BASE_SCH_MODE;
> #ifdef CONFIG_HNS3_DCB
> hdev->dcbx_cap = DCB_CAP_DCBX_VER_CEE |
> - DCB_CAP_DCBX_VER_IEEE;
> + DCB_CAP_DCBX_VER_IEEE | DCB_CAP_DCBX_HOST;
> + hdev->flag |= HCLGE_FLAG_DCB_CAPABLE;
> #endif /* #ifdef CONFIG_HNS3_DCB */
> } else {
> hdev->tx_sch_mode = HCLGE_FLAG_VNET_BASE_SCH_MODE;
> #ifdef CONFIG_HNS3_DCB
> - hdev->dcbx_cap = DCB_CAP_DCBX_VER_IEEE;
> + hdev->dcbx_cap = DCB_CAP_DCBX_VER_IEEE | DCB_CAP_DCBX_HOST;
> + hdev->flag |= HCLGE_FLAG_DCB_CAPABLE;
> #endif /* #ifdef CONFIG_HNS3_DCB */
> }
>
> diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c
> index 903c413..6b00982 100644
> --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c
> +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c
> @@ -687,6 +687,11 @@ static void hclge_tm_tc_info_init(struct hclge_dev *hdev)
> hdev->dcb_info_tmp.num_tc = hdev->dcb_info.num_tc;
> memcpy(hdev->dcb_info_tmp.tc_info, hdev->dcb_info.tc_info,
> HNAE3_MAX_TC * sizeof(*hdev->dcb_info.tc_info));
> +
> + if (hdev->dcb_info.num_tc > 1)
> + hdev->flag |= HCLGE_FLAG_DCB_ENABLE;
> + else
> + hdev->flag &= ~HCLGE_FLAG_DCB_ENABLE;
> }
>
> static void hclge_tm_pg_info_init(struct hclge_dev *hdev)
--
MBR,
Yankejian (Hackim Yim)
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: "Yankejian (Hackim Yim)" <yankejian@huawei.com>
To: <liguozhu@huawei.com>, <yisen.zhuang@huawei.com>,
<huangdaode@hisilicon.com>, <lipeng321@huawei.com>,
<davem@davemloft.net>, <robh+dt@kernel.org>, <pawel.moll@arm.com>,
<mark.rutland@arm.com>, <ijc+devicetree@hellion.org.uk>,
<galak@codeaurora.org>, <catalin.marinas@arm.com>,
<will.deacon@arm.com>
Cc: <devicetree@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <linuxarm@huawei.com>
Subject: Re: [patch] {1620} net: hns3: add dcb cap flag in init sequence
Date: Wed, 25 Jan 2017 15:19:22 +0800 [thread overview]
Message-ID: <5888517A.1020105@huawei.com> (raw)
In-Reply-To: <1485329200-64453-1-git-send-email-yankejian@huawei.com>
it is misoperation, please ignore. sorry to interrupt you!
On 2017/1/25 15:26, Kejian Yan wrote:
> If enable DCB feature, we need to add the capacity, and the current
> procedure cannot setting the dcb because of no capacity flag and every
> ops interface will implement by the capicity flag is enable.
>
> Signed-off-by: Kejian Yan <yankejian@huawei.com>
> ---
> drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 6 ++++--
> drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 5 +++++
> 2 files changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
> index 26b9b46..fffe781 100644
> --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
> +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
> @@ -314,12 +314,14 @@ static int hclge_configure(struct hclge_dev *hdev)
> hdev->tx_sch_mode = HCLGE_FLAG_TC_BASE_SCH_MODE;
> #ifdef CONFIG_HNS3_DCB
> hdev->dcbx_cap = DCB_CAP_DCBX_VER_CEE |
> - DCB_CAP_DCBX_VER_IEEE;
> + DCB_CAP_DCBX_VER_IEEE | DCB_CAP_DCBX_HOST;
> + hdev->flag |= HCLGE_FLAG_DCB_CAPABLE;
> #endif /* #ifdef CONFIG_HNS3_DCB */
> } else {
> hdev->tx_sch_mode = HCLGE_FLAG_VNET_BASE_SCH_MODE;
> #ifdef CONFIG_HNS3_DCB
> - hdev->dcbx_cap = DCB_CAP_DCBX_VER_IEEE;
> + hdev->dcbx_cap = DCB_CAP_DCBX_VER_IEEE | DCB_CAP_DCBX_HOST;
> + hdev->flag |= HCLGE_FLAG_DCB_CAPABLE;
> #endif /* #ifdef CONFIG_HNS3_DCB */
> }
>
> diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c
> index 903c413..6b00982 100644
> --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c
> +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c
> @@ -687,6 +687,11 @@ static void hclge_tm_tc_info_init(struct hclge_dev *hdev)
> hdev->dcb_info_tmp.num_tc = hdev->dcb_info.num_tc;
> memcpy(hdev->dcb_info_tmp.tc_info, hdev->dcb_info.tc_info,
> HNAE3_MAX_TC * sizeof(*hdev->dcb_info.tc_info));
> +
> + if (hdev->dcb_info.num_tc > 1)
> + hdev->flag |= HCLGE_FLAG_DCB_ENABLE;
> + else
> + hdev->flag &= ~HCLGE_FLAG_DCB_ENABLE;
> }
>
> static void hclge_tm_pg_info_init(struct hclge_dev *hdev)
--
MBR,
Yankejian (Hackim Yim)
next prev parent reply other threads:[~2017-01-25 7:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-25 7:26 [patch] {1620} net: hns3: add dcb cap flag in init sequence Kejian Yan
2017-01-25 7:26 ` Kejian Yan
2017-01-25 7:26 ` Kejian Yan
2017-01-25 7:19 ` Yankejian (Hackim Yim) [this message]
2017-01-25 7:19 ` Yankejian (Hackim Yim)
2017-01-25 7:19 ` Yankejian (Hackim Yim)
2017-01-25 16:24 ` David Miller
2017-01-25 16:24 ` David Miller
2017-01-26 3:28 ` Yankejian (Hackim Yim)
2017-01-26 3:28 ` Yankejian (Hackim Yim)
2017-01-26 3:28 ` Yankejian (Hackim Yim)
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=5888517A.1020105@huawei.com \
--to=yankejian@huawei.com \
--cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.