From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) by dpdk.org (Postfix) with ESMTP id DEF331B11F for ; Mon, 10 Dec 2018 17:21:01 +0100 (CET) Received: by mail-pf1-f177.google.com with SMTP id z9so5633753pfi.2 for ; Mon, 10 Dec 2018 08:21:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WQzUB6Jgi70okTlK6edUK9oZWVoNAuM3jBxRYjMM7D4=; b=AhqmszvrY9j2A8HiVKQvetphhqcuNe8/s+Ic5/EILvPgOrQP5TaetGSuu6yI+V2xU7 eXJNFlYsKCrnYkaSgH7lWOuEs7MkjM6ul89lw+IfCV1ie//XlwNGDE09bivBaSlB4y+m FU4nwjBjzQxd2pbLo5RsgFy60Fnuh4XlSBPuNlSYVCN7aZNy05vnUhD9i+XuO8QiWzAb 2f4ageReRaCCGjhV0pH/fHvWJmsVKZyEt85FDT+AWhL9YUMqwea4kJsF0/PXfBrZXo5o oZtY80vb/Hga5QFHSnFJJgyUgR00OXAcSIUFKNDtTdtSeTIRRyuVVnbEmMxv/9gMKhes z54Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WQzUB6Jgi70okTlK6edUK9oZWVoNAuM3jBxRYjMM7D4=; b=Nf3vVPGrVO/rFQQgogvCUQh12ex0TZjIzvhOHR7psLiYVijo7lME1ioKwL7AkBeOGX BmZ1rzqgCsofKc7s4V4WJaoX5v/ADEz0URnS8tohr9CCXwep3juSziAAw7pgoBt56lO+ eoi/g3halkSl4Wt+u7Lw6On8o7hJCw0ijCoKiNBLqRI0z6KinTbMF4rJgwUPKXPJMOD6 KgmvVNE9D4EsGDKR0WNixN0yF6E8y8cwm89gTpYgtr9/eva7FEgOlUBEZynscZulOPko XQz92M+p9FGhsC92ZV2nivXZ9Yhk50qECd0Ma8YigVmET8UMvdF70YjVzqaZYuJGnilw AxjA== X-Gm-Message-State: AA+aEWb6O+FjGuQGCt7354oJE61oGZvLPwHrJ8oDxZTLNKhkSCV1irst AIJHxa1S/bWhQJDN1ytnlLu1tg== X-Google-Smtp-Source: AFSGD/XJtXEdTtOnHu6hmz90RobUt6l43tH16yRGBc2BCQ/6m/dgSxCQHD8ueaIaPJRv/AvLikVZFA== X-Received: by 2002:a63:f844:: with SMTP id v4mr11349749pgj.82.1544458860944; Mon, 10 Dec 2018 08:21:00 -0800 (PST) Received: from xeon-e3 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id l64sm14424790pge.73.2018.12.10.08.21.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Dec 2018 08:21:00 -0800 (PST) Date: Mon, 10 Dec 2018 08:20:59 -0800 From: Stephen Hemminger To: Jakub Grajciar Cc: Message-ID: <20181210082059.6ce4bf6d@xeon-e3> In-Reply-To: <20181210100639.30244-1-jgrajcia@cisco.com> References: <20181210091457.6031-1-jgrajcia@cisco.com> <20181210100639.30244-1-jgrajcia@cisco.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [RFC v2] /net: memory interface (memif) X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 16:21:02 -0000 Things I saw so far, probably not everything > + > +_Static_assert(sizeof(memif_msg_t) == 128, "Size of memif_msg_t must be 128"); > + DPDK uses RTE_BUILD_BUG_ON for checks like this. > diff --git a/drivers/net/memif/Makefile b/drivers/net/memif/Makefile > new file mode 100644 > index 000000000..a82448423 > --- /dev/null > +++ b/drivers/net/memif/Makefile > @@ -0,0 +1,29 @@ > +# SPDX-License-Identifier: BSD-3-Clause > +# Copyright 2018 Cisco Systems, Inc. All rights reserved. > + > +include $(RTE_SDK)/mk/rte.vars.mk > + > +# > +# library name > +# > +LIB = librte_pmd_memif.a > + > +EXPORT_MAP := rte_pmd_memif_version.map > + > +LIBABIVER := 1 > + > +CFLAGS += -O3 > +CFLAGS += -I$(SRCDIR) > +CFLAGS += $(WERROR_FLAGS) > +CFLAGS += -Wno-pointer-arith > +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring > +LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs > +LDLIBS += -lrte_bus_vdev > + > +# > +# all source are stored in SRCS-y > +# > +SRCS-$(CONFIG_RTE_LIBRTE_PMD_MEMIF) += rte_eth_memif.c > +SR What about meson build? ... > + > +/* > + * fd.io coding-style-patch-verification: ON > + * > + * Local Variables: > + * eval: (c-set-style "gnu") > + * End: > + */ This is DPDK not FD.io, this must be removed. > +static inline ssize_t memif_msg_send(int fd, memif_msg_t * msg, int afd) > +{ inline is not necessary with current generation compilers. Only needed in header file. > + > +#define memif_min(a,b) (((a) < (b)) ? (a) : (b)) Use RTE_MIN() instead. Also, what about documentation??