This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "".
The branch, master has been updated via 032915e5988d0e1da0562193b8bc925600cdb5f6 (commit) from da7a72e86db0cf83f7b391d8516f9b7504f4e27a (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 032915e5988d0e1da0562193b8bc925600cdb5f6 Author: Juha Mattila juha.mattila@nokia.com Date: Tue Sep 6 16:22:04 2016 +0300
linux-gen: tap: add classifier support
Add missing classifier support to tap pktio.
Resolves bug: https://bugs.linaro.org/show_bug.cgi?id=2504
Reviewed-and-tested-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Matias Elo matias.elo@nokia.com Signed-off-by: Juha Mattila juha.mattila@nokia.com Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/platform/linux-generic/pktio/tap.c b/platform/linux-generic/pktio/tap.c index d758a39..ac20456 100644 --- a/platform/linux-generic/pktio/tap.c +++ b/platform/linux-generic/pktio/tap.c @@ -43,6 +43,7 @@ #include <odp_packet_socket.h> #include <odp_packet_internal.h> #include <odp_packet_io_internal.h> +#include <odp_classification_internal.h>
#define BUF_SIZE 65536
@@ -185,8 +186,17 @@ static odp_packet_t pack_odp_pkt(pktio_entry_t *pktio_entry, const void *data, { odp_packet_t pkt; odp_packet_hdr_t *pkt_hdr; + odp_packet_hdr_t parsed_hdr; int num;
+ if (pktio_cls_enabled(pktio_entry)) { + if (cls_classify_packet(pktio_entry, data, len, len, + &pktio_entry->s.pkt_tap.pool, + &parsed_hdr)) { + return ODP_PACKET_INVALID; + } + } + num = packet_alloc_multi(pktio_entry->s.pkt_tap.pool, len, &pkt, 1);
if (num != 1) @@ -199,7 +209,12 @@ static odp_packet_t pack_odp_pkt(pktio_entry_t *pktio_entry, const void *data, }
pkt_hdr = odp_packet_hdr(pkt); - packet_parse_l2(&pkt_hdr->p, len); + + if (pktio_cls_enabled(pktio_entry)) + copy_packet_cls_metadata(&parsed_hdr, pkt_hdr); + else + packet_parse_l2(&pkt_hdr->p, len); + packet_set_ts(pkt_hdr, ts); pkt_hdr->input = pktio_entry->s.handle;
-----------------------------------------------------------------------
Summary of changes: platform/linux-generic/pktio/tap.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-)
hooks/post-receive