This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

66AK2E02: SA does not work when cppi flows threshold is enable

Part Number: 66AK2E02

hi,

i am working on k2e device's PA and SA with pdk_k2e_4_0_4.

SA and PA are working correctly when i using Cppi flow with threshold disable. However, when I initialize the Cppi flow by enabling the packet size threshold, the PA is working properly, but the SA is not running. Does SA not work when Cppi threshold is open? or am I doing something wrong?

Here is a code that shows how i initialize cppi flows: 

const Uint32	pass_flow_id_to_fbq_mapping[] = {
		FBQ_PACKET_DATA
};

enum {
	PASS_CPDMA_DEFAULT_FLOW_ID
};

Int32 setup_rx_queue(Qmss_Queue *rxQInfo)
{
	extern Qmss_QueueHnd gRxQHnd;
	gRxQHnd = PA_MATCH_QUEUE;
	*rxQInfo = Qmss_getQueueNumber (PA_MATCH_QUEUE);
	return (0);
}

Int32 setup_rx (void)
{
	Qmss_Queue                  rxFreeQInfo, rxQInfo;
	Cppi_RxFlowCfg              rxFlowCfg;
	uint32_t					i, num_of_allocated, j;

	setup_rx_queue(&rxQInfo);

	/* Initialize the flow configuration */
	memset (&rxFlowCfg, 0, sizeof(Cppi_RxFlowCfg));
	rxFreeQInfo = Qmss_getQueueNumber (pass_flow_id_to_fbq_mapping[j]);

	/* Let CPPI pick the next available flow */
	rxFlowCfg.flowIdNum             =   PASS_CPDMA_DEFAULT_FLOW_ID;

	rxFlowCfg.rx_dest_qmgr          =   rxQInfo.qMgr;
	rxFlowCfg.rx_dest_qnum          =   rxQInfo.qNum;
	rxFlowCfg.rx_desc_type          =   Cppi_DescType_MONOLITHIC;

	rxFlowCfg.rx_sop_offset         =   PACKET_DATA_BUFFER_DATA_START_OFFSET;

	rxFlowCfg.rx_ps_location        =   Cppi_PSLoc_PS_IN_DESC;
	rxFlowCfg.rx_psinfo_present     =   1;    /* Enable PS info */

	rxFlowCfg.rx_error_handling     =   0;    /* Drop the packet, do not retry on starvation by default */
	rxFlowCfg.rx_einfo_present      =   1;    /* EPIB info present */

	rxFlowCfg.rx_dest_tag_lo_sel    =   1;    /* Disable tagging */
	rxFlowCfg.rx_dest_tag_hi_sel    =   1;
	rxFlowCfg.rx_src_tag_lo_sel     =   0;
	rxFlowCfg.rx_src_tag_hi_sel     =   0;

	rxFlowCfg.rx_dest_tag_lo		=	0;
	rxFlowCfg.rx_dest_tag_hi		=	0;

	rxFlowCfg.rx_size_thresh0_en    =   1;
	rxFlowCfg.rx_size_thresh1_en    =   0;
	rxFlowCfg.rx_size_thresh2_en    =   0;
	rxFlowCfg.rx_size_thresh0       =   3456;
	rxFlowCfg.rx_size_thresh1       =   0x0;
	rxFlowCfg.rx_size_thresh2       =   0x0;

	rxFlowCfg.rx_fdq0_sz0_qmgr      =   rxFreeQInfo.qMgr; /* Setup the Receive free queue for the flow */
	rxFlowCfg.rx_fdq0_sz0_qnum      =   rxFreeQInfo.qNum;
	rxFlowCfg.rx_fdq0_sz1_qmgr      =   0x0;
	rxFlowCfg.rx_fdq0_sz1_qnum      =   0x0;
	rxFlowCfg.rx_fdq0_sz2_qmgr      =   0x0;
	rxFlowCfg.rx_fdq0_sz2_qnum      =   0x0;
	rxFlowCfg.rx_fdq0_sz3_qmgr      =   0x0;
	rxFlowCfg.rx_fdq0_sz3_qnum      =   0x0;

	rxFlowCfg.rx_fdq1_qnum          =   rxFreeQInfo.qNum;  /* Use the Rx Queue to pick descriptors */
	rxFlowCfg.rx_fdq1_qmgr          =   rxFreeQInfo.qMgr;
	rxFlowCfg.rx_fdq2_qnum          =   rxFreeQInfo.qNum;  /* Use the Rx Queue to pick descriptors */
	rxFlowCfg.rx_fdq2_qmgr          =   rxFreeQInfo.qMgr;
	rxFlowCfg.rx_fdq3_qnum          =   rxFreeQInfo.qNum;  /* Use the Rx Queue to pick descriptors */
	rxFlowCfg.rx_fdq3_qmgr          =   rxFreeQInfo.qMgr;

	/* Configure the Rx flow */
	if ((gRxFlowHnd[j] = Cppi_configureRxFlow (gCpdmaHnd, &rxFlowCfg, &num_of_allocated)) == NULL)
	 {
		SEVERE_ERROR;
	 }
	
	return FALSE;
}