Thread (8 messages) flat view 8 messages, 2 authors, 2020-12-06

Re: [PATCH net-next 2/3] net: hns3: add priv flags support to switch limit promisc mode

From: Jakub Kicinski <kuba@kernel.org>
Date: 2020-12-05 02:25:09
Also in: lkml

On Thu, 3 Dec 2020 20:18:55 +0800 Huazhong Tan wrote:
quoted hunk ↗ jump to hunk
@@ -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.
quoted hunk ↗ jump to hunk
@@ -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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help