summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorReshma Pattan <reshma.pattan@intel.com>2018-12-20 12:16:09 +0000
committerCristian Dumitrescu <cristian.dumitrescu@intel.com>2018-12-22 00:22:44 +0100
commit5d3f72100904b5a2fc6b240e1cc10f1c2dd02267 (patch)
tree642152627a4c4e4f99fc6bc208f4accf49bd6848 /examples
parentc712b0132645eff71bbc11fb18659c5775c1d3d7 (diff)
downloaddpdk-next-eventdev-5d3f72100904b5a2fc6b240e1cc10f1c2dd02267.zip
dpdk-next-eventdev-5d3f72100904b5a2fc6b240e1cc10f1c2dd02267.tar.gz
dpdk-next-eventdev-5d3f72100904b5a2fc6b240e1cc10f1c2dd02267.tar.xz
mbuf: implement generic format for sched field
This patch implements the changes proposed in the deprecation notes [1][2]. librte_mbuf changes: The mbuf->hash.sched field is updated to support generic definition in line with the ethdev traffic manager and meter APIs. The new generic format contains: queue ID, traffic class, color. Added public APIs to set and get these new fields to and from mbuf. librte_sched changes: In addtion, following API functions of the sched library have been modified with an additional parameter of type struct rte_sched_port to accommodate the changes made to mbuf sched field. (i)rte_sched_port_pkt_write() (ii) rte_sched_port_pkt_read_tree_path() librte_pipeline, qos_sched UT, qos_sched app are updated to make use of new changes. Also mbuf->hash.txadapter has been added for eventdev txq, rte_event_eth_tx_adapter_txq_set and rte_event_eth_tx_adapter_txq_get() are updated to use mbuf->hash.txadapter.txq. doc: Release notes updated. Removed deprecation notice for mbuf->hash.sched and sched API. [1] http://mails.dpdk.org/archives/dev/2018-February/090651.html [2] https://mails.dpdk.org/archives/dev/2018-November/119051.html Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com> Signed-off-by: Reshma Pattan <reshma.pattan@intel.com> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Acked-by: Olivier Matz <olivier.matz@6wind.com> Tested-by: Nikhil Rao <nikhil.rao@intel.com> Reviewed-by: Nikhil Rao <nikhil.rao@intel.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/qos_sched/app_thread.c7
-rw-r--r--examples/qos_sched/main.c1
2 files changed, 6 insertions, 2 deletions
diff --git a/examples/qos_sched/app_thread.c b/examples/qos_sched/app_thread.c
index a592742..bec4dee 100644
--- a/examples/qos_sched/app_thread.c
+++ b/examples/qos_sched/app_thread.c
@@ -73,8 +73,11 @@ app_rx_thread(struct thread_conf **confs)
for(i = 0; i < nb_rx; i++) {
get_pkt_sched(rx_mbufs[i],
&subport, &pipe, &traffic_class, &queue, &color);
- rte_sched_port_pkt_write(rx_mbufs[i], subport, pipe,
- traffic_class, queue, (enum rte_meter_color) color);
+ rte_sched_port_pkt_write(conf->sched_port,
+ rx_mbufs[i],
+ subport, pipe,
+ traffic_class, queue,
+ (enum rte_meter_color) color);
}
if (unlikely(rte_ring_sp_enqueue_bulk(conf->rx_ring,
diff --git a/examples/qos_sched/main.c b/examples/qos_sched/main.c
index e7c97bd..c0ed16b 100644
--- a/examples/qos_sched/main.c
+++ b/examples/qos_sched/main.c
@@ -55,6 +55,7 @@ app_main_loop(__attribute__((unused))void *dummy)
flow->rx_thread.rx_port = flow->rx_port;
flow->rx_thread.rx_ring = flow->rx_ring;
flow->rx_thread.rx_queue = flow->rx_queue;
+ flow->rx_thread.sched_port = flow->sched_port;
rx_confs[rx_idx++] = &flow->rx_thread;