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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4fd41e45-564b-7bf2-e743-84875ea49791@lab.ntt.co.jp>
Date:   Tue, 11 Sep 2018 09:45:52 +0900
From:   Toshiaki Makita <makita.toshiaki@....ntt.co.jp>
To:     Ilias Apalodimas <ilias.apalodimas@...aro.org>
Cc:     netdev@...r.kernel.org, jaswinder.singh@...aro.org,
        ard.biesheuvel@...aro.org, masami.hiramatsu@...aro.org,
        arnd@...db.de, mykyta.iziumtsev@...aro.org, bjorn.topel@...el.com,
        magnus.karlsson@...el.com,
        Jesper Dangaard Brouer <brouer@...hat.com>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Björn Töpel <bjorn.topel@...il.com>
Subject: Re: [net-next, PATCH 2/2, v1] net: socionext: add AF_XDP support

On 2018/09/11 1:21, Ilias Apalodimas wrote:
>>> @@ -707,6 +731,26 @@ static int netsec_process_rx(struct netsec_priv *priv, int budget)
>>>  		if (unlikely(!buf_addr))
>>>  			break;
>>>  
>>> +		if (xdp_prog) {
>>> +			xdp_result = netsec_run_xdp(desc, priv, xdp_prog,
>>> +						    pkt_len);
>>> +			if (xdp_result != NETSEC_XDP_PASS) {
>>> +				xdp_flush |= xdp_result & NETSEC_XDP_REDIR;
>>> +
>>> +				dma_unmap_single_attrs(priv->dev,
>>> +						       desc->dma_addr,
>>> +						       desc->len, DMA_TO_DEVICE,
>>> +						       DMA_ATTR_SKIP_CPU_SYNC);
>>> +
>>> +				desc->len = desc_len;
>>> +				desc->dma_addr = dma_handle;
>>> +				desc->addr = buf_addr;
>>> +				netsec_rx_fill(priv, idx, 1);
>>> +				nsetsec_adv_desc(&dring->tail);
>>> +			}
>>> +			continue;
>>
>> Continue even on XDP_PASS? Is this really correct?
>>
>> Also seems there is no handling of adjust_head/tail for XDP_PASS case.
>>
> A question on this. Should XDP related frames be allocated using 1 page
> per packet?

AFAIK there is no such constraint, e.g. i40e allocates 1 page per 2 packets.

-- 
Toshiaki Makita

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ