• Simon Horman's avatar
    octeontx2-pf: Make iplen __be16 in otx2_sqe_add_ext() · 7baa90c6
    Simon Horman authored
    In otx2_sqe_add_ext() iplen is used to hold a 16-bit big-endian value,
    but it's type is u16, indicating a host byte order integer.
    
    Address this mismatch by changing the type of iplen to __be16.
    
    Flagged by Sparse as:
    
    .../otx2_txrx.c:699:31: warning: incorrect type in assignment (different base types)
    .../otx2_txrx.c:699:31:    expected unsigned short [usertype] iplen
    .../otx2_txrx.c:699:31:    got restricted __be16 [usertype]
    .../otx2_txrx.c:701:54: warning: incorrect type in assignment (different base types)
    .../otx2_txrx.c:701:54:    expected restricted __be16 [usertype] tot_len
    .../otx2_txrx.c:701:54:    got unsigned short [usertype] iplen
    .../otx2_txrx.c:704:60: warning: incorrect type in assignment (different base types)
    .../otx2_txrx.c:704:60:    expected restricted __be16 [usertype] payload_len
    .../otx2_txrx.c:704:60:    got unsigned short [usertype] iplen
    
    Introduced in
    commit dc1a9bf2 ("octeontx2-pf: Add UDP segmentation offload support")
    
    No functional change intended.
    Compile tested only by author.
    Tested-by: default avatarGeetha sowjanya <gakula@marvell.com>
    Signed-off-by: default avatarSimon Horman <horms@kernel.org>
    Link: https://patch.msgid.link/20240904-octeontx2-sparse-v2-2-14f2305fe4b2@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    7baa90c6
otx2_txrx.c 37.3 KB