On 22 June 2015 at 18:53, Zoltan Kiss <[email protected]> wrote:

>
>
> On 09/06/15 13:52, Savolainen, Petri (Nokia - FI/Espoo) wrote:
>
>> --- a/example/packet/odp_pktio.c
>>> >+++ b/example/packet/odp_pktio.c
>>> >@@ -282,9 +282,17 @@ static void *pktio_ifburst_thread(void *arg)
>>> >                       /* Drop packets with errors */
>>> >                       pkts_ok = drop_err_pkts(pkt_tbl, pkts);
>>> >                       if (pkts_ok > 0) {
>>> >+                              int sent;
>>> >+
>>> >                               /* Swap Eth MACs and IP-addrs */
>>> >                               swap_pkt_addrs(pkt_tbl, pkts_ok);
>>> >-                              odp_pktio_send(pktio, pkt_tbl, pkts_ok);
>>> >+                              sent = odp_pktio_send(pktio, pkt_tbl,
>>> pkts_ok);
>>> >+                              if (odp_unlikely(sent < pkts_ok)) {
>>> >+                                      err_cnt += pkts_ok - sent;
>>> >+                                      do
>>> >+
>>> odp_packet_free(pkt_tbl[sent]);
>>> >+                                      while (++sent < pkts_ok);
>>> >+                              }
>>>
>> Instead of dropping right away, application could retry couple of times
>> (to demonstrate that congestion is part of normal operation).
>>
>
> I think that should be introduced in a separate patch. This one just tries
> to fix a bug, not introducing a new feature.
>
Agree.


>
> Zoli
> _______________________________________________
> lng-odp mailing list
> [email protected]
> https://lists.linaro.org/mailman/listinfo/lng-odp
>
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to