Blob Blame History Raw
From 243332dfaa6ba856f81c8264a3d861fe7a05eb66 Mon Sep 17 00:00:00 2001
From: Manish Rangankar <manish.rangankar@cavium.com>
Date: Tue, 20 Nov 2018 00:11:16 -0500
Subject: [PATCH] qedi: Set buf_size in case of ICMP and ARP packet.

Invalid ether len was resulting into showing CRC error on wire.

Signed-off-by: Manish Rangankar <manish.rangankar@cavium.com>
---
 iscsiuio/src/unix/nic.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/iscsiuio/src/unix/nic.c b/iscsiuio/src/unix/nic.c
index 29c4332a3162..bd415c2446bc 100644
--- a/iscsiuio/src/unix/nic.c
+++ b/iscsiuio/src/unix/nic.c
@@ -1122,6 +1122,7 @@ nic_iface_present:
 			 * network, the global variable uip_len is
 			 * set to a value > 0. */
 			if (ustack->uip_len > 0) {
+				pkt->buf_size = ustack->uip_len;
 				prepare_ipv4_packet(nic, nic_iface,
 						    ustack, pkt);
 
@@ -1139,6 +1140,7 @@ nic_iface_present:
 			 * network, the global variable uip_len
 			 * is set to a value > 0. */
 			if (pkt->buf_size > 0) {
+				pkt->buf_size = ustack->uip_len;
 				LOG_DEBUG(PFX "%s: write called after arp_arpin, bufsize=%d",
 					   nic->log_name, pkt->buf_size);
 				(*nic->ops->write) (nic, nic_iface, pkt);
-- 
2.17.2