Hi Longfei, I guess you’re doing testing through ldp. That’s fine, but note that currently we’re not recommending it for production deployments.
Having said that, it would be great to improve it, so thanks for bringing up these issues. More inline. > On Mar 23, 2020, at 6:28 AM, dailongfei <dailong...@corp.netease.com> wrote: > > Hi , > > Recently, I use packetdrill to test vpp hoststack(v20.01) , and I find some > problems in vcl: > > 1. When a socket fd is registered with EPOLLIN | EPOLLET using epoll_ctl, if > data arrived , and, I don't call read. The next arriving of data would not > trigger EPOLLIN, which is different from kernel. > FC: Not sure I understand. If a session has data to be read when it’s registered with EPOLLIN, we do create an unhandled event that should be delivered next time epoll_wait is called. If epoll_wait is called and the event is delivered but the app does not call read, then yes, we won’t deliver another EPOLLIN notification. VCL epoll only works in edge-triggered mode, i.e., it delivers an event only once. > 2. In the function of writev , if iovcnt is 0. it will be in endless loop. FC: Does this [1] fix the issue? > > 3. write , send ,sendto , read, recv, recvfrom should set errno EFAULT if > buf is NULL. But in the vcl, the errno is EINVAL. FC: Is that an error reported by packetdrill or by applications? In other words, does it really matter if we return “invalid argument” when buffer or length of buffer is set to 0 as opposed to generating “bad address” when the buffer is 0? > > 4 .In shutdown, the SHUT_RD and SHUT_WR seem don’t work. FC: We do partly emulate these in ldp/vcl but they’re not propagated to vpp because we don’t support them. What sort of issues are you seeing? Regards, Florin [1] https://gerrit.fd.io/r/c/vpp/+/26085 <https://gerrit.fd.io/r/c/vpp/+/26085> > > Regards > Longfei. > > > dailongfei > > dailong...@corp.netease.com > > <https://maas.mail.163.com/dashi-web-extend/html/proSignature.html?ftlId=1&name=dailongfei&uid=dailongfei%40corp.netease.com&iconUrl=https%3A%2F%2Fmail-online.nosdn.127.net%2Fqiyelogo%2FdefaultAvatar.png&items=%5B%22dailongfei%40corp.netease.com%22%5D&logoUrl=https%3A%2F%2Fmail-online.nosdn.127.net%2Fqiyeicon%2F209a2912f40f6683af56bb7caff1cb54.png> > 签名由 网易邮箱大师 <https://mail.163.com/dashi/dlpro.html?from=mail81> 定制 >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#15844): https://lists.fd.io/g/vpp-dev/message/15844 Mute This Topic: https://lists.fd.io/mt/72491376/21656 Mute #hoststack: https://lists.fd.io/mk?hashtag=hoststack&subid=1480452 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-