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, api-next has been updated
via bdb7cbf620ada8682c89b5ae5a97cb84f16c0ed0 (commit)
via e4b4bab2247e7724fb4b5983e54fd62676f1d206 (commit)
via 22441cdcb569d5c6147db5d67e62fde67a3daad5 (commit)
via 2ae5d875aab20e728c231361af95e1c57336daa5 (commit)
via c370d7950524a968bbc148644f7c5fc619c78600 (commit)
via 28a3b9e30fb4e8784a8781e06e28d3f175e05749 (commit)
from ad990bbf88d95b2a4f9583b7fda718bf5d7d4212 (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 bdb7cbf620ada8682c89b5ae5a97cb84f16c0ed0
Author: Petri Savolainen <petri.savolainen(a)linaro.org>
Date: Thu Nov 16 15:07:42 2017 +0200
api: pktio: clean up doxygen tags
Remove [in] from @param tags as by default parameters
are input only.
Signed-off-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Reviewed-by: Balasubramanian Manoharan <bala.manoharan(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/include/odp/api/spec/packet_io.h b/include/odp/api/spec/packet_io.h
index a9a39a64..60d13043 100644
--- a/include/odp/api/spec/packet_io.h
+++ b/include/odp/api/spec/packet_io.h
@@ -954,8 +954,8 @@ uint32_t ODP_DEPRECATE(odp_pktio_mtu)(odp_pktio_t pktio);
/**
* Enable/Disable promiscuous mode on a packet IO interface.
*
- * @param[in] pktio Packet IO handle.
- * @param[in] enable 1 to enable, 0 to disable.
+ * @param pktio Packet IO handle.
+ * @param enable 1 to enable, 0 to disable.
*
* @retval 0 on success
* @retval <0 on failure
@@ -965,7 +965,7 @@ int odp_pktio_promisc_mode_set(odp_pktio_t pktio, odp_bool_t enable);
/**
* Determine if promiscuous mode is enabled for a packet IO interface.
*
- * @param[in] pktio Packet IO handle.
+ * @param pktio Packet IO handle.
*
* @retval 1 if promiscuous mode is enabled.
* @retval 0 if promiscuous mode is disabled.
@@ -1034,14 +1034,13 @@ int odp_pktio_mac_addr_set(odp_pktio_t pktio, const void *mac_addr,
/**
* Setup per-port default class-of-service.
*
- * @param[in] pktio Ingress port pktio handle.
- * @param[in] default_cos Class-of-service set to all packets arriving
- * at this ingress port,
- * unless overridden by subsequent
- * header-based filters.
+ * @param pktio Ingress port pktio handle.
+ * @param default_cos Class-of-service set to all packets arriving at this
+ * ingress port, unless overridden by subsequent
+ * header-based filters.
*
- * @retval 0 on success
- * @retval <0 on failure
+ * @retval 0 on success
+ * @retval <0 on failure
*
* @note The default_cos has to be unique per odp_pktio_t instance.
*/
@@ -1050,12 +1049,12 @@ int odp_pktio_default_cos_set(odp_pktio_t pktio, odp_cos_t default_cos);
/**
* Setup per-port error class-of-service
*
- * @param[in] pktio Ingress port pktio handle.
- * @param[in] error_cos class-of-service set to all packets arriving
- * at this ingress port that contain an error.
+ * @param pktio Ingress port pktio handle.
+ * @param error_cos class-of-service set to all packets arriving at this
+ * ingress port that contain an error.
*
- * @retval 0 on success
- * @retval <0 on failure
+ * @retval 0 on success
+ * @retval <0 on failure
*
* @note Optional.
*/
@@ -1064,24 +1063,23 @@ int odp_pktio_error_cos_set(odp_pktio_t pktio, odp_cos_t error_cos);
/**
* Setup per-port header offset
*
- * @param[in] pktio Ingress port pktio handle.
- * @param[in] offset Number of bytes the classifier must skip.
+ * @param pktio Ingress port pktio handle.
+ * @param offset Number of bytes the classifier must skip.
*
- * @retval 0 on success
- * @retval <0 on failure
- * @note Optional.
+ * @retval 0 on success
+ * @retval <0 on failure
*
+ * @note Optional.
*/
int odp_pktio_skip_set(odp_pktio_t pktio, uint32_t offset);
/**
* Specify per-port buffer headroom
*
- * @param[in] pktio Ingress port pktio handle.
- * @param[in] headroom Number of bytes of space preceding
- * packet data to reserve for use as headroom.
- * Must not exceed the implementation
- * defined ODP_PACKET_MAX_HEADROOM.
+ * @param pktio Ingress port pktio handle.
+ * @param headroom Number of bytes of space preceding packet data to reserve
+ * for use as headroom. Must not exceed the implementation
+ * defined ODP_PACKET_MAX_HEADROOM.
*
* @retval 0 on success
* @retval <0 on failure
commit e4b4bab2247e7724fb4b5983e54fd62676f1d206
Author: Petri Savolainen <petri.savolainen(a)linaro.org>
Date: Thu Nov 16 14:25:10 2017 +0200
linux-gen: dpdk: fix maximum frame length value
Returns maximum ethernet frame size instead of maximum IP
packet MTU.
Signed-off-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Reviewed-by: Balasubramanian Manoharan <bala.manoharan(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/platform/linux-generic/pktio/dpdk.c b/platform/linux-generic/pktio/dpdk.c
index ccccc0a8..d0a238aa 100644
--- a/platform/linux-generic/pktio/dpdk.c
+++ b/platform/linux-generic/pktio/dpdk.c
@@ -842,6 +842,13 @@ static uint32_t dpdk_mtu_get(pktio_entry_t *pktio_entry)
return mtu;
}
+static uint32_t dpdk_frame_maxlen(pktio_entry_t *pktio_entry)
+{
+ pkt_dpdk_t *pkt_dpdk = &pktio_entry->s.pkt_dpdk;
+
+ return pkt_dpdk->mtu;
+}
+
static int dpdk_vdev_promisc_mode_get(uint8_t port_id)
{
struct rte_eth_dev_info dev_info;
@@ -1654,7 +1661,7 @@ const pktio_if_ops_t dpdk_pktio_ops = {
.recv = dpdk_recv,
.send = dpdk_send,
.link_status = dpdk_link_status,
- .mtu_get = dpdk_mtu_get,
+ .mtu_get = dpdk_frame_maxlen,
.promisc_mode_set = dpdk_promisc_mode_set,
.promisc_mode_get = dpdk_promisc_mode_get,
.mac_get = dpdk_mac_addr_get,
commit 22441cdcb569d5c6147db5d67e62fde67a3daad5
Author: Petri Savolainen <petri.savolainen(a)linaro.org>
Date: Thu Nov 16 14:23:08 2017 +0200
test: l2fwd: add verbose option
Added verbose command line option. When enabled, pktio interface
details are printed after open. This can be used for debugging
interface configuration.
Signed-off-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Reviewed-by: Balasubramanian Manoharan <bala.manoharan(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/test/performance/odp_l2fwd.c b/test/performance/odp_l2fwd.c
index 42d8f49a..2daf0e2d 100644
--- a/test/performance/odp_l2fwd.c
+++ b/test/performance/odp_l2fwd.c
@@ -108,6 +108,7 @@ typedef struct {
int error_check; /**< Check packet errors */
int sched_mode; /**< Scheduler mode */
int num_groups; /**< Number of scheduling groups */
+ int verbose; /**< Verbose output */
} appl_args_t;
static int exit_threads; /**< Break workers loop if set to 1 */
@@ -697,6 +698,9 @@ static int create_pktio(const char *dev, int idx, int num_rx, int num_tx,
printf("created pktio %" PRIu64 ", dev: %s, drv: %s\n",
odp_pktio_to_u64(pktio), dev, info.drv_name);
+ if (gbl_args->appl.verbose)
+ odp_pktio_print(pktio);
+
if (odp_pktio_capability(pktio, &capa)) {
LOG_ERR("Error: capability query failed %s\n", dev);
return -1;
@@ -1163,11 +1167,12 @@ static void parse_args(int argc, char *argv[], appl_args_t *appl_args)
{"src_change", required_argument, NULL, 's'},
{"error_check", required_argument, NULL, 'e'},
{"groups", required_argument, NULL, 'g'},
+ {"verbose", no_argument, NULL, 'v'},
{"help", no_argument, NULL, 'h'},
{NULL, 0, NULL, 0}
};
- static const char *shortopts = "+c:+t:+a:i:m:o:r:d:s:e:g:h";
+ static const char *shortopts = "+c:+t:+a:i:m:o:r:d:s:e:g:vh";
/* let helper collect its own arguments (e.g. --odph_proc) */
odph_parse_options(argc, argv, shortopts, longopts);
@@ -1178,6 +1183,7 @@ static void parse_args(int argc, char *argv[], appl_args_t *appl_args)
appl_args->src_change = 1; /* change eth src address by default */
appl_args->num_groups = 0; /* use default group */
appl_args->error_check = 0; /* don't check packet errors by default */
+ appl_args->verbose = 0;
opterr = 0; /* do not issue errors on helper options */
@@ -1305,6 +1311,9 @@ static void parse_args(int argc, char *argv[], appl_args_t *appl_args)
case 'g':
appl_args->num_groups = atoi(optarg);
break;
+ case 'v':
+ appl_args->verbose = 1;
+ break;
case 'h':
usage(argv[0]);
exit(EXIT_SUCCESS);
commit 2ae5d875aab20e728c231361af95e1c57336daa5
Author: Petri Savolainen <petri.savolainen(a)linaro.org>
Date: Thu Nov 16 13:53:10 2017 +0200
api: pktio: deprecate odp_pktio_mtu
MTU is not a well defined term for link layer maximum receive
and transmit frame sizes. Use odp_pktin_maxlen() and
odp_pktout_maxlen() instead.
Signed-off-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Reviewed-by: Balasubramanian Manoharan <bala.manoharan(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/include/odp/api/spec/packet_io.h b/include/odp/api/spec/packet_io.h
index b09c9cfc..a9a39a64 100644
--- a/include/odp/api/spec/packet_io.h
+++ b/include/odp/api/spec/packet_io.h
@@ -30,7 +30,7 @@ extern "C" {
*
* Packet IO is the Ingress and Egress interface to ODP processing. It
* allows manipulation of the interface for setting such attributes as
- * the mtu, mac etc.
+ * number of queues, MAC address etc.
* Pktio is usually followed by the classifier and a default class COS
* can be set so that the scheduler may distribute flows. The interface
* may be used directly in polled mode with odp_pktin_recv() and
@@ -938,14 +938,18 @@ int odp_pktout_send(odp_pktout_queue_t queue, const odp_packet_t packets[],
int num);
/**
- * Return the currently configured MTU value of a packet IO interface.
+ * MTU value of a packet IO interface
*
- * @param[in] pktio Packet IO handle.
+ * @deprecated Use odp_pktin_maxlen() and odp_pktout_maxlen() instead. MTU was
+ * not well defined. There may be difference between MTU and maximum frame
+ * length values.
+ *
+ * @param pktio Packet IO handle.
*
* @return MTU value on success
* @retval 0 on failure
*/
-uint32_t odp_pktio_mtu(odp_pktio_t pktio);
+uint32_t ODP_DEPRECATE(odp_pktio_mtu)(odp_pktio_t pktio);
/**
* Enable/Disable promiscuous mode on a packet IO interface.
diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c
index cf65e723..aa6cdb06 100644
--- a/platform/linux-generic/odp_packet_io.c
+++ b/platform/linux-generic/odp_packet_io.c
@@ -803,7 +803,7 @@ static inline uint32_t pktio_mtu(odp_pktio_t hdl)
return ret;
}
-uint32_t odp_pktio_mtu(odp_pktio_t pktio)
+uint32_t ODP_DEPRECATE(odp_pktio_mtu)(odp_pktio_t pktio)
{
return pktio_mtu(pktio);
}
diff --git a/test/validation/api/pktio/pktio.c b/test/validation/api/pktio/pktio.c
index 004379cd..39451de3 100644
--- a/test/validation/api/pktio/pktio.c
+++ b/test/validation/api/pktio/pktio.c
@@ -617,13 +617,13 @@ static void pktio_txrx_multi(pktio_info_t *pktio_a, pktio_info_t *pktio_b,
if (packet_len == USE_MTU) {
odp_pool_capability_t pool_capa;
- uint32_t mtu;
+ uint32_t maxlen;
- mtu = odp_pktio_mtu(pktio_a->id);
- if (odp_pktio_mtu(pktio_b->id) < mtu)
- mtu = odp_pktio_mtu(pktio_b->id);
- CU_ASSERT_FATAL(mtu > 0);
- packet_len = mtu;
+ maxlen = odp_pktout_maxlen(pktio_a->id);
+ if (odp_pktout_maxlen(pktio_b->id) < maxlen)
+ maxlen = odp_pktout_maxlen(pktio_b->id);
+ CU_ASSERT_FATAL(maxlen > 0);
+ packet_len = maxlen;
if (packet_len > PKT_LEN_MAX)
packet_len = PKT_LEN_MAX;
@@ -1026,16 +1026,21 @@ void pktio_test_recv_mtu(void)
void pktio_test_mtu(void)
{
int ret;
- uint32_t mtu;
+ uint32_t maxlen;
odp_pktio_t pktio = create_pktio(0, ODP_PKTIN_MODE_SCHED,
ODP_PKTOUT_MODE_DIRECT);
CU_ASSERT_FATAL(pktio != ODP_PKTIO_INVALID);
- mtu = odp_pktio_mtu(pktio);
- CU_ASSERT(mtu > 0);
+ maxlen = odp_pktout_maxlen(pktio);
+ CU_ASSERT(maxlen > 0);
- printf(" %" PRIu32 " ", mtu);
+ printf(" %" PRIu32 " ", maxlen);
+
+ maxlen = odp_pktin_maxlen(pktio);
+ CU_ASSERT(maxlen > 0);
+
+ printf(" %" PRIu32 " ", maxlen);
ret = odp_pktio_close(pktio);
CU_ASSERT(ret == 0);
@@ -1706,14 +1711,14 @@ void pktio_test_start_stop(void)
/*
* This is a pre-condition check that the pktio_test_send_failure()
- * test case can be run. If the TX interface MTU is larger that the
+ * test case can be run. If the TX interface max frame len is larger that the
* biggest packet we can allocate then the test won't be able to
- * attempt to send packets larger than the MTU, so skip the test.
+ * attempt to send packets larger than the max len, so skip the test.
*/
int pktio_check_send_failure(void)
{
odp_pktio_t pktio_tx;
- uint32_t mtu;
+ uint32_t maxlen;
odp_pktio_param_t pktio_param;
int iface_idx = 0;
const char *iface = iface_name[iface_idx];
@@ -1734,14 +1739,14 @@ int pktio_check_send_failure(void)
return ODP_TEST_INACTIVE;
}
- /* read the MTU from the transmit interface */
- mtu = odp_pktio_mtu(pktio_tx);
+ /* read the maxlen from the transmit interface */
+ maxlen = odp_pktout_maxlen(pktio_tx);
odp_pktio_close(pktio_tx);
/* Failure test supports only single segment */
if (pool_capa.pkt.max_seg_len &&
- pool_capa.pkt.max_seg_len < mtu + 32)
+ pool_capa.pkt.max_seg_len < maxlen + 32)
return ODP_TEST_INACTIVE;
return ODP_TEST_ACTIVE;
@@ -1753,7 +1758,7 @@ void pktio_test_send_failure(void)
odp_packet_t pkt_tbl[TX_BATCH_LEN];
uint32_t pkt_seq[TX_BATCH_LEN];
int ret, i, alloc_pkts;
- uint32_t mtu;
+ uint32_t maxlen;
odp_pool_param_t pool_params;
odp_pool_t pkt_pool;
int long_pkt_idx = TX_BATCH_LEN / 2;
@@ -1770,8 +1775,8 @@ void pktio_test_send_failure(void)
CU_ASSERT_FATAL(odp_pktout_queue(pktio_tx, &pktout, 1) == 1);
- /* read the MTU from the transmit interface */
- mtu = odp_pktio_mtu(pktio_tx);
+ /* read maxlen from the transmit interface */
+ maxlen = odp_pktout_maxlen(pktio_tx);
ret = odp_pktio_start(pktio_tx);
CU_ASSERT_FATAL(ret == 0);
@@ -1781,15 +1786,15 @@ void pktio_test_send_failure(void)
CU_ASSERT_FATAL(odp_pool_capability(&pool_capa) == 0);
if (pool_capa.pkt.max_seg_len &&
- pool_capa.pkt.max_seg_len < mtu + 32) {
+ pool_capa.pkt.max_seg_len < maxlen + 32) {
CU_FAIL("Max packet seg length is too small.");
return;
}
/* configure the pool so that we can generate test packets larger
- * than the interface MTU */
+ * than the interface max transmit length */
odp_pool_param_init(&pool_params);
- pool_params.pkt.len = mtu + 32;
+ pool_params.pkt.len = maxlen + 32;
pool_params.pkt.seg_len = pool_params.pkt.len;
pool_params.pkt.num = TX_BATCH_LEN + 1;
pool_params.type = ODP_POOL_PACKET;
commit c370d7950524a968bbc148644f7c5fc619c78600
Author: Petri Savolainen <petri.savolainen(a)linaro.org>
Date: Thu Nov 16 10:56:34 2017 +0200
linux-gen: pktio: implement frame length
Use mtu to implement frame length functions. Various packet
IO devices mtu functions need to be still updated to return
correct frame length values.
Signed-off-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Reviewed-by: Balasubramanian Manoharan <bala.manoharan(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c
index 5f7da263..cf65e723 100644
--- a/platform/linux-generic/odp_packet_io.c
+++ b/platform/linux-generic/odp_packet_io.c
@@ -777,7 +777,7 @@ void sched_cb_pktio_stop_finalize(int pktio_index)
unlock_entry(entry);
}
-uint32_t odp_pktio_mtu(odp_pktio_t hdl)
+static inline uint32_t pktio_mtu(odp_pktio_t hdl)
{
pktio_entry_t *entry;
uint32_t ret = 0;
@@ -803,6 +803,21 @@ uint32_t odp_pktio_mtu(odp_pktio_t hdl)
return ret;
}
+uint32_t odp_pktio_mtu(odp_pktio_t pktio)
+{
+ return pktio_mtu(pktio);
+}
+
+uint32_t odp_pktin_maxlen(odp_pktio_t pktio)
+{
+ return pktio_mtu(pktio);
+}
+
+uint32_t odp_pktout_maxlen(odp_pktio_t pktio)
+{
+ return pktio_mtu(pktio);
+}
+
int odp_pktio_promisc_mode_set(odp_pktio_t hdl, odp_bool_t enable)
{
pktio_entry_t *entry;
@@ -1089,8 +1104,11 @@ void odp_pktio_print(odp_pktio_t hdl)
" mac %02x:%02x:%02x:%02x:%02x:%02x\n",
addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]);
len += snprintf(&str[len], n - len,
- " mtu %" PRIu32 "\n",
- odp_pktio_mtu(hdl));
+ " pktin maxlen %" PRIu32 "\n",
+ odp_pktin_maxlen(hdl));
+ len += snprintf(&str[len], n - len,
+ " pktout maxlen %" PRIu32 "\n",
+ odp_pktout_maxlen(hdl));
len += snprintf(&str[len], n - len,
" promisc %s\n",
odp_pktio_promisc_mode(hdl) ? "yes" : "no");
commit 28a3b9e30fb4e8784a8781e06e28d3f175e05749
Author: Petri Savolainen <petri.savolainen(a)linaro.org>
Date: Wed Nov 15 17:19:33 2017 +0200
api: pktio: add max frame length
Added functions to request maximum packet input and output
frame lengths.
Signed-off-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Reviewed-by: Balasubramanian Manoharan <bala.manoharan(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/include/odp/api/spec/packet_io.h b/include/odp/api/spec/packet_io.h
index 6e4f8810..b09c9cfc 100644
--- a/include/odp/api/spec/packet_io.h
+++ b/include/odp/api/spec/packet_io.h
@@ -969,6 +969,36 @@ int odp_pktio_promisc_mode_set(odp_pktio_t pktio, odp_bool_t enable);
*/
int odp_pktio_promisc_mode(odp_pktio_t pktio);
+/**
+ * Maximum frame length at packet input
+ *
+ * Maximum frame length in bytes that the packet IO interface can receive.
+ * For Ethernet, the frame length bytes start with MAC addresses and continue
+ * to the end of the payload. So, Ethernet checksum, interpacket gap
+ * and preamble bytes are excluded from the length.
+ *
+ * @param pktio Packet IO handle.
+ *
+ * @return Maximum frame length at packet input
+ * @retval 0 on failure
+ */
+uint32_t odp_pktin_maxlen(odp_pktio_t pktio);
+
+/**
+ * Maximum frame length at packet output
+ *
+ * Maximum frame length in bytes that the packet IO interface can transmit.
+ * For Ethernet, the frame length bytes start with MAC addresses and continue
+ * to the end of the payload. So, Ethernet checksum, interpacket gap
+ * and preamble bytes are excluded from the length.
+ *
+ * @param pktio Packet IO handle.
+ *
+ * @return Maximum frame length at packet output
+ * @retval 0 on failure
+ */
+uint32_t odp_pktout_maxlen(odp_pktio_t pktio);
+
/**
* Get the default MAC address of a packet IO interface.
*
-----------------------------------------------------------------------
Summary of changes:
include/odp/api/spec/packet_io.h | 90 +++++++++++++++++++++++-----------
platform/linux-generic/odp_packet_io.c | 24 +++++++--
platform/linux-generic/pktio/dpdk.c | 9 +++-
test/performance/odp_l2fwd.c | 11 ++++-
test/validation/api/pktio/pktio.c | 49 +++++++++---------
5 files changed, 127 insertions(+), 56 deletions(-)
hooks/post-receive
--
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, api-next has been updated
via 90f2fe4ce26e7a2b66bb5eb13e372ccf3dec0d1c (commit)
from b95e7d08043ba45d12635c5afaa3fbf3a07ecc90 (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 90f2fe4ce26e7a2b66bb5eb13e372ccf3dec0d1c
Author: Petri Savolainen <petri.savolainen(a)linaro.org>
Date: Wed Nov 22 14:47:11 2017 +0200
example: tm: update gitignore
Added missing files to gitignore file.
Signed-off-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/example/traffic_mgmt/.gitignore b/example/traffic_mgmt/.gitignore
index 9e742f0d..9902e702 100644
--- a/example/traffic_mgmt/.gitignore
+++ b/example/traffic_mgmt/.gitignore
@@ -1 +1,3 @@
-odp_traffic_mgmt
\ No newline at end of file
+*.log
+*.trs
+odp_traffic_mgmt
-----------------------------------------------------------------------
Summary of changes:
example/traffic_mgmt/.gitignore | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
hooks/post-receive
--
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, api-next has been updated
via b95e7d08043ba45d12635c5afaa3fbf3a07ecc90 (commit)
via a8caa46fbe095a8308538539907e5af664fafea8 (commit)
via a72a1e82ad31d5555c644508d5f35c590b3c4073 (commit)
via 94cea0ca54d4a10f5e46c76d6047422274294aec (commit)
from 2e93b540f69eae505b4505ada1912ac0d2bdea31 (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 b95e7d08043ba45d12635c5afaa3fbf3a07ecc90
Author: Balasubramanian Manoharan <bala.manoharan(a)linaro.org>
Date: Mon Nov 6 23:25:40 2017 +0530
linux-generic: classification: implement random early detection and back pressure
linux-generic does not support random early detection and back pressure
Signed-off-by: Balasubramanian Manoharan <bala.manoharan(a)linaro.org>
Reviewed-by: Nikhil Agarwal <nikhil.agarwal(a)linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/platform/linux-generic/odp_classification.c b/platform/linux-generic/odp_classification.c
index a5cba56a..025f1259 100644
--- a/platform/linux-generic/odp_classification.c
+++ b/platform/linux-generic/odp_classification.c
@@ -190,6 +190,10 @@ int odp_cls_capability(odp_cls_capability_t *capability)
capability->supported_terms.bit.tcp_sport = 1;
capability->supported_terms.bit.sip_addr = 1;
capability->supported_terms.bit.dip_addr = 1;
+ capability->random_early_detection = ODP_SUPPORT_NO;
+ capability->back_pressure = ODP_SUPPORT_NO;
+ capability->threshold_red.all_bits = 0;
+ capability->threshold_bp.all_bits = 0;
return 0;
}
commit a8caa46fbe095a8308538539907e5af664fafea8
Author: Balasubramanian Manoharan <bala.manoharan(a)linaro.org>
Date: Mon Nov 6 23:24:28 2017 +0530
api: classification: add random early detection and back pressure
Adds random early detection and Back pressure feature to CoS
Signed-off-by: Balasubramanian Manoharan <bala.manoharan(a)linaro.org>
Reviewed-by: Nikhil Agarwal <nikhil.agarwal(a)linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/include/odp/api/spec/classification.h b/include/odp/api/spec/classification.h
index 0c4a95c5..16bf3e6e 100644
--- a/include/odp/api/spec/classification.h
+++ b/include/odp/api/spec/classification.h
@@ -20,6 +20,7 @@ extern "C" {
#include <odp/api/packet_io.h>
#include <odp/api/support.h>
+#include <odp/api/threshold.h>
/** @defgroup odp_classification ODP CLASSIFICATION
* Classification operations.
* @{
@@ -107,6 +108,61 @@ typedef union odp_cls_pmr_terms_t {
uint64_t all_bits;
} odp_cls_pmr_terms_t;
+/** Random Early Detection (RED)
+ * Random Early Detection is enabled to initiate a drop probability for the
+ * incoming packet when the packets in the queue/pool cross the specified
+ * threshold values. RED is enabled when 'red_enable' boolean is true and
+ * the resource usage is equal to or greater than the minimum threshold value.
+ * Resource usage could be defined either as the percentage of pool being full
+ * or the number of packets/bytes occupied in the queue depening on the platform
+ * capabilities.
+ * When RED is enabled for a particular flow then further incoming packets are
+ * assigned a drop probability based on the size of the pool/queue.
+ *
+ * Drop probability is configured as follows
+ * * Drop probability is 100%, when resource usage >= threshold.max
+ * * Drop probability is 0%, when resource usage <= threshold.min
+ * * Drop probability is between 0...100 % when resource usage is between
+ * threshold.min and threshold.max
+ *
+ * RED is logically configured in the CoS and could be implemented in either
+ * pool or queue linked to the CoS depending on platform capabilities.
+ * Application should make sure not to link multiple CoS with different RED or
+ * BP configuration to the same queue or pool.
+ */
+typedef struct odp_red_param_t {
+ /** A boolean to enable RED
+ * When true, RED is enabled and configured with RED parameters.
+ * Otherwise, RED parameters are ignored. */
+ odp_bool_t enable;
+
+ /** Threshold parameters for RED
+ * RED is enabled when the resource usage is equal to or greater than
+ * the minimum threshold value and is disabled otherwise
+ */
+ odp_threshold_t threshold;
+} odp_red_param_t;
+
+/** Back pressure (BP)
+ * When back pressure is enabled for a particular flow, the HW can send
+ * back pressure information to the remote peer indicating a network congestion.
+ */
+typedef struct odp_bp_param_t {
+ /** A boolean to enable Back pressure
+ * When true, back pressure is enabled and configured with the BP
+ * parameters. Otherwise BP parameters are ignored.
+ */
+ odp_bool_t enable;
+
+ /** Threshold value for back pressure.
+ * BP is enabled when the resource usage is equal to or greater than the
+ * max backpressure threshold. Min threshold parameters are ignored for
+ * BP configuration.
+ * @see odp_red_param_t for 'resource usage' documentation.
+ */
+ odp_threshold_t threshold;
+} odp_bp_param_t;
+
/**
* Classification capabilities
* This capability structure defines system level classification capability
@@ -135,6 +191,18 @@ typedef struct odp_cls_capability_t {
/** A Boolean to denote support of PMR range */
odp_bool_t pmr_range_supported;
+
+ /** Support for Random Early Detection */
+ odp_support_t random_early_detection;
+
+ /** Supported threshold type for RED */
+ odp_threshold_types_t threshold_red;
+
+ /** Support for Back Pressure to the remote peer */
+ odp_support_t back_pressure;
+
+ /** Supported threshold type for BP */
+ odp_threshold_types_t threshold_bp;
} odp_cls_capability_t;
/**
@@ -206,6 +274,12 @@ typedef struct odp_cls_cos_param {
/** Drop policy associated with CoS */
odp_cls_drop_t drop_policy;
+
+ /** Random Early Detection configuration */
+ odp_red_param_t red;
+
+ /** Back Pressure configuration */
+ odp_bp_param_t bp;
} odp_cls_cos_param_t;
/**
commit a72a1e82ad31d5555c644508d5f35c590b3c4073
Author: Balasubramanian Manoharan <bala.manoharan(a)linaro.org>
Date: Mon Nov 6 23:22:14 2017 +0530
api: threshold: add odp_threshold_t parameter
odp_threshold_t is used to configure different threshold types
Signed-off-by: Balasubramanian Manoharan <bala.manoharan(a)linaro.org>
Reviewed-by: Nikhil Agarwal <nikhil.agarwal(a)linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/include/Makefile.am b/include/Makefile.am
index 4e2d748b..02f9c44a 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -43,6 +43,7 @@ odpapispecinclude_HEADERS = \
odp/api/spec/sync.h \
odp/api/spec/system_info.h \
odp/api/spec/thread.h \
+ odp/api/spec/threshold.h \
odp/api/spec/thrmask.h \
odp/api/spec/ticketlock.h \
odp/api/spec/time.h \
diff --git a/include/odp/api/spec/threshold.h b/include/odp/api/spec/threshold.h
new file mode 100644
index 00000000..38c2430a
--- /dev/null
+++ b/include/odp/api/spec/threshold.h
@@ -0,0 +1,105 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+/**
+ * @file
+ *
+ * ODP threshold descriptor
+ */
+
+#ifndef ODP_API_THRESHOLD_H_
+#define ODP_API_THRESHOLD_H_
+#include <odp/visibility_begin.h>
+#include <odp/api/std_types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Supported threshold types
+ *
+ * Supported threshold types in a bit field structure.
+ */
+typedef union odp_threshold_types_t {
+ /** bitfields for different threshold types */
+ struct {
+ /** Percentage of the total size of pool or queue */
+ uint8_t percent:1;
+
+ /** Total number of all transient packets */
+ uint8_t packet:1;
+
+ /** Total size of all transient packets in bytes */
+ uint8_t bytes:1;
+ };
+
+ /** All bits of the bit field structure */
+ uint8_t all_bits;
+} odp_threshold_types_t;
+
+/**
+ * ODP Threshold types
+ *
+ * Different types of threshold measurements
+ */
+typedef enum odp_threshold_type_t {
+ /** Percentage of the total size of pool or queue */
+ ODP_THRESHOLD_PERCENT,
+
+ /** Total number of all transient packets */
+ ODP_THRESHOLD_PACKET,
+
+ /** Total size of all transient packets in bytes */
+ ODP_THRESHOLD_BYTE
+} odp_threshold_type_t;
+
+/**
+ * ODP Threshold
+ *
+ * Threshold configuration
+ */
+typedef struct odp_threshold_t {
+ /** Type of threshold */
+ odp_threshold_type_t type;
+
+ /** Different threshold types */
+ union {
+ /** Percentage */
+ struct {
+ /** Max percentage value */
+ odp_percent_t max;
+
+ /** Min percentage value */
+ odp_percent_t min;
+ } percent;
+
+ /** Packet count */
+ struct {
+ /** Max packet count */
+ uint64_t max;
+
+ /** Min packet count */
+ uint64_t min;
+ } packet;
+
+ /** Sum of all data bytes of all packets */
+ struct {
+ /** Max byte count */
+ uint64_t max;
+
+ /** Min byte count */
+ uint64_t min;
+ } byte;
+ };
+} odp_threshold_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#include <odp/visibility_end.h>
+#endif
diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am
index 990eb433..8f783463 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -65,6 +65,7 @@ odpapiinclude_HEADERS = \
include/odp/api/sync.h \
include/odp/api/system_info.h \
include/odp/api/thread.h \
+ include/odp/api/threshold.h \
include/odp/api/thrmask.h \
include/odp/api/ticketlock.h \
include/odp/api/time.h \
diff --git a/platform/linux-generic/include/odp/api/threshold.h b/platform/linux-generic/include/odp/api/threshold.h
new file mode 100644
index 00000000..f4f36285
--- /dev/null
+++ b/platform/linux-generic/include/odp/api/threshold.h
@@ -0,0 +1,34 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+/**
+ * @file
+ *
+ * ODP threshold API - platform specific header
+ */
+
+#ifndef ODP_PLAT_THRESHOLD_H_
+#define ODP_PLAT_THRESHOLD_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** @ingroup odp_threshold
+ * @{
+ */
+
+/**
+ * @}
+ */
+
+#include <odp/api/spec/threshold.h>
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
commit 94cea0ca54d4a10f5e46c76d6047422274294aec
Author: Balasubramanian Manoharan <bala.manoharan(a)linaro.org>
Date: Fri Nov 10 16:57:02 2017 +0530
api: std_types: add odp_percent_t data type
odp_percent_t is used to express values which are percentages
Signed-off-by: Balasubramanian Manoharan <bala.manoharan(a)linaro.org>
Reviewed-by: Nikhil Agarwal <nikhil.agarwal(a)linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/include/odp/api/spec/std_types.h b/include/odp/api/spec/std_types.h
index ec6a6df6..9b4f894d 100644
--- a/include/odp/api/spec/std_types.h
+++ b/include/odp/api/spec/std_types.h
@@ -15,6 +15,8 @@
#ifndef ODP_API_STD_TYPES_H_
#define ODP_API_STD_TYPES_H_
#include <odp/visibility_begin.h>
+/* uint64_t, uint32_t, etc */
+#include <stdint.h>
#ifdef __cplusplus
extern "C" {
@@ -31,6 +33,14 @@ extern "C" {
* between e.g. different compilers.
*/
+/**
+ * Percentage type
+ * Use odp_percent_t for specifying fields that are percentages. It is a fixed
+ * point integer whose units are expressed as one-hundredth of a percent.
+ * Hence 100% is represented as integer value 10000.
+ */
+typedef uint32_t odp_percent_t;
+
/**
* @}
*/
-----------------------------------------------------------------------
Summary of changes:
include/Makefile.am | 1 +
include/odp/api/spec/classification.h | 74 +++++++++++++++
include/odp/api/spec/std_types.h | 10 ++
include/odp/api/spec/threshold.h | 105 +++++++++++++++++++++
platform/linux-generic/Makefile.am | 1 +
.../include/odp/api/{chksum.h => threshold.h} | 10 +-
platform/linux-generic/odp_classification.c | 4 +
7 files changed, 200 insertions(+), 5 deletions(-)
create mode 100644 include/odp/api/spec/threshold.h
copy platform/linux-generic/include/odp/api/{chksum.h => threshold.h} (58%)
hooks/post-receive
--