On Thu, Oct 29, 2015 at 02:54:59PM +0300, Maxim Uvarov wrote: > On 10/28/2015 22:29, Stuart Haslam wrote: > >Replace the nm_inject() helper with our own version so that > >odp_packet_copydata_out() can be used as this understands segmented > >packets. > > > >Signed-off-by: Stuart Haslam <[email protected]> > >--- > > platform/linux-generic/pktio/netmap.c | 59 > > ++++++++++++++++++++++++++++++++--- > > 1 file changed, 54 insertions(+), 5 deletions(-) > > > >diff --git a/platform/linux-generic/pktio/netmap.c > >b/platform/linux-generic/pktio/netmap.c > >index 7d47fc1..d72af3d 100644 > >--- a/platform/linux-generic/pktio/netmap.c > >+++ b/platform/linux-generic/pktio/netmap.c > >@@ -268,32 +268,81 @@ static int netmap_recv(pktio_entry_t *pktio_entry, > >odp_packet_t pkt_table[], > > return args.nb_rx; > > } > >+static struct netmap_ring *netmap_tx_ring(struct nm_desc *d) > >+{ > >+ unsigned c, n = d->last_tx_ring - d->first_tx_ring + 1; > >+ > >+ for (c = 0; c < n ; c++) { > why c and not i as everywhere? Also can n be some read friendly > name, like num_rings? > > Maxim.
OK. This started out as a copy of nm_inject() and the variable names initially came from there. -- Stuart. _______________________________________________ lng-odp mailing list [email protected] https://lists.linaro.org/mailman/listinfo/lng-odp
