Skip to content
  • Eli Britstein's avatar
    97417f61
    net/mlx5e: Fix GRE key by controlling port tunnel entropy calculation · 97417f61
    Eli Britstein authored
    
    
    Flow entropy is calculated on the inner packet headers and used for
    flow distribution in processing, routing etc. For GRE-type
    encapsulations the entropy value is placed in the eight LSB of the key
    field in the GRE header as defined in NVGRE RFC 7637. For UDP based
    encapsulations the entropy value is placed in the source port of the
    UDP header.
    The hardware may support entropy calculation specifically for GRE and
    for all tunneling protocols. With commit df2ef3bf ("net/mlx5e: Add
    GRE protocol offloading") GRE is offloaded, but the hardware is
    configured by default to calculate flow entropy so packets transmitted
    on the wire have a wrong key. To support UDP based tunnels (i.e VXLAN),
    GRE (i.e. no flow entropy) and NVGRE (i.e. with flow entropy) the
    hardware behaviour must be controlled by the driver.
    
    Ensure port entropy calculation is enabled for offloaded VXLAN tunnels
    and disable port entropy calculation in the presence of offloaded GRE
    tunnels by monitoring the presence of entropy enabling tunnels (i.e
    VXLAN) and entropy disabing tunnels (i.e GRE).
    
    Fixes: df2ef3bf ("net/mlx5e: Add GRE protocol offloading")
    Signed-off-by: default avatarEli Britstein <elibr@mellanox.com>
    Reviewed-by: default avatarOz Shlomo <ozsh@mellanox.com>
    Reviewed-by: default avatarRoi Dayan <roid@mellanox.com>
    Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
    97417f61
    net/mlx5e: Fix GRE key by controlling port tunnel entropy calculation
    Eli Britstein authored
    
    
    Flow entropy is calculated on the inner packet headers and used for
    flow distribution in processing, routing etc. For GRE-type
    encapsulations the entropy value is placed in the eight LSB of the key
    field in the GRE header as defined in NVGRE RFC 7637. For UDP based
    encapsulations the entropy value is placed in the source port of the
    UDP header.
    The hardware may support entropy calculation specifically for GRE and
    for all tunneling protocols. With commit df2ef3bf ("net/mlx5e: Add
    GRE protocol offloading") GRE is offloaded, but the hardware is
    configured by default to calculate flow entropy so packets transmitted
    on the wire have a wrong key. To support UDP based tunnels (i.e VXLAN),
    GRE (i.e. no flow entropy) and NVGRE (i.e. with flow entropy) the
    hardware behaviour must be controlled by the driver.
    
    Ensure port entropy calculation is enabled for offloaded VXLAN tunnels
    and disable port entropy calculation in the presence of offloaded GRE
    tunnels by monitoring the presence of entropy enabling tunnels (i.e
    VXLAN) and entropy disabing tunnels (i.e GRE).
    
    Fixes: df2ef3bf ("net/mlx5e: Add GRE protocol offloading")
    Signed-off-by: default avatarEli Britstein <elibr@mellanox.com>
    Reviewed-by: default avatarOz Shlomo <ozsh@mellanox.com>
    Reviewed-by: default avatarRoi Dayan <roid@mellanox.com>
    Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
Loading