[dpdk-dev,v4,7/8] net/tap: add packet type management
Checks
Commit Message
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@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]
Comments
On Wed, 15 Mar 2017 13:35:44 +0000
Ferruh Yigit <ferruh.yigit@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@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
On 3/15/2017 1:44 PM, Pascal Mazon wrote:
> On Wed, 15 Mar 2017 13:35:44 +0000
> Ferruh Yigit <ferruh.yigit@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@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).
Can you also rebase tap rte_flow one [1], after this one please?
Because that set effected from both this one and Adrien's changes.
[1]
http://dpdk.org/dev/patchwork/patch/21757/ [4 patches]
Thanks,
ferruh
>
> Regards,
> Pascal
>
@@ -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