[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAF=yD-Jr=UNiKyv=tdzvZ2fu5DSb-GTK38R4vyYPcfq1m+EdmQ@mail.gmail.com>
Date: Mon, 2 Jan 2017 18:15:36 -0500
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: Sowmini Varadhan <sowmini.varadhan@...cle.com>
Cc: Network Development <netdev@...r.kernel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Willem de Bruijn <willemb@...gle.com>,
David Miller <davem@...emloft.net>
Subject: Re: [PATCH v2 net-next 2/2] tools: test case for TPACKET_V3/TX_RING support
On Mon, Jan 2, 2017 at 6:02 PM, Sowmini Varadhan
<sowmini.varadhan@...cle.com> wrote:
> On (01/02/17 17:31), Willem de Bruijn wrote:
>>
>> Thanks for adding this.
>>
>> walk_v3_tx is almost identical to walk_v1_v2_tx. That function can
>> just be extended to add a v3 case where it already multiplexes between
>> v1 and v2.
>
> I looked at that, but the sticky point is that v1/v2 sets up the
> ring->rd* related variables based on frames (e.g., rd_num is tp_frame_nr)
> whereas V3 sets these up based on blocks (e.g, rd_num is tp_block_nr)
> so this impacts the core sending loop a bit.
Good point. Yes, deduplicating the function will help make it crystal
clear where v3 differs from v2.
The patch already has __v3_tx_kernel_ready and __v3_tx_user_ready,
which can be plugged into the existing multiplexer functions
__v1_v2_tx_kernel_ready and __v2_v2_tx_user_ready multiplexer
(along with changing their names).
We'll indeed need a similar multiplexer function for calculating the next
frame to work around this rd_num issue, then.
Powered by blists - more mailing lists