lists.openwall.net   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]
Message-ID: <f312b469-803e-bb15-935c-68f41ebbb4ab@gmail.com>
Date:   Fri, 17 Apr 2020 14:06:06 -0600
From:   David Ahern <dsahern@...il.com>
To:     Toke Høiland-Jørgensen <toke@...hat.com>,
        David Ahern <dsahern@...nel.org>, netdev@...r.kernel.org
Cc:     davem@...emloft.net, kuba@...nel.org,
        prashantbhole.linux@...il.com, jasowang@...hat.com,
        brouer@...hat.com, toshiaki.makita1@...il.com,
        daniel@...earbox.net, john.fastabend@...il.com, ast@...nel.org,
        kafai@...com, songliubraving@...com, yhs@...com, andriin@...com,
        David Ahern <dahern@...italocean.com>
Subject: Re: [PATCH RFC-v5 bpf-next 09/12] dev: Support xdp in the Tx path for
 xdp_frames

On 4/17/20 3:25 AM, Toke Høiland-Jørgensen wrote:
>> not sure I understand. This is the redirect case. ie.., On rx a program
>> is run, XDP_REDIRECT is returned and the packet is queued. Once the
>> queue fills or flush is done, bq_xmit_all is called to send the
>> frames.
> I just meant that eventually we'd want to populate xdp_txq_info with a
> TX HWQ index (and possibly other stuff), right? So how do you figure
> we'd get that information at this call site?

same way it is done for skb's.

1. Add queue_mapping to struct xdp_frame

2. Update ndo_select_queue for xdp_frames

net_device_ops has ndo_select_queue which can be extended to handle
xdp_frames with a reasonable level of work (e.g., lowest bit in the
pointer is a flag signaling skb or xdp_frame). Right now, all queue
selection for xdp frames is buried in ndo_xdp_xmit and is cpu id based.
Move that code to ndo_select_queue (or make an xdp variant).

3. Refactor netdev_core_pick_tx. Move the guts of netdev_core_pick_tx -
the queue id selection - to a separate helper.

4. bq_xmit_all calls the new helper to set the tx queue for all frames.

5. Pass the queue index to the egress bpf program and make it writable
for steering.

6. ndo_xdp_xmit implementation use the index from the xdp_frame just
like ndo_start_xmit uses the mapping from the skb.

Just a bit of code movement and refactoring.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ