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 50ebc616ddd9d05651923134d7bfaa02c103fbce (commit) via 1ff6b7a7e44e7d7376920f1e1ee81dbf28f95563 (commit) from c15da68b8dc3187c1929ff7d7705a0958856cbad (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 50ebc616ddd9d05651923134d7bfaa02c103fbce Author: Matias Elo matias.elo@nokia.com Date: Mon Jan 9 12:56:14 2017 +0200
linux-gen: netmap: bump supported netmap version to 11.2
Signed-off-by: Matias Elo matias.elo@nokia.com Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/DEPENDENCIES b/DEPENDENCIES index f1f0edd..574859c 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -83,13 +83,13 @@ Prerequisites for building the OpenDataPlane (ODP) API 3.3.1 Building netmap kernel modules
ODP works at least with the latest release version of netmap, which is - currently 11.1. However, if possible one should try to use the latest netmap + currently 11.2. However, if possible one should try to use the latest netmap master branch commit for the best performance and the latest bug fixes.
# Checkout netmap code $ git clone https://github.com/luigirizzo/netmap.git $ cd netmap - $ git checkout v11.1 (optional) + $ git checkout v11.2 (optional)
This is enough to build ODP. If you don't want to build netmap kernel modules you can jump to section 3.3.2.
commit 1ff6b7a7e44e7d7376920f1e1ee81dbf28f95563 Author: Matias Elo matias.elo@nokia.com Date: Mon Jan 9 12:56:13 2017 +0200
linux-gen: netmap: fix interface flags initialization
Previously netmap interface flags parsed by nm_open() were always overwritten by netmap_start() function. In netmap v11.2 release this breaks pipe interface initialization. Fix this by setting the netmap flags only when needed.
Signed-off-by: Matias Elo matias.elo@nokia.com Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/platform/linux-generic/pktio/netmap.c b/platform/linux-generic/pktio/netmap.c index 8eb8145..208984b 100644 --- a/platform/linux-generic/pktio/netmap.c +++ b/platform/linux-generic/pktio/netmap.c @@ -452,7 +452,7 @@ static int netmap_start(pktio_entry_t *pktio_entry) { pkt_netmap_t *pkt_nm = &pktio_entry->s.pkt_nm; netmap_ring_t *desc_ring; - struct nm_desc base_desc; + struct nm_desc *desc_ptr; unsigned i; unsigned j; unsigned num_rx_desc = 0; @@ -503,18 +503,27 @@ static int netmap_start(pktio_entry_t *pktio_entry) pktio_entry->s.num_out_queue, pktio_entry->s.num_out_queue);
- memset(&base_desc, 0, sizeof(struct nm_desc)); - base_desc.self = &base_desc; - base_desc.mem = NULL; - memcpy(base_desc.req.nr_name, pkt_nm->if_name, sizeof(pkt_nm->if_name)); - base_desc.req.nr_flags &= ~NR_REG_MASK; + /* Use nm_open() to parse netmap flags from interface name */ + desc_ptr = nm_open(pkt_nm->nm_name, NULL, 0, NULL); + if (desc_ptr == NULL) { + ODP_ERR("nm_start(%s) failed\n", pkt_nm->nm_name); + goto error; + } + struct nm_desc base_desc = *desc_ptr;
- if (num_rx_desc == 1) - base_desc.req.nr_flags |= NR_REG_ALL_NIC; - else - base_desc.req.nr_flags |= NR_REG_ONE_NIC; + nm_close(desc_ptr);
+ base_desc.self = &base_desc; + base_desc.mem = NULL; base_desc.req.nr_ringid = 0; + if ((base_desc.req.nr_flags & NR_REG_MASK) == NR_REG_ALL_NIC || + (base_desc.req.nr_flags & NR_REG_MASK) == NR_REG_ONE_NIC) { + base_desc.req.nr_flags &= ~NR_REG_MASK; + if (num_rx_desc == 1) + base_desc.req.nr_flags |= NR_REG_ALL_NIC; + else + base_desc.req.nr_flags |= NR_REG_ONE_NIC; + }
/* Only the first rx descriptor does mmap */ desc_ring = pkt_nm->rx_desc_ring; @@ -548,8 +557,12 @@ static int netmap_start(pktio_entry_t *pktio_entry) /* Open tx descriptors */ desc_ring = pkt_nm->tx_desc_ring; flags = NM_OPEN_IFNAME | NM_OPEN_NO_MMAP; - base_desc.req.nr_flags &= ~NR_REG_ALL_NIC; - base_desc.req.nr_flags |= NR_REG_ONE_NIC; + + if ((base_desc.req.nr_flags & NR_REG_MASK) == NR_REG_ALL_NIC) { + base_desc.req.nr_flags &= ~NR_REG_ALL_NIC; + base_desc.req.nr_flags |= NR_REG_ONE_NIC; + } + for (i = 0; i < pktio_entry->s.num_out_queue; i++) { for (j = desc_ring[i].s.first; j <= desc_ring[i].s.last; j++) { base_desc.req.nr_ringid = j;
-----------------------------------------------------------------------
Summary of changes: DEPENDENCIES | 4 ++-- platform/linux-generic/pktio/netmap.c | 37 +++++++++++++++++++++++------------ 2 files changed, 27 insertions(+), 14 deletions(-)
hooks/post-receive