[lkml]   [2008]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[PATCH 1/2] net: Add the CPU id to skb->queue_mapping's upper 8 bits
    From: PJ Waskiewicz <>

    This patch adds the CPU index to the upper 8 bits of the queue_mapping in
    the skb. This will support 256 CPUs and 256 Tx queues. The reason for
    this is the qdisc layer can obscure which CPU is generating a certain flow
    of packets, so network drivers don't have any insight which CPU generated a
    particular packet. If the driver knows which CPU generated the packet,
    then it could adjust Rx filtering in the hardware to redirect the packet
    back to the CPU who owns the process that generated this packet.
    Preventing the cache miss and reschedule of a process to a different CPU is
    a big win in network performance, especially at 10 gigabit speeds.

    Signed-off-by: PJ Waskiewicz <>
    Signed-off-by: Jeff Kirsher <>

    net/sched/sch_prio.c | 1 +
    1 files changed, 1 insertions(+), 0 deletions(-)

    diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c
    index 4aa2b45..84bbd10 100644
    --- a/net/sched/sch_prio.c
    +++ b/net/sched/sch_prio.c
    @@ -86,6 +86,7 @@ prio_enqueue(struct sk_buff *skb, struct Qdisc *sch)

    + skb->queue_mapping |= (get_cpu() << 8);
    if ((ret = qdisc->enqueue(skb, qdisc)) == NET_XMIT_SUCCESS) {
    sch->bstats.bytes += skb->len;

     \ /
      Last update: 2008-06-25 01:29    [W:0.020 / U:63.032 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site