• Michael Chan's avatar
    bnxt_en: Put the TX producer information in the TX BD opaque field · 34eec1f2
    Michael Chan authored
    Currently, the opaque field in the TX BD is only used for debugging.
    The TX completion logic relies on getting one TX completion for each
    packet and they always complete in order.
    
    Improve this scheme by putting the producer information (ring index plus
    number of BDs for the packet) in the opaque field.  This way, we can
    handle TX completion processing by looking at the last TX completion
    instead of counting the number of completions.
    
    Since we no longer need to count the exact number of completions, we can
    optimize xmit_more by disabling TX completion when the xmit_more
    condition is true.  This will be done in later patches.
    
    This patch is only initializing the opaque field in the TX BD and is
    not changing the driver's TX completion logic yet.
    Reviewed-by: default avatarAndy Gospodarek <gospo@broadcom.com>
    Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    34eec1f2
bnxt_xdp.c 12.4 KB