[dpdk-dev] [PATCH 7/7] examples/eventdev_pipeline: adding example

2016-11-16 Thread Harry van Haaren
; + } + if (start_time == 0) + start_time = rte_get_timer_cycles(); + + received += n; + for (i = 0; i < n; i++) { + uint8_t outport = events[i].mbuf->port; +

[dpdk-dev] [PATCH] [RFC] Elastic Flow Distributor

2016-10-20 Thread Pablo de Lara
The following RFC shows the functionality and usage overview of the new Elastic Flow Distributor (EFD) library. Library code is included in the RFC (implemention in progress, API complete), with a sample application to demonstrate the usage of the library, based on the existing server/client

[dpdk-dev] [PATCH 1/2] examples/l2fwd: Add new option to enable/disable MAC addresses tweaking

2016-07-26 Thread Maxime Coquelin
r; + + dst_port = l2fwd_dst_ports[portid]; + + if (mac_tweaking) + l2fwd_mac_tweaking(m, dst_port); buffer = tx_buffer[dst_port]; sent = rte_eth_tx_buffer(dst_port, 0, buffer, m); @@ -322,7 +334,11 @@ l2fwd_usage(const char *prgname) printf("%s [E

[dpdk-dev] [PATCH] examples: add a new example for link reset

2016-06-08 Thread Ananyev, Konstantin
;\nPackets received: %20"PRIu64 > +"\nPackets dropped: %21"PRIu64, > +portid, > +port_statistics[portid].tx, > +port_statistics[portid].rx, > +port_statistics[portid]

[dpdk-dev] [PATCH] examples: add a new example for link reset

2016-06-06 Thread Wenzhuo Lu
ned dst_port; + int sent; + struct rte_eth_dev_tx_buffer *buffer; + + dst_port = l2fwd_dst_ports[portid]; + eth = rte_pktmbuf_mtod(m, struct ether_hdr *); + + /* 02:00:00:00:00:xx */ + tmp = >d_addr.addr_bytes[0]; + *((uint64_t *)tmp) = 0x0002 + ((uint64_t)dst_port

[dpdk-dev] [PATCH v4 2/2] examples: rework to use buffered tx

2016-03-10 Thread Tomasz Kulasek
The internal buffering of packets for TX in sample apps is no longer needed, so this patchset also replaces this code with calls to the new rte_eth_tx_buffer* APIs in: * l2fwd-jobstats * l2fwd-keepalive * l2fwd * l3fwd-acl * l3fwd-power * link_status_interrupt * client_server_mp * l2fwd_fork

[dpdk-dev] [PATCH v4 1/2] ethdev: add buffered tx api

2016-03-10 Thread Tomasz Kulasek
* rte_eth_tx_buffer - buffer up a single packet for future transmission * rte_eth_tx_buffer_flush - flush any unsent buffered packets * rte_eth_tx_buffer_set_err_callback - set up a callback to be called in case transmitting a buffered burst fails. By default, we just free the unsent packets. As well

[dpdk-dev] [PATCH v4 0/2] add support for buffered tx to ethdev

2016-03-10 Thread Tomasz Kulasek
* rte_eth_tx_buffer - buffer up a single packet for future transmission * rte_eth_tx_buffer_flush - flush any unsent buffered packets * rte_eth_tx_buffer_set_err_callback - set up a callback to be called in case transmitting a buffered burst fails. By default, we just free the unsent packets. As well

[dpdk-dev] [PATCH v3 0/2] add support for buffered tx to ethdev

2016-03-10 Thread Jastrzebski, MichalX K
are: > > * rte_eth_tx_buffer_init - initialize buffer > > * rte_eth_tx_buffer - buffer up a single packet for future transmission > > * rte_eth_tx_buffer_flush - flush any unsent buffered packets > > * rte_eth_tx_buffer_set_err_callback - set up a callback to be called in > > case tr

[dpdk-dev] [PATCH v3 2/2] examples: rework to use buffered tx

2016-03-10 Thread Tomasz Kulasek
The internal buffering of packets for TX in sample apps is no longer needed, so this patchset also replaces this code with calls to the new rte_eth_tx_buffer* APIs in: * l2fwd-jobstats * l2fwd-keepalive * l2fwd * l3fwd-acl * l3fwd-power * link_status_interrupt * client_server_mp * l2fwd_fork

[dpdk-dev] [PATCH v3 1/2] ethdev: add buffered tx api

2016-03-10 Thread Tomasz Kulasek
* rte_eth_tx_buffer - buffer up a single packet for future transmission * rte_eth_tx_buffer_flush - flush any unsent buffered packets * rte_eth_tx_buffer_set_err_callback - set up a callback to be called in case transmitting a buffered burst fails. By default, we just free the unsent packets. As well

[dpdk-dev] [PATCH v3 0/2] add support for buffered tx to ethdev

2016-03-10 Thread Tomasz Kulasek
* rte_eth_tx_buffer - buffer up a single packet for future transmission * rte_eth_tx_buffer_flush - flush any unsent buffered packets * rte_eth_tx_buffer_set_err_callback - set up a callback to be called in case transmitting a buffered burst fails. By default, we just free the unsent packets. As well

[dpdk-dev] [PATCH v3 0/2] add support for buffered tx to ethdev

2016-03-10 Thread Ananyev, Konstantin
initialize buffer > * rte_eth_tx_buffer - buffer up a single packet for future transmission > * rte_eth_tx_buffer_flush - flush any unsent buffered packets > * rte_eth_tx_buffer_set_err_callback - set up a callback to be called in > case transmitting a buffered burst fails. By defaul

[dpdk-dev] [PATCH v2 1/2] ethdev: add buffered tx api

2016-03-09 Thread Thomas Monjalon
> > > > > > It is handling an idle case so there is no gain obviously. > > > > > > But the condition branching is surely a loss. > > > > > > > > > > I suppose that condition should always be checked: > > > > > eithe

[dpdk-dev] [PATCH v2 1/2] ethdev: add buffered tx api

2016-03-09 Thread Thomas Monjalon
ser. > > > > > > > > It is handling an idle case so there is no gain obviously. > > > > But the condition branching is surely a loss. > > > > > > I suppose that condition should always be checked: > > > either in user code prior t

[dpdk-dev] [PATCH v2 1/2] ethdev: add buffered tx api

2016-03-09 Thread Thomas Monjalon
ser. > > > > > > > > It is handling an idle case so there is no gain obviously. > > > > But the condition branching is surely a loss. > > > > > > I suppose that condition should always be checked: > > > either in user code prior t

[dpdk-dev] [PATCH v2 1/2] ethdev: add buffered tx api

2016-03-09 Thread Thomas Monjalon
on call or inside the > function call itself. > So don't expect any difference in performance here... > Do you have any particular example when you think it would? > Or are you talking about rte_eth_tx_buffer() calling > rte_eth_tx_buffer_flush() internally? > For that one -

[dpdk-dev] [PATCH v2 1/2] ethdev: add buffered tx api

2016-03-09 Thread Ananyev, Konstantin
ause of that - > > > > > > just seems a bit more convenient to the user. > > > > > > > > > > It is handling an idle case so there is no gain obviously. > > > > > But the condition branching is surely a loss. > > > &

[dpdk-dev] [PATCH v2 1/2] ethdev: add buffered tx api

2016-03-09 Thread Ananyev, Konstantin
ose that condition should always be checked: > > either in user code prior to function call or inside the > > function call itself. > > So don't expect any difference in performance here... > > Do you have any particular example when you think it would? > > Or

[dpdk-dev] [PATCH v2 1/2] ethdev: add buffered tx api

2016-03-09 Thread Kulasek, TomaszX
ose that condition should always be checked: > > either in user code prior to function call or inside the function call > > itself. > > So don't expect any difference in performance here... > > Do you have any particular example when you think it would? > > Or are you ta

[dpdk-dev] [PATCH v2 1/2] ethdev: add buffered tx api

2016-03-09 Thread Ananyev, Konstantin
there is no gain obviously. > But the condition branching is surely a loss. I suppose that condition should always be checked: either in user code prior to function call or inside the function call itself. So don't expect any difference in performance here... Do you have any particular examp

[dpdk-dev] [PATCH v2 1/2] ethdev: add buffered tx api

2016-03-09 Thread Ananyev, Konstantin
+ * Structure used to buffer packets for future TX > > + * Used by APIs rte_eth_tx_buffer and rte_eth_tx_buffer_flush > > + */ > > +struct rte_eth_dev_tx_buffer { > > + unsigned nb_pkts; > > What about "length"? > Why is it unsigned and the size is uint

[dpdk-dev] [PATCH v2 1/2] ethdev: add buffered tx api

2016-03-08 Thread Thomas Monjalon
d by APIs rte_eth_tx_buffer and rte_eth_tx_buffer_flush > + */ > +struct rte_eth_dev_tx_buffer { > + unsigned nb_pkts; What about "length"? Why is it unsigned and the size is uint16_t? > + uint64_t errors; > + /**< Total number of queue packets to sent that a

[dpdk-dev] [PATCH v2 0/2] add support for buffered tx to ethdev

2016-02-25 Thread Ananyev, Konstantin
e-packet-at-a-time > operation. Since this is such a common paradigm, this functionality is > better suited to being implemented in the ethdev API. > > The new APIs in the ethdev library are: > * rte_eth_tx_buffer_init - initialize buffer > * rte_eth_tx_buffer - buffer up a s

[dpdk-dev] [PATCH v2 2/2] examples: rework to use buffered tx api

2016-02-24 Thread Tomasz Kulasek
The internal buffering of packets for TX in sample apps is no longer needed, so this patchset also replaces this code with calls to the new rte_eth_tx_buffer* APIs in: * l2fwd-jobstats * l2fwd-keepalive * l2fwd * l3fwd-acl * l3fwd-power * link_status_interrupt * client_server_mp * l2fwd_fork

[dpdk-dev] [PATCH v2 1/2] ethdev: add buffered tx api

2016-02-24 Thread Tomasz Kulasek
* rte_eth_tx_buffer - buffer up a single packet for future transmission * rte_eth_tx_buffer_flush - flush any unsent buffered packets * rte_eth_tx_buffer_set_err_callback - set up a callback to be called in case transmitting a buffered burst fails. By default, we just free the unsent packets. As well

[dpdk-dev] [PATCH v2 0/2] add support for buffered tx to ethdev

2016-02-24 Thread Tomasz Kulasek
* rte_eth_tx_buffer - buffer up a single packet for future transmission * rte_eth_tx_buffer_flush - flush any unsent buffered packets * rte_eth_tx_buffer_set_err_callback - set up a callback to be called in case transmitting a buffered burst fails. By default, we just free the unsent packets. As well

[dpdk-dev] [PATCH 1/2] ethdev: add buffered tx api

2016-02-09 Thread Ananyev, Konstantin
; another people can be interested in having (or not) one or second feature Such division seems a bit artificial to me :) You are making changes in rte_ethdev.[c,h] - I think that filed regrouping would make code cleaner and easier to read/maintain. > > Even for bug tracking it wil

[dpdk-dev] [PATCH 1/2] ethdev: add buffered tx api

2016-02-09 Thread Kulasek, TomaszX
pmd developers), so another people can be interested in having (or not) one or second feature Even for bug tracking it will be cleaner to separate these two things. And yes, it is logical to unite it, maybe also for rx queues, but should be discussed separately. I've made a prototype with th

[dpdk-dev] [PATCH 1/2] ethdev: add buffered tx api

2016-02-02 Thread Ananyev, Konstantin
queues, Separate array of queue states, you are going to add separate array of tx buffers. For me it seems logical to unite all these 3 fields into one sub-struct. > > > > > +/** > > > + * @internal > > > + * Structure used to buffer packets for future TX

[dpdk-dev] [PATCH 1/2] ethdev: add buffered tx api

2016-02-02 Thread Kulasek, TomaszX
> Introducing such a struct will require a huge rework of pmd drivers. I don't think it's worth only for this one feature. > > +/** > > + * @internal > > + * Structure used to buffer packets for future TX > > + * Used by APIs rte_eth_tx_buffer and rte_eth_tx_buffer_flush */ > > +

[dpdk-dev] [PATCH 1/2] ethdev: add buffered tx api

2016-01-15 Thread Ananyev, Konstantin
Corporation. All rights reserved. > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > @@ -182,6 +182,7 @@ extern "C" { > #include > #include > #include > +#include > #include "rte_ether.h"

[dpdk-dev] [PATCH 2/2] examples: sample apps rework to use buffered tx api

2016-01-15 Thread Tomasz Kulasek
The internal buffering of packets for TX in sample apps is no longer needed, so this patchset replaces this code with calls to the new rte_eth_tx_buffer* APIs in: * l2fwd-jobstats * l2fwd-keepalive * l2fwd * l3fwd-acl * l3fwd-power * link_status_interrupt * client_server_mp * l2fwd_fork

[dpdk-dev] [PATCH 1/2] ethdev: add buffered tx api

2016-01-15 Thread Tomasz Kulasek
Many sample apps include internal buffering for single-packet-at-a-time operation. Since this is such a common paradigm, this functionality is better suited to being inside the core ethdev API. The new APIs in the ethdev library are: * rte_eth_tx_buffer - buffer up a single packet for future

[dpdk-dev] [PATCH 0/2] add support for buffered tx to ethdev

2016-01-15 Thread Tomasz Kulasek
Many sample apps include internal buffering for single-packet-at-a-time operation. Since this is such a common paradigm, this functionality is better suited to being inside the core ethdev API. The new APIs in the ethdev library are: * rte_eth_tx_buffer - buffer up a single packet for future

[dpdk-dev] [PATCH 0/2] add support for buffered tx to ethdev

2016-01-15 Thread Stephen Hemminger
hdev library are: > * rte_eth_tx_buffer - buffer up a single packet for future transmission > * rte_eth_tx_buffer_flush - flush any unsent buffered packets > * rte_eth_tx_buffer_set_err_callback - set up a callback to be called in > case transmitting a buffered burst fails.

[dpdk-dev] [PATCH 2/2] examples: sample apps rework to use buffered tx api

2016-01-15 Thread Tomasz Kulasek
ek at intel.com> The internal buffering of packets for TX in sample apps is no longer needed, so this patchset replaces this code with calls to the new rte_eth_tx_buffer* APIs in: * l2fwd-jobstats * l2fwd-keepalive * l2fwd * l3fwd-acl * l3fwd-power * link_status_interrupt * client_serve

[dpdk-dev] [PATCH 1/2] ethdev: add buffered tx api

2016-01-15 Thread Tomasz Kulasek
ek at intel.com> Many sample apps include internal buffering for single-packet-at-a-time operation. Since this is such a common paradigm, this functionality is better suited to being inside the core ethdev API. The new APIs in the ethdev library are: * rte_eth_tx_buffer - buffer up a single

[dpdk-dev] [PATCH 0/2] add support for buffered tx to ethdev

2016-01-15 Thread Tomasz Kulasek
better suited to being inside the core ethdev API. The new APIs in the ethdev library are: * rte_eth_tx_buffer - buffer up a single packet for future transmission * rte_eth_tx_buffer_flush - flush any unsent buffered packets * rte_eth_tx_buffer_set_err_callback - set up a callback to be

[dpdk-dev] [RFC PATCH DRAFT 1/2] ethdev: add buffered single pkt TX function to API

2014-06-25 Thread Richardson, Bruce
thdev API. > > The new APIs include three functions: > > * rte_eth_tx_buffer - buffer up a single packet for future transmission > > * rte_eth_tx_buffer_flush - flush any unsent buffered packets > > * rte_eth_tx_buffer_set_err_callback - set up a callback to be called

[dpdk-dev] [RFC PATCH DRAFT 2/2] l2fwd: update l2fwd to use tx_buffer API

2014-06-25 Thread Bruce Richardson
The internal buffering of packets for TX done in l2fwd is no longer needed, so replace this code with calls to the new rte_eth_tx_buffer* APIs. --- examples/l2fwd/main.c | 61 ++- 1 file changed, 7 insertions(+), 54 deletions(-) diff --git

[dpdk-dev] [RFC PATCH DRAFT 1/2] ethdev: add buffered single pkt TX function to API

2014-06-25 Thread Bruce Richardson
Many sample apps include internal buffering for single-packet-at-a-time operation. Since this is such a common paradigm, this functionality is better suited to being inside the core ethdev API. The new APIs include three functions: * rte_eth_tx_buffer - buffer up a single packet for future