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

Function test_get_ipv4_opt

dpdk/app/test/test_ipfrag.c:130–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130static inline void
131test_get_ipv4_opt(bool is_first_frag, bool opt_copied,
132 struct test_opt_data *expected_opt)
133{
134 if (is_first_frag) {
135 if (opt_copied) {
136 expected_opt->len =
137 sizeof(expected_first_frag_ipv4_opts_copied);
138 memcpy(expected_opt->data,
139 expected_first_frag_ipv4_opts_copied,
140 sizeof(expected_first_frag_ipv4_opts_copied));
141 } else {
142 expected_opt->len =
143 sizeof(expected_first_frag_ipv4_opts_nocopied);
144 memcpy(expected_opt->data,
145 expected_first_frag_ipv4_opts_nocopied,
146 sizeof(expected_first_frag_ipv4_opts_nocopied));
147 }
148 } else {
149 if (opt_copied) {
150 expected_opt->len =
151 sizeof(expected_sub_frag_ipv4_opts_copied);
152 memcpy(expected_opt->data,
153 expected_sub_frag_ipv4_opts_copied,
154 sizeof(expected_sub_frag_ipv4_opts_copied));
155 } else {
156 expected_opt->len =
157 sizeof(expected_sub_frag_ipv4_opts_nocopied);
158 memcpy(expected_opt->data,
159 expected_sub_frag_ipv4_opts_nocopied,
160 sizeof(expected_sub_frag_ipv4_opts_nocopied));
161 }
162 }
163}
164
165static void
166v4_allocate_packet_of(struct rte_mbuf *b, int fill, size_t s,

Callers 2

v4_allocate_packet_ofFunction · 0.85
test_ip_fragFunction · 0.85

Calls 1

memcpyFunction · 0.50

Tested by

no test coverage detected