From: Jakub Kicinski <kuba@kernel.org>
To: Huazhong Tan <tanhuazhong@huawei.com>
Cc: <davem@davemloft.net>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <salil.mehta@huawei.com>,
<yisen.zhuang@huawei.com>, <linuxarm@huawei.com>,
<huangdaode@huawei.com>, Jian Shen <shenjian15@huawei.com>
Subject: Re: [PATCH net-next 2/3] net: hns3: add priv flags support to switch limit promisc mode
Date: Fri, 4 Dec 2020 18:24:11 -0800 [thread overview]
Message-ID: <20201204182411.1d2d73f3@kicinski-fedora-pc1c0hjn.DHCP.thefacebook.com> (raw)
In-Reply-To: <1606997936-22166-3-git-send-email-tanhuazhong@huawei.com>
On Thu, 3 Dec 2020 20:18:55 +0800 Huazhong Tan wrote:
> @@ -224,6 +224,7 @@ static int hclge_map_unmap_ring_to_vf_vector(struct hclge_vport *vport, bool en,
> static int hclge_set_vf_promisc_mode(struct hclge_vport *vport,
> struct hclge_mbx_vf_to_pf_cmd *req)
> {
> + struct hnae3_handle *handle = &vport->nic;
> bool en_bc = req->msg.en_bc ? true : false;
> bool en_uc = req->msg.en_uc ? true : false;
> bool en_mc = req->msg.en_mc ? true : false;
Please order variable lines longest to shortest.
> @@ -1154,6 +1158,8 @@ static int hclgevf_cmd_set_promisc_mode(struct hclgevf_dev *hdev,
> send_msg.en_bc = en_bc_pmc ? 1 : 0;
> send_msg.en_uc = en_uc_pmc ? 1 : 0;
> send_msg.en_mc = en_mc_pmc ? 1 : 0;
> + send_msg.en_limit_promisc =
> + test_bit(HNAE3_PFLAG_LIMIT_PROMISC_ENABLE, &handle->priv_flags) ? 1 : 0;
The continuation line should be indented more than the first line.
I suggest you rename HNAE3_PFLAG_LIMIT_PROMISC_ENABLE to
HNAE3_PFLAG_LIMIT_PROMISC, the _ENABLE doesn't add much
to the meaning. That way the lines will get shorter.
next prev parent reply other threads:[~2020-12-05 2:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-03 12:18 [PATCH net-next 0/3] net: hns3: updates for -next Huazhong Tan
2020-12-03 12:18 ` [PATCH net-next 1/3] net: hns3: add support for extended promiscuous command Huazhong Tan
2020-12-03 12:18 ` [PATCH net-next 2/3] net: hns3: add priv flags support to switch limit promisc mode Huazhong Tan
2020-12-05 2:24 ` Jakub Kicinski [this message]
2020-12-06 1:46 ` tanhuazhong
2020-12-03 12:18 ` [PATCH net-next 3/3] net: hns3: refine the VLAN tag handle for port based VLAN Huazhong Tan
2020-12-05 2:22 ` Jakub Kicinski
2020-12-06 1:55 ` tanhuazhong
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=20201204182411.1d2d73f3@kicinski-fedora-pc1c0hjn.DHCP.thefacebook.com \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=huangdaode@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=salil.mehta@huawei.com \
--cc=shenjian15@huawei.com \
--cc=tanhuazhong@huawei.com \
--cc=yisen.zhuang@huawei.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).