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 bd1b1adf37dd8d252f7daf761d4ae9a6d1ef156a (commit) via 4fafec8378b6e7d0b353d851e724ab27eb002b27 (commit) from 82419a31e6d1846e0676edfa7fb511a23098f5a9 (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 bd1b1adf37dd8d252f7daf761d4ae9a6d1ef156a Author: Matias Elo matias.elo@nokia.com Date: Thu Mar 16 14:50:36 2017 +0200
linux-gen: netmap: remove minimum frame len check
Checking the minimum frame length is unnecessary as netmap drops truncated frames internally.
Signed-off-by: Matias Elo matias.elo@nokia.com Signed-off-by: Bill Fischofer bill.fischofer@linaro.org
diff --git a/platform/linux-generic/pktio/netmap.c b/platform/linux-generic/pktio/netmap.c index 4aecb242..297d54dc 100644 --- a/platform/linux-generic/pktio/netmap.c +++ b/platform/linux-generic/pktio/netmap.c @@ -649,11 +649,6 @@ static inline int netmap_pkt_to_odp(pktio_entry_t *pktio_entry, goto fail; }
- if (odp_unlikely(len < _ODP_ETH_LEN_MIN)) { - ODP_ERR("RX: Frame truncated: %" PRIu16 "\n", len); - goto fail; - } - if (pktio_cls_enabled(pktio_entry)) { if (cls_classify_packet(pktio_entry, (const uint8_t *)slot.buf, len,
commit 4fafec8378b6e7d0b353d851e724ab27eb002b27 Author: Matias Elo matias.elo@nokia.com Date: Thu Mar 16 13:53:30 2017 +0200
linux-gen: netmap: use thread id to make vdev mac addresses unique
Previously the mac addresses of virtual netmap devices would clash if multiple odp processes were run on the same host.
Signed-off-by: Matias Elo matias.elo@nokia.com Signed-off-by: Bill Fischofer bill.fischofer@linaro.org
diff --git a/platform/linux-generic/pktio/netmap.c b/platform/linux-generic/pktio/netmap.c index 4c72a658..4aecb242 100644 --- a/platform/linux-generic/pktio/netmap.c +++ b/platform/linux-generic/pktio/netmap.c @@ -20,6 +20,7 @@ #include <protocols/eth.h>
#include <sys/ioctl.h> +#include <sys/syscall.h> #include <poll.h> #include <linux/ethtool.h> #include <linux/sockios.h> @@ -388,6 +389,11 @@ static int netmap_open(odp_pktio_t id ODP_UNUSED, pktio_entry_t *pktio_entry,
if (pkt_nm->is_virtual) { static unsigned mac; + uint32_t tid = syscall(SYS_gettid); + + if ((int)tid == -1) + ODP_DBG("Unable to fetch thread ID. VALE port MAC " + "addresses may not be unique.\n");
pkt_nm->capa.max_input_queues = 1; pkt_nm->capa.set_op.op.promisc_mode = 0; @@ -395,6 +401,10 @@ static int netmap_open(odp_pktio_t id ODP_UNUSED, pktio_entry_t *pktio_entry, pktio_entry->s.stats_type = STATS_UNSUPPORTED; /* Set MAC address for virtual interface */ pkt_nm->if_mac[0] = 0x2; + pkt_nm->if_mac[1] = (tid >> 24) & 0xff; + pkt_nm->if_mac[2] = (tid >> 16) & 0xff; + pkt_nm->if_mac[3] = (tid >> 8) & 0xff; + pkt_nm->if_mac[4] = tid & 0xff; pkt_nm->if_mac[5] = ++mac;
return 0;
-----------------------------------------------------------------------
Summary of changes: platform/linux-generic/pktio/netmap.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)
hooks/post-receive