• Rahul Lakkireddy's avatar
    cxgb4: fix endian conversions for L4 ports in filters · 63b53b0b
    Rahul Lakkireddy authored
    The source and destination L4 ports in filter offload need to be
    in CPU endian. They will finally be converted to Big Endian after
    all operations are done and before giving them to hardware. The
    L4 ports for NAT are expected to be passed as a byte stream TCB.
    So, treat them as such.
    
    Fixes following sparse warnings in several places:
    cxgb4_tc_flower.c:159:33: warning: cast from restricted __be16
    cxgb4_tc_flower.c:159:33: warning: incorrect type in argument 1 (different
    base types)
    cxgb4_tc_flower.c:159:33:    expected unsigned short [usertype] val
    cxgb4_tc_flower.c:159:33:    got restricted __be16 [usertype] dst
    
    Fixes: dca4faeb ("cxgb4: Add LE hash collision bug fix path in LLD driver")
    Fixes: 62488e4b ("cxgb4: add basic tc flower offload support")
    Fixes: 557ccbf9 ("cxgb4: add tc flower support for L3/L4 rewrite")
    Signed-off-by: default avatarRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    63b53b0b
cxgb4_tc_flower.c 24.2 KB