lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 8 Jun 2007 10:35:36 +0530
From:	Krishna Kumar2 <>
To:	Evgeniy Polyakov <>
Cc:	David Miller <>,
	Gagan Arneja <>, jamal <>,, Rick Jones <>,
	Robert Olsson <>,
	Sridhar Samudrala <>
Subject: Re: [WIP][PATCHES] Network xmit batching

Hi Evgeniy,

> Let me clarify: there are two possibilities to send data:
> 1. via batched sending, which runs via queue of packets and performs
> prepare call (which only setups some private flags, no work with
> hardware) and then sending call.
> 2. old xmit function (which seems to be unused by kernel now?)

The old xmit is used by all drivers. Only drivers providing this new
API will go through the other path. I am planning to also submit some
changes on top of jamal's patch, which will provide a configuration
parameter to enable/disable this API for a particular device.

> Btw, prep_queue_frame seems to be always called under tx_lock, but it
> old e1000 xmit function calls it without lock. Locked case is correct,
> since it accesses private registers via e1000_transfer_dhcp_info() for
> some adapters.

Prep is called after holding the dev->queue lock (not tx_lock). The old
E1000 xmit also calls prep holding just the dev->queue lock. tx_lock is
held after that.

> So, essentially batched sending is
> lock
> while ((skb = dequue))
>   send
> unlock
> where queue of skbs are prepared by stack using the same transmit lock.
> Where is a gain?

(Not the transmit lock). But in any case, we are amortizing the cost of
the lock in the driver by starting multiple I/O's and doing a single DMA
operation. The prep part is done in both cases holding the dev->queue
lock. Similarly IPoIB could have performance gains as it requires a
completion notification for every skb, and this could be changed to get
notification for only the last skb (and avoid calling completion
notification for 1 to n-1 skbs).

> Btw, this one forces a smile:
>    if (unlikely(ret != NETDEV_TX_OK))
>          return NETDEV_TX_OK;

Actually that is how the original code is handling error in prep since
those skbs are freed up anyway and should not be retried or requeue'd :-)


- KK

To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists