Re: [patch 4/10] s390: network driver.

From: Paul Jakma (paul_at_clubi.ie)
Date: 11/29/04

  • Next message: Christoph Hellwig: "Re: [2.6 patch] selinux: possible cleanups"
    Date:	Mon, 29 Nov 2004 16:30:23 +0000 (GMT)
    To: Thomas Spatzier <thomas.spatzier@de.ibm.com>
    
    

    On Mon, 29 Nov 2004, Thomas Spatzier wrote:

    > Has there been any outcome on the discussion about whether or not a
    > device driver should drop packets when the cable is disconnected?

    There hasnt.

    > It seems that from the zebra point of view, as Paul wrote, it would
    > be better to not block sockets by queueing up packets when there is
    > no cable connection.

    I'd prefer either to get ENOBUFS or to have kernel drop the packet -
    we're privileged apps writing to raw sockets and/or with IP_HDRINCL,
    the kernel should assume we know what we're doing (cause if we dont,
    there's far /worse/ we could do than send packets to an
    effective /dev/null).

    > I do also think that it does not make sense to keep packets in the
    > queue and then send those packets when the cable is plugged in
    > again after a possibly long time.

    Well, if the kernel is going to queue these packets without notifying
    us, we absolutely *must* have some way to flush those queues. Sending
    stale packets many minutes after the application generated them could
    have serious consequences for routing (eg, think sending RIP, IPv4
    IRDP or v6 RAs which are no longer valid - client receives them and
    installs routes which are long invalid and loses connectivity to some
    part of the network).

    So even if we moved to socket/interface, we still need some way to
    tell kernel to flush a socket when we receive link-down over netlink
    later.

    Not trying to queue on sockets where app has no expectation of
    reliability in first place would be even better ;)

    > There are protocols like TCP that handle packet loss anyway.

    Yes.

    I'd be very interested to hear advice from the kernel gurus (eg "god,
    dont be so stupid, do xyz in your application instead"). We can
    accomodate whatever kernel wants as long as its workable.

    > Regards,
    > Thomas.

    regards,

    -- 
    Paul Jakma	paul@clubi.ie	paul@jakma.org	Key ID: 64A2FF6A
    Fortune:
    You will pay for your sins.  If you have already paid, please disregard
    this message.
    -
    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: Christoph Hellwig: "Re: [2.6 patch] selinux: possible cleanups"

    Relevant Pages

    • Re: Losing UDP packets with MFC Sockets
      ... >> We are developing a tool which uses UDP packets to receive data from a UDP ... Should we use threads to extract data from sockets? ... > 2) use a seperate ring-buffer or FIFO queue of your own for the input ... > data buffering, multiple threads, and recource sharing (ie. fast locking). ...
      (microsoft.public.vc.mfc)
    • Re: Network Packet drops in FreeBSD 5.2.1
      ... > shares a circular queue/buffer with the kernel. ... > off the front of the queue while the queue objects are populated by the ... > 11500 packets/sec, ... > on starting the daemon and upon shutting the daemon down. ...
      (freebsd-hackers)
    • [UNIX] Local Netfilter / IPTables IP Queue PID Wrap Flaw
      ... Beyond Security would like to welcome Tiscali World Online ... and a userspace library which allow userspace mediation and modification ... NET_ADMIN capability) to process packets from the kernel. ...
      (Securiteam)
    • Re: Q: locking mechanisms
      ... of receivers, where this list can contain quite a lot of items: ... other parts of the kernel. ... types of PF_CAN sockets, which register for packets of certain CAN ...
      (Linux-Kernel)
    • Re: Q: locking mechanisms
      ... rcu_read_lockI disable preemption which I thought affects more ... In any kernel in which rcu_read_lockdisables preemption, ... types of PF_CAN sockets, which register for packets of certain CAN ...
      (Linux-Kernel)