On Thu, Mar 11, 2021 at 08:57:08PM -0800, Jiang Wang . wrote: > Hi Michael, > > Sorry for the late reply. I just saw your email yesterday somehow. > > I read the email thread you mentioned, and I think the issue with > dgram is that it may drop packets because the sender cannot track the > tx_cnt with subtracting it from peer_fwd_cnt. > > I agree with Stefan that the dgram is a best-effort service and may > drop packets. For the sender, I just add a maximum buffer size to > limit the memory usage. On the receiving side, I reuse the existing > virtio_transport_inc_rx_pkt() that Stefano added a year ago to limit > the memory usage. This will avoid denial of service attack to the > other end (host or guest VM). > > For the application of dgram, we will use it for some remote logging > application. The application running in the VM will write some logs to > a server running on the host. This is one way communication and the > log is not critical. > > Regards, > > Jiang To make things short, please submit to the virtio TC a spec patch documenting how is dgram supposed to work and we'll discuss. The existing mechanism was designed with a stream socket in mind. dgram is best-effort but some fairness could be a quality of implementation issue. I appreciate that your specific application might not care about such concerns but we do need to worry about building a widely reuseable interface as opposed to a very narrow one. -- MST _______________________________________________ Virtualization mailing list Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linuxfoundation.org/mailman/listinfo/virtualization