[v1,08/11] net/dpaa: add comments to explain driver behaviour

Message ID 20210927132519.19264-9-nipun.gupta@nxp.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series NXP DPAAx Bus and PMD changes |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Nipun Gupta Sept. 27, 2021, 1:25 p.m. UTC
  From: Rohit Raj <rohit.raj@nxp.com>

This patch adds comment to explain how dpaa_port_fmc_ccnode_parse
function is working to get the HW queue from FMC policy file

Signed-off-by: Rohit Raj <rohit.raj@nxp.com>
---
 drivers/net/dpaa/dpaa_fmc.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
  

Patch

diff --git a/drivers/net/dpaa/dpaa_fmc.c b/drivers/net/dpaa/dpaa_fmc.c
index 5195053361..f8c9360311 100644
--- a/drivers/net/dpaa/dpaa_fmc.c
+++ b/drivers/net/dpaa/dpaa_fmc.c
@@ -1,5 +1,5 @@ 
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright 2017-2020 NXP
+ * Copyright 2017-2021 NXP
  */
 
 /* System headers */
@@ -338,6 +338,12 @@  static int dpaa_port_fmc_ccnode_parse(struct fman_if *fif,
 		fqid = keys_params->key_params[j].cc_next_engine_params
 			.params.enqueue_params.new_fqid;
 
+		/* We read DPDK queue from last classification rule present in
+		 * FMC policy file. Hence, this check is required here.
+		 * Also, the last classification rule in FMC policy file must
+		 * have userspace queue so that it can be used by DPDK
+		 * application.
+		 */
 		if (keys_params->key_params[j].cc_next_engine_params
 			.next_engine != e_IOC_FM_PCD_DONE) {
 			DPAA_PMD_WARN("FMC CC next engine not support");