Mason wrote:
The STB can now process 2.4 million packets in 5 minutes, which
corresponds to 97.8 Mbps.
Good news! Although (as I said before), some things might not work, yet,
with PBUF_REF used for RX packets.
I'm trying to optimize this a bit further, first by attacking
the memcpy for rxapp.
Up to this point, I'd been using the BSD socket API in rxapp
with the following code (error-handling removed).
Interesting that RxTask still uses more CPU time than rxapp although it
should be rxapp that copies (RxTask should now be zero copy, right?).
Maybe the reason is that RxTask sends the ACK packets, too.
I tried using the Netconn API because I thought it didn't
force a memcpy (is that correct?), but I can't get it to work.
Yes, that's correct. From your example, I guess you're running out of
netbufs: if netconn_recv returns success, it passes you a netbuf (the RX
data) and it's up to your application to free the buffer when you're
done with it.
struct netconn *conn = netconn_new( NETCONN_TCP );
netconn_bind(conn, IP_ADDR_ANY, 44044);
netconn_listen(conn);
while ( 1 )
{
struct netconn *foo;
netconn_accept(conn,&foo);
while ( 1 )
{
struct netbuf *buf;
err = netconn_recv(foo,&buf);
if (err) { printf("recv=%d\n", err); break; }
--> Add netbuf_free(buf); here
}
netconn_delete(foo);
}
Simon
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users