• Thomas Petazzoni's avatar
    net: mvpp2: introduce per-port nrxqs/ntxqs variables · 09f83975
    Thomas Petazzoni authored
    Currently, the global variables rxq_number and txq_number hold the
    number of per-port TXQs and RXQs. Until now, such numbers were
    constant regardless of the driver configuration. As we are going to
    introduce different modes for TX and RX queues, these numbers will
    depend on the configuration (PPv2.1 vs. PPv2.2, exact queue
    distribution logic).
    
    Therefore, as a preparation, we move the number of RXQs and TXQs in
    the 'struct mvpp2_port' structure, next to the RXQs and TXQs
    descriptor arrays.
    
    For now, they remain initialized to the same default values as
    rxq_number/txq_number used to be initialized, but this will change in
    future commits.
    
    The only non-mechanical change in this patch is that the check to
    verify hardware constraints on the number of RXQs and TXQs is moved
    from mvpp2_probe() to mvpp2_port_probe(), since it's now in
    mvpp2_port_probe() that we initialize the per-port count of RXQ and
    TXQ.
    Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    09f83975
mvpp2.c 194 KB