• Vladimir Oltean's avatar
    net: enetc: don't overwrite the RSS indirection table when initializing · c646d10d
    Vladimir Oltean authored
    After the blamed patch, all RX traffic gets hashed to CPU 0 because the
    hashing indirection table set up in:
    
    enetc_pf_probe
    -> enetc_alloc_si_resources
       -> enetc_configure_si
          -> enetc_setup_default_rss_table
    
    is overwritten later in:
    
    enetc_pf_probe
    -> enetc_init_port_rss_memory
    
    which zero-initializes the entire port RSS table in order to avoid ECC errors.
    
    The trouble really is that enetc_init_port_rss_memory really neads
    enetc_alloc_si_resources to be called, because it depends upon
    enetc_alloc_cbdr and enetc_setup_cbdr. But that whole enetc_configure_si
    thing could have been better thought out, it has nothing to do in a
    function called "alloc_si_resources", especially since its counterpart,
    "free_si_resources", does nothing to unwind the configuration of the SI.
    
    The point is, we need to pull out enetc_configure_si out of
    enetc_alloc_resources, and move it after enetc_init_port_rss_memory.
    This allows us to set up the default RSS indirection table after
    initializing the memory.
    
    Fixes: 07bf34a5 ("net: enetc: initialize the RFS and RSS memories")
    Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>
    Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    c646d10d
enetc.c 44.7 KB