[dpdk-dev] [PATCH v4 7/8] net/tap: add packet type management

Pascal Mazon pascal.mazon at 6wind.com
Wed Mar 15 14:44:12 CET 2017


On Wed, 15 Mar 2017 13:35:44 +0000
Ferruh Yigit <ferruh.yigit at intel.com> wrote:

> On 3/14/2017 8:22 AM, Pascal Mazon wrote:
> > Advertize packet types supported by the librte_net.
> > 
> > Signed-off-by: Pascal Mazon <pascal.mazon at 6wind.com>
> 
> <...>
> 
> >  
> >  #include <sys/types.h>
> >  #include <sys/stat.h>
> > @@ -228,6 +229,8 @@ pmd_rx_burst(void *queue, struct rte_mbuf
> > **bufs, uint16_t nb_pkts) mbuf->data_len = len;
> >  		mbuf->pkt_len = len;
> >  		mbuf->port = rxq->in_port;
> > +		mbuf->packet_type = rte_net_get_ptype(mbuf, NULL,
> > +
> > RTE_PTYPE_ALL_MASK);
> 
> This breaks shared library build [1], now librte_net also needs to be
> linked against PMD, this can be done easily by adding library as
> dependency [2] to PMD.
> 
> 
> [1]
> rte_eth_tap.o: In function `pmd_rx_burst':
> .../drivers/net/tap/rte_eth_tap.c:(.text+0x863): undefined reference
> to `rte_net_get_ptype'
> 
> 
> [2]
> --- a/drivers/net/tap/Makefile
> +++ b/drivers/net/tap/Makefile
> @@ -53,5 +53,6 @@ DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_TAP) +=
> lib/librte_mbuf DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_TAP) +=
> lib/librte_mempool DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_TAP) +=
> lib/librte_ether DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_TAP) +=
> lib/librte_kvargs +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_TAP) +=
> lib/librte_net
> 
>  include $(RTE_SDK)/mk/rte.lib.mk

Indeed!

I'll fix that and send a new version (rebased on the latest
next-net, following adrien's changes to tap PMD).

Regards,
Pascal


More information about the dev mailing list