MCPcopy Create free account
hub / github.com/F-Stack/f-stack / dpaa_display_frame_info

Function dpaa_display_frame_info

dpdk/drivers/net/dpaa/dpaa_rxtx.c:63–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61#ifdef RTE_LIBRTE_DPAA_DEBUG_DRIVER
62#define DISPLAY_PRINT printf
63static void dpaa_display_frame_info(const struct qm_fd *fd,
64 uint32_t fqid, bool rx)
65{
66 int ii;
67 char *ptr;
68 struct annotations_t *annot = rte_dpaa_mem_ptov(fd->addr);
69 uint8_t format;
70
71 if (!fd->status) {
72 /* Do not display correct packets.*/
73 return;
74 }
75
76 format = (fd->opaque & DPAA_FD_FORMAT_MASK) >>
77 DPAA_FD_FORMAT_SHIFT;
78
79 DISPLAY_PRINT("fqid %d bpid %d addr 0x%lx, format %d\r\n",
80 fqid, fd->bpid, (unsigned long)fd->addr, fd->format);
81 DISPLAY_PRINT("off %d, len %d stat 0x%x\r\n",
82 fd->offset, fd->length20, fd->status);
83 if (rx) {
84 ptr = (char *)&annot->parse;
85 DISPLAY_PRINT("RX parser result:\r\n");
86 for (ii = 0; ii < (int)sizeof(struct dpaa_eth_parse_results_t);
87 ii++) {
88 DISPLAY_PRINT("%02x ", ptr[ii]);
89 if (((ii + 1) % 16) == 0)
90 DISPLAY_PRINT("\n");
91 }
92 DISPLAY_PRINT("\n");
93 }
94
95 if (unlikely(format == qm_fd_sg)) {
96 /*TBD:S/G display: to be implemented*/
97 return;
98 }
99
100 DISPLAY_PRINT("Frame payload:\r\n");
101 ptr = (char *)annot;
102 ptr += fd->offset;
103 for (ii = 0; ii < fd->length20; ii++) {
104 DISPLAY_PRINT("%02x ", ptr[ii]);
105 if (((ii + 1) % 16) == 0)
106 printf("\n");
107 }
108 DISPLAY_PRINT("\n");
109}
110#else
111#define dpaa_display_frame_info(a, b, c)
112#endif

Callers 4

dpaa_rx_cb_no_prefetchFunction · 0.85
dpaa_rx_cbFunction · 0.85
dpaa_eth_err_queueFunction · 0.85
dpaa_eth_queue_rxFunction · 0.85

Calls 2

rte_dpaa_mem_ptovFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected