summaryrefslogtreecommitdiffstats
path: root/extras/libmemif/src
diff options
context:
space:
mode:
authorJakub Grajciar <jgrajcia@cisco.com>2021-12-01 09:07:09 +0100
committerBeno�t Ganne <bganne@cisco.com>2021-12-07 18:11:47 +0000
commit8caf9ece87bf22b4326ca3390942e67c775e7529 (patch)
tree33ba1152326b1dbe32347b434109425209f3c365 /extras/libmemif/src
parente46ea1d0c5cffcf721d150df86705145ec633e33 (diff)
libmemif: reset memif buffer flags
Reset memif_buffer_t flags in memif_buffer_alloc and memif_rx_burst Type: fix Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Change-Id: If62ba510fad783afb9f7f58411562b6989fa1573
Diffstat (limited to 'extras/libmemif/src')
-rw-r--r--extras/libmemif/src/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/extras/libmemif/src/main.c b/extras/libmemif/src/main.c
index c1ab3b804b2..397c2bbce0c 100644
--- a/extras/libmemif/src/main.c
+++ b/extras/libmemif/src/main.c
@@ -1563,6 +1563,7 @@ memif_buffer_alloc (memif_conn_handle_t conn, uint16_t qid,
b0->desc_index = mq->next_buf;
ring->desc[mq->next_buf & mask].flags = 0;
+ b0->flags = 0;
/* slave can produce buffer with original length */
dst_left = (c->args.is_master) ? ring->desc[mq->next_buf & mask].length :
@@ -1841,6 +1842,7 @@ memif_rx_burst (memif_conn_handle_t conn, uint16_t qid,
b0->desc_index = cur_slot;
b0->data = memif_get_buffer (c, ring, cur_slot & mask);
b0->len = ring->desc[cur_slot & mask].length;
+ b0->flags = 0;
/* slave resets buffer length */
if (c->args.is_master == 0)
{