• Michael Chan's avatar
    bnxt_en: Fix UDP tunnel logic · 7ae9dc35
    Michael Chan authored
    The current logic assumes that when the driver sends the message to the
    firmware to add the VXLAN or Geneve port, the firmware will never fail
    the operation.  The UDP ports are always stored and are used to check
    the tunnel packets in .ndo_features_check().  These tunnnel packets
    will fail to offload on the transmit side if firmware fails the call to
    add the UDP ports.
    
    To fix the problem, bp->vxlan_port and bp->nge_port will only be set to
    the offloaded ports when the HWRM_TUNNEL_DST_PORT_ALLOC firmware call
    succeeds.  When deleting a UDP port, we check that the port was
    previously added successfuly first by checking the FW ID.
    
    Fixes: 1698d600 ("bnxt_en: Implement .ndo_features_check().")
    Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    7ae9dc35
bnxt.c 351 KB