Date: Mon, 09 Aug 2021 08:54:11 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 256952] kqueue(2): Improve epoll Linux compatibility (compat/linux/linux_event) Message-ID: <bug-256952-227-qhp8W3LR80@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-256952-227@https.bugs.freebsd.org/bugzilla/> References: <bug-256952-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D256952 --- Comment #5 from Vico <vico13.chen@gmail.com> --- Comment on attachment 227028 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D227028 note_hup.patch Hi Vladimir, I have several questions: 1. For 'LINUX_EPOLL_EVRD', it is defined only as =E2=80=9CLINUX_EPOLLIN|LINUX_EPOLLRDNORM". If the user call epoll with only "EPOLLRDHUP", then filter will be no actions. 2. The Linux behavior for Linux are: a.If both sender and receiver are shutdown, Linux reports 'EPOLLHUP | EPOLLRDHUP | EPOLLRDNORM | EPOLLIN' b.If only receiver is shutdown, Linux reports 'EPOLLRDHUP | EPOLLRDNORM= | EPOLLIN'. c. For EPOLL error, Linux reports it with other epoll events but not re= port epoll error only once error detected. d. LINUX_EPOLLERR and LINUX_EPOLLHUP are always in EPOLL mask. For this patch, based on Linux behavior a) and b), EPOLLRDNORM is missed for socket.=20 3. No masks for this patch. For example, if the applications only request EPOLLHUP, but EPOLLIN is detected, the applicaiton will be waken up and cat= ch EPOLLIN. It is better to design a generic framework to handle all cases to match Lin= ux behavior. And let each module to handle its own EPOLL events, for example, socket knows its own epoll behavior, and pipe knows its own epoll behavior,= and epoll_to_kevent is a generic handling. Please refer https://reviews.freebsd.org/D31037, as someone has concerns to introduce pevent and pmask in kevent structure. Coudl you please help clari= fy the issue? --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-256952-227-qhp8W3LR80>