On 03/22, Stephen Hemminger wrote:
>On Fri, 22 Mar 2019 10:15:23 +0800
>Ye Xiaolong wrote:
>
>> On 03/21, Stephen Hemminger wrote:
>> >On Thu, 21 Mar 2019 17:18:41 +0800
>> >Xiaolong Ye wrote:
>> >
>> >> + if (ret != 0) {
>> >> + RTE_LOG(ERR, AF_XDP, "getsockopt() failed
On 03/22, Stephen Hemminger wrote:
>On Fri, 22 Mar 2019 10:01:57 +0800
>Ye Xiaolong wrote:
>
>> On 03/21, Stephen Hemminger wrote:
>> >On Thu, 21 Mar 2019 17:18:41 +0800
>> >Xiaolong Ye wrote:
>> >
>> >> +
>> >> + if (ret < 0)
>> >> + return -EINVAL;
>> >> +
>> >> + return 0;
>> >
>>
On Fri, 22 Mar 2019 10:15:23 +0800
Ye Xiaolong wrote:
> On 03/21, Stephen Hemminger wrote:
> >On Thu, 21 Mar 2019 17:18:41 +0800
> >Xiaolong Ye wrote:
> >
> >> + if (ret != 0) {
> >> + RTE_LOG(ERR, AF_XDP, "getsockopt() failed for
> >> XDP_STATISTICS.\n");
> >> +
On Fri, 22 Mar 2019 10:01:57 +0800
Ye Xiaolong wrote:
> On 03/21, Stephen Hemminger wrote:
> >On Thu, 21 Mar 2019 17:18:41 +0800
> >Xiaolong Ye wrote:
> >
> >> +
> >> + if (ret < 0)
> >> + return -EINVAL;
> >> +
> >> + return 0;
> >
> >You could propogate kernel errno into DPDK?
>
On Fri, Mar 22, 2019 at 09:49:03AM +0800, Ye Xiaolong wrote:
> On 03/21, Stephen Hemminger wrote:
> >On Thu, 21 Mar 2019 17:18:41 +0800
> >Xiaolong Ye wrote:
> >
> >> +
> >> +RTE_PMD_REGISTER_VDEV(eth_af_xdp, pmd_af_xdp_drv);
> >
> >The convention in other network drivers is to use net_XXX in the
On 03/21, Stephen Hemminger wrote:
>On Thu, 21 Mar 2019 17:18:41 +0800
>Xiaolong Ye wrote:
>
>> +if (ret != 0) {
>> +RTE_LOG(ERR, AF_XDP, "getsockopt() failed for
>> XDP_STATISTICS.\n");
>> +return -1;
>
>You need to use the new dynamic log type
On 03/21, Stephen Hemminger wrote:
>On Thu, 21 Mar 2019 17:18:41 +0800
>Xiaolong Ye wrote:
>
>> +for (i = 0; i < rcvd; i++) {
>> +const struct xdp_desc *desc;
>> +uint64_t addr;
>> +uint32_t len;
>> +void *pkt;
>> +
>> +desc = xsk_rin
On 03/21, Stephen Hemminger wrote:
>On Thu, 21 Mar 2019 17:18:41 +0800
>Xiaolong Ye wrote:
>
>> +
>> +static inline int
>> +reserve_fill_queue(struct xsk_umem_info *umem, int reserve_size)
>> +{
>> +struct xsk_ring_prod *fq = &umem->fq;
>> +uint32_t idx;
>> +void *addr = NULL;
>> +
On 03/21, Stephen Hemminger wrote:
>On Thu, 21 Mar 2019 17:18:41 +0800
>Xiaolong Ye wrote:
>
>> static void kick_tx(struct pkt_tx_queue *txq)
>> +{
>> +struct xsk_umem_info *umem = txq->pair->umem;
>> +
>> +while (send(xsk_socket__fd(txq->pair->xsk), NULL,
>> + 0, MSG_DONT
On 03/21, Stephen Hemminger wrote:
>On Thu, 21 Mar 2019 17:18:41 +0800
>Xiaolong Ye wrote:
>
>> +
>> +if (ret < 0)
>> +return -EINVAL;
>> +
>> +return 0;
>
>You could propogate kernel errno into DPDK?
> return (ret < 0) ? -errno : 0;
>
Sorry, could you share the advantag
On 03/21, Stephen Hemminger wrote:
>On Thu, 21 Mar 2019 17:18:41 +0800
>Xiaolong Ye wrote:
>
>> +if (strnlen(value, IFNAMSIZ) > IFNAMSIZ - 1) {
>> +RTE_LOG(ERR, AF_XDP, "Invalid name %s, should be less than "
>> +"%u bytes.\n", value, IFNAMSIZ)
>
>Please don't b
On 03/21, Stephen Hemminger wrote:
>On Thu, 21 Mar 2019 17:18:41 +0800
>Xiaolong Ye wrote:
>
>> +
>> +strlcpy(ifr.ifr_name, if_name, IFNAMSIZ);
>> +if (ioctl(sock, SIOCGIFINDEX, &ifr))
>> +goto error;
>> +
>> +if (ioctl(sock, SIOCGIFHWADDR, &ifr))
>> +goto error
On 03/21, Stephen Hemminger wrote:
>On Thu, 21 Mar 2019 17:18:41 +0800
>Xiaolong Ye wrote:
>
>> +
>> +RTE_PMD_REGISTER_VDEV(eth_af_xdp, pmd_af_xdp_drv);
>
>The convention in other network drivers is to use net_XXX in the vdev name.
>In AF_XDP that would be:
>
>RTE_PMD_REGISTER_VDEV(net_af_xdp, pmd
On Thu, 21 Mar 2019 17:18:41 +0800
Xiaolong Ye wrote:
> +
> +RTE_PMD_REGISTER_VDEV(eth_af_xdp, pmd_af_xdp_drv);
The convention in other network drivers is to use net_XXX in the vdev name.
In AF_XDP that would be:
RTE_PMD_REGISTER_VDEV(net_af_xdp, pmd_af_xdp_drv);
About naming, I would just dro
On Thu, 21 Mar 2019 17:18:41 +0800
Xiaolong Ye wrote:
> +
> + strlcpy(ifr.ifr_name, if_name, IFNAMSIZ);
> + if (ioctl(sock, SIOCGIFINDEX, &ifr))
> + goto error;
> +
> + if (ioctl(sock, SIOCGIFHWADDR, &ifr))
> + goto error;
> +
> + rte_memcpy(eth_addr, ifr.i
On Thu, 21 Mar 2019 17:18:41 +0800
Xiaolong Ye wrote:
> + if (strnlen(value, IFNAMSIZ) > IFNAMSIZ - 1) {
> + RTE_LOG(ERR, AF_XDP, "Invalid name %s, should be less than "
> + "%u bytes.\n", value, IFNAMSIZ)
Please don't break error message strings across multip
On Thu, 21 Mar 2019 17:18:41 +0800
Xiaolong Ye wrote:
> +
> + if (ret < 0)
> + return -EINVAL;
> +
> + return 0;
You could propogate kernel errno into DPDK?
return (ret < 0) ? -errno : 0;
On Thu, 21 Mar 2019 17:18:41 +0800
Xiaolong Ye wrote:
> + if (ret != 0) {
> + RTE_LOG(ERR, AF_XDP, "getsockopt() failed for
> XDP_STATISTICS.\n");
> + return -1;
You need to use the new dynamic log types and not have a global logtype.
On Thu, 21 Mar 2019 17:18:41 +0800
Xiaolong Ye wrote:
> static void kick_tx(struct pkt_tx_queue *txq)
> +{
> + struct xsk_umem_info *umem = txq->pair->umem;
> +
> + while (send(xsk_socket__fd(txq->pair->xsk), NULL,
> + 0, MSG_DONTWAIT) < 0) {
> + /* some thin
On Thu, 21 Mar 2019 17:18:41 +0800
Xiaolong Ye wrote:
> + for (i = 0; i < rcvd; i++) {
> + const struct xdp_desc *desc;
> + uint64_t addr;
> + uint32_t len;
> + void *pkt;
> +
> + desc = xsk_ring_cons__rx_desc(rx, idx_rx++);
> +
On Thu, 21 Mar 2019 17:18:41 +0800
Xiaolong Ye wrote:
> +
> +static inline int
> +reserve_fill_queue(struct xsk_umem_info *umem, int reserve_size)
> +{
> + struct xsk_ring_prod *fq = &umem->fq;
> + uint32_t idx;
> + void *addr = NULL;
> + int i, ret;
> +
> + ret = xsk_ring_pro
Add a new PMD driver for AF_XDP which is a proposed faster version of
AF_PACKET interface in Linux. More info about AF_XDP, please refer to [1]
[2].
This is the vanilla version PMD which just uses a raw buffer registered as
the umem.
[1] https://fosdem.org/2018/schedule/event/af_xdp/
[2] https://
22 matches
Mail list logo