On Sun, Jul 10, 2016 at 06:25:40PM +0300, Tariq Toukan wrote: > > On 09/07/2016 10:58 PM, Saeed Mahameed wrote: > >On Fri, Jul 8, 2016 at 5:15 AM, Brenden Blanco <bbla...@plumgrid.com> wrote: > >>+ /* A bpf program gets first chance to drop the packet. It > >>may > >>+ * read bytes but not past the end of the frag. > >>+ */ > >>+ if (prog) { > >>+ struct xdp_buff xdp; > >>+ dma_addr_t dma; > >>+ u32 act; > >>+ > >>+ dma = be64_to_cpu(rx_desc->data[0].addr); > >>+ dma_sync_single_for_cpu(priv->ddev, dma, > >>+ > >>priv->frag_info[0].frag_size, > >>+ DMA_FROM_DEVICE); > >In case of XDP_PASS we will dma_sync again in the normal path, this > >can be improved by doing the dma_sync as soon as we can and once and > >for all, regardless of the path the packet is going to take > >(XDP_DROP/mlx4_en_complete_rx_desc/mlx4_en_rx_skb). > I agree with Saeed, dma_sync is a heavy operation that is now done > twice for all packets with XDP_PASS. > We should try our best to avoid performance degradation in the flow > of unfiltered packets. Makes sense, do folks here see a way to do this cleanly? > > Regards, > Tariq
- Re: [net-next PATCH RFC] ... Alexander Duyck
- Re: [net-next PATCH RFC] ... Jesper Dangaard Brouer
- Re: [net-next PATCH RFC] ... Alexei Starovoitov
- [PATCH v6 04/12] net/mlx4_en: add support for fast ... Brenden Blanco
- Re: [PATCH v6 04/12] net/mlx4_en: add support ... Or Gerlitz
- Re: [PATCH v6 04/12] net/mlx4_en: add supp... Brenden Blanco
- Re: [PATCH v6 04/12] net/mlx4_en: add ... Tariq Toukan
- Re: [PATCH v6 04/12] net/mlx4_en: add support ... Saeed Mahameed
- Re: [PATCH v6 04/12] net/mlx4_en: add supp... Or Gerlitz
- Re: [PATCH v6 04/12] net/mlx4_en: add supp... Tariq Toukan
- Re: [PATCH v6 04/12] net/mlx4_en: add ... Brenden Blanco
- Re: [PATCH v6 04/12] net/mlx4_en: ... Saeed Mahameed
- Re: [PATCH v6 04/12] net/mlx4... Brenden Blanco
- [PATCH v6 07/12] bpf: add XDP_TX xdp_action for dir... Brenden Blanco
- [PATCH v6 08/12] net/mlx4_en: break out tx_desc wri... Brenden Blanco
- [PATCH v6 05/12] Add sample for adding simple drop ... Brenden Blanco
- Re: [PATCH v6 05/12] Add sample for adding sim... Saeed Mahameed
- Re: [PATCH v6 05/12] Add sample for adding sim... Jamal Hadi Salim
- Re: [PATCH v6 05/12] Add sample for adding... Jesper Dangaard Brouer
- Re: [PATCH v6 05/12] Add sample for ad... Jamal Hadi Salim
- [PATCH v6 11/12] bpf: add sample for xdp forwarding... Brenden Blanco