[v1,1/1] net/hinic: solve lgtm errors reporting

Message ID 1563249568-35436-1-git-send-email-xuanziyang2@huawei.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series [v1,1/1] net/hinic: solve lgtm errors reporting |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/intel-Performance-Testing success Performance Testing PASS

Commit Message

Ziyang Xuan July 16, 2019, 3:59 a.m. UTC
  There are some implicit downcast errors in TX offload
information parsing. This patch is to solve these errors.

Signed-off-by: Ziyang Xuan <xuanziyang2@huawei.com>
---
 drivers/net/hinic/hinic_pmd_tx.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
  

Comments

Ferruh Yigit July 16, 2019, 2:19 p.m. UTC | #1
On 7/16/2019 4:59 AM, Ziyang Xuan wrote:
> There are some implicit downcast errors in TX offload
> information parsing. This patch is to solve these errors.
> 
> Signed-off-by: Ziyang Xuan <xuanziyang2@huawei.com>

Fixes: 64727024d2fd ("net/hinic: add device initialization")


Applied to dpdk-next-net/master, thanks.
  

Patch

diff --git a/drivers/net/hinic/hinic_pmd_tx.h b/drivers/net/hinic/hinic_pmd_tx.h
index 8b361cf..8a3df27 100644
--- a/drivers/net/hinic/hinic_pmd_tx.h
+++ b/drivers/net/hinic/hinic_pmd_tx.h
@@ -29,19 +29,20 @@  enum sq_wqe_type {
 struct hinic_tx_offload_info {
 	u8 outer_l2_len;
 	u8 outer_l3_type;
-	u8 outer_l3_len;
+	u16 outer_l3_len;
 
 	u8 inner_l2_len;
 	u8 inner_l3_type;
-	u8 inner_l3_len;
+	u16 inner_l3_len;
 
 	u8 tunnel_length;
 	u8 tunnel_type;
 	u8 inner_l4_type;
 	u8 inner_l4_len;
 
-	u8 payload_offset;
+	u16 payload_offset;
 	u8 inner_l4_tcp_udp;
+	u8 rsvd0;
 };
 
 /* tx sge info */