samples: net: zperf: Ignore error when creating TCP sample pkt
When sending TCP sample packet, just fill the packet to max and
ignore any overflow error.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
diff --git a/samples/net/zperf/src/zperf_tcp_uploader.c b/samples/net/zperf/src/zperf_tcp_uploader.c
index 25e1bf0..092395d 100644
--- a/samples/net/zperf/src/zperf_tcp_uploader.c
+++ b/samples/net/zperf/src/zperf_tcp_uploader.c
@@ -49,7 +49,6 @@
struct net_pkt *pkt;
struct net_buf *frag;
u32_t loop_time;
- bool st;
/* Timestamps */
loop_time = k_cycle_get_32();
@@ -71,15 +70,8 @@
net_pkt_frag_add(pkt, frag);
/* Fill in the TCP payload */
- st = net_pkt_append_all(pkt, sizeof(sample_packet),
- sample_packet, K_FOREVER);
- if (!st) {
- printk(TAG "ERROR! Failed to fill packet\n");
-
- net_pkt_unref(pkt);
- nb_errors++;
- break;
- }
+ net_pkt_append(pkt, sizeof(sample_packet),
+ sample_packet, K_FOREVER);
/* Send the packet */
ret = net_context_send(pkt, NULL, K_NO_WAIT, NULL, NULL);