| 1836 | } |
| 1837 | |
| 1838 | static int |
| 1839 | pdcp_status_report_verify(struct rte_mbuf *status_report, |
| 1840 | const struct rte_pdcp_up_ctrl_pdu_hdr *expected_hdr, uint32_t expected_len) |
| 1841 | { |
| 1842 | uint32_t received_len = rte_pktmbuf_pkt_len(status_report); |
| 1843 | uint8_t *received_buf = testsuite_params.ctrl_pdu_buf; |
| 1844 | int ret; |
| 1845 | |
| 1846 | ret = pktmbuf_read_into(status_report, received_buf, RTE_PDCP_CTRL_PDU_SIZE_MAX); |
| 1847 | TEST_ASSERT_SUCCESS(ret, "Failed to copy status report pkt into continuous buffer"); |
| 1848 | |
| 1849 | debug_hexdump(stdout, "Received:", received_buf, received_len); |
| 1850 | debug_hexdump(stdout, "Expected:", expected_hdr, expected_len); |
| 1851 | |
| 1852 | TEST_ASSERT_EQUAL(expected_len, received_len, |
| 1853 | "Mismatch in packet lengths [expected: %d, received: %d]", |
| 1854 | expected_len, received_len); |
| 1855 | |
| 1856 | TEST_ASSERT_BUFFERS_ARE_EQUAL(received_buf, expected_hdr, expected_len, |
| 1857 | "Generated packet not as expected"); |
| 1858 | |
| 1859 | return 0; |
| 1860 | } |
| 1861 | |
| 1862 | static int |
| 1863 | test_status_report_gen(const struct pdcp_test_conf *ul_conf, |
no test coverage detected