How to disable the checksum checking in dpaa drivers in dpdk?
I tried the solution mentioned in this thread
https://community.nxp.com/t5/Layerscape/udp-checksum-on-rx-packet-of-dpdk/m-p/1262638#M7826
but its not working also dpaa_ethdev.c code is different.
I am using dpdk 20 present in LSDK and have attached the dpaa_ethdev.c file.
Kindly help
Please add function fman_if_receive_rx_errors definition in drivers/bus/dpaa/base/fman/fman_hw.c.
void
fman_if_receive_rx_errors(struct fman_if *fm_if,
unsigned int err_eq)
{
struct __fman_if *__if = container_of(fm_if, struct __fman_if, __if);
unsigned int *fmbm_rcfg, *fmbm_rfsdm, *fmbm_rfsem;
unsigned int val;
fmbm_rcfg = &((struct rx_bmi_regs *)__if->bmi_map)->fmbm_rcfg;
fmbm_rfsdm = &((struct rx_bmi_regs *)__if->bmi_map)->fmbm_rfsdm;
fmbm_rfsem = &((struct rx_bmi_regs *)__if->bmi_map)->fmbm_rfsem;
val = in_be32(fmbm_rcfg);
out_be32(fmbm_rcfg, val | BMI_PORT_CFG_FDOVR);
out_be32(fmbm_rfsdm, 0);
out_be32(fmbm_rfsem, err_eq);
}
Please add function fman_if_receive_rx_errors declaratin in drivers/bus/dpaa/include/fsl_fman.h.
void fman_if_receive_rx_errors(struct fman_if *fm_if,
unsigned int err_eq);
In file drivers/net/dpaa/dpaa_ethdev.c, please modify fman_if_discard_rx_errors(fman_intf) to
fman_if_receive_rx_errors(fman_intf, FM_FD_RX_STATUS_ERR_MASK).
if (!fman_intf->is_shared_mac) {
/* Disable RX mode */
fman_if_discard_rx_errors(fman_intf);=>fman_if_receive_rx_errors(fman_intf, FM_FD_RX_STATUS_ERR_MASK).
fman_if_disable_rx(fman_intf);
/* Disable promiscuous mode */
I tried the above code . it is giving me following error
/dpdk/drivers/bus/dpaa/base/fman/fman_hw.c: In function 'fman_if_recei ve_rx_errors':
/dpdk/drivers/bus/dpaa/base/fman/fman_hw.c:626:27: error: 'BMI_PORT_CF G_FDOVR' undeclared (first use in this function)
out_be32(fmbm_rcfg, val | BMI_PORT_CFG_FDOVR);
Kindly help
Please add the following definition in dpdk/drivers/bus/dpaa/include/fman.h.
#define BMI_PORT_CFG_FDOVR 0x02000000
After that this error
home/user/dpdk/drivers/net/dpaa/dpaa_ethdev.c: In function 'dpaa_dev_init':
/home/user/dpdk/drivers/net/dpaa/dpaa_ethdev.c:1816:40: error: 'FM_FD_RX_STATUS_ERR_MASK' undeclared (first use in this function); did you mean 'QM_MCR_NP_STATE_MASK'?
fman_if_receive_rx_errors(fman_intf, FM_FD_RX_STATUS_ERR_MASK);
Please refer to the attached file in dpdk/drivers/net/dpaa/fmlib/fm_ext.h.
#define FM_FD_RX_STATUS_ERR_MASK (FM_FD_ERR_UNSUPPORTED_FORMAT | \
FM_FD_ERR_LENGTH | \
FM_FD_ERR_DMA | \
FM_FD_ERR_IPR | \
FM_FD_ERR_IPR_TO | \
FM_FD_ERR_IPR_NCSP | \
FM_FD_ERR_PHYSICAL | \
FM_FD_ERR_SIZE | \
FM_FD_ERR_CLS_DISCARD | \
FM_FD_ERR_COLOR_RED | \
FM_FD_ERR_COLOR_YELLOW | \
FM_FD_ERR_ILL_PLCR | \
FM_FD_ERR_PLCR_FRAME_LEN | \
FM_FD_ERR_EXTRACTION | \
FM_FD_ERR_NO_SCHEME | \
FM_FD_ERR_KEYSIZE_OVERFLOW | \
FM_FD_ERR_PRS_TIMEOUT | \
FM_FD_ERR_PRS_ILL_INSTRUCT | \
FM_FD_ERR_PRS_HDR_ERR | \
FM_FD_ERR_BLOCK_LIMIT_EXCEEDED) /**< RX Error FD bits */
I am still not receiving packet at application layer.
I am encrypting data below L3 layer , Hence both udp length and checkum are encrypted.
Is the driver dropping because of checksum or length??
When running l3fwd with vPMD, there is one thing to note.
In the configuration, ensure that DEV_RX_OFFLOAD_CHECKSUM in port_conf.rxmode.offloads is NOT set.
Otherwise, by default, RX vPMD is disabled.
I am using l2fwd-crypto application with encryption of IP payload. when i enable dpaa log , it prints the following msg,
how to disable it??
Please refer to the following in dpdk source code.
doc/guides/nics/dpaa.rst
doc/guides/platform/dpaa.rst