Avoiding re-ordering in netif_rx()

From: Tomar, Nagendra (nagendra_tomar_at_adaptec.com)
Date: 07/31/03

  • Next message: Miles Bader: "Re: Kernel 2.6 size increase"
    To: linux-net@vger.kernel.org
    Date:	Thu, 31 Jul 2003 10:11:56 +0530
    
    

    I am modifying linux kernel 2.4.18 to add support for our TCP offload
    card. The problem is:
    The packets that I get from the card are fully TCP processed and
    in-order.
    Now I feed these packets to netif_rx(). marking a flag in the skbuff
    which
    says that the full TCP/IP processing is done on this packet and the
    higher
    layers can just bypass the packet protocol processing. On an SMP m/c
    different consequtive in-order packets received from the card can be
    queued to different per-cpu queues and it might so happen that the later

    received packet is added to the socket receive queue first ( bcos the
    softirq on the later CPU got a chance to execute first). This
    maliciously
    reorders the data.

    My question is, what is an elegant way of avoiding this. I have a couple

    of choices, but I want to know what people think. f.e one way is to
    queue
    these packets to a single queue and not a per-cpu queue. In this case
    order will be honoured.

    brilliant suggestions are very welcome !!

    Thanx
    tomar

    -
    To unsubscribe from this list: send the line "unsubscribe linux-net" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Miles Bader: "Re: Kernel 2.6 size increase"

    Relevant Pages

    • Re: Possible bug in .Net 2.0 udp sockets?
      ... You won't miss any UDP packets with a buffer that large! ... R> I called BeginReceiveFrom() several times on purpose, ... If you don't do that, indeed, UDP stack can drop packets. ... it stores it in the queue. ...
      (microsoft.public.dotnet.framework)
    • Re: Performance Intel Pro 1000 MT (PWLA8490MT)
      ... driver changed to not use the braindamaged sk interrupt moderation. ... with small 50-60 byte UDP packets. ... when the tx queue fills up, the application should stop sending, at ... For transmission, with non-broken hardware and software, ...
      (freebsd-performance)
    • Re: [PATCH] 3/3 maple: update bus driver to support Dreamcast VMU
      ... Removes unneeded locking of queue of processed packets while properly ... Under what conditions will this lock be ...
      (Linux-Kernel)
    • Avoiding re-ordering in netif_rx()
      ... The packets that I get from the card are fully TCP processed and ... Now I feed these packets to netif_rx. ... received packet is added to the socket receive queue first (bcos the ... send the line "unsubscribe linux-net" in ...
      (Linux-Kernel)
    • Re: packet filter : official documentation not enought, questions remain
      ... First queue set up. ... qint is for internal traffic, qext is ... queue qint bandwidth 99% priority 2 cbq ... You have NO control over inbound packets. ...
      (comp.unix.bsd.openbsd.misc)