lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 4 Dec 2020 18:24:11 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Huazhong Tan <tanhuazhong@...wei.com>
Cc:     <davem@...emloft.net>, <netdev@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <salil.mehta@...wei.com>,
        <yisen.zhuang@...wei.com>, <linuxarm@...wei.com>,
        <huangdaode@...wei.com>, Jian Shen <shenjian15@...wei.com>
Subject: Re: [PATCH net-next 2/3] net: hns3: add priv flags support to
 switch limit promisc mode

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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ