• Alexander Duyck's avatar
    i40e: Fix multiple issues with UDP tunnel offload filter configuration · 5305d0fe
    Alexander Duyck authored
    This fixes at least 2 issues I have found with the UDP tunnel filter
    configuration.
    
    The first issue is the fact that the tunnels didn't have any sort of mutual
    exclusion in place to prevent an update from racing with a user request to
    add/remove a port. As such you could request to add and remove a port
    before the port update code had a chance to respond which would result in a
    very confusing result. To address it I have added 2 changes. First I added
    the RTNL mutex wrapper around our updating of the pending, port, and
    filter_index bits. Second I added logic so that we cannot use a port that
    has a pending deletion since we need to free the space in hardware before
    we can allow software to reuse it.
    
    The second issue addressed is the fact that we were not recording the
    actual filter index provided to us by the admin queue. As a result we were
    deleting filters that were not associated with the actual filter we wanted
    to delete. To fix that I added a filter_index member to the UDP port
    tracking structure.
    Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
    Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
    Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
    5305d0fe
i40e_main.c 399 KB