The difference between sk_err_soft and sk_err

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all.

I read kernel's source, there is sk_err_soft and sk_err ÂinÂstruct sock. this is their comment:

ÂÂ* @sk_err: last error
ÂÂ* @sk_err_soft: errors that don't cause failure but are the cause of a
ÂÂ* Â Â Âpersistent failure not just 'timed out'

this make me confuse, why needÂsk_err_soft?Â

I search linux kernel tree, and find use sk_err_soft Âin ICMP module.

after that in man 2 connect :

EINPROGRESS
ÂÂ Â Â Â Â Â ÂThe socket is nonblocking and the connection cannot be completed immediately. ÂIt is possible to select(2) or Âpoll(2) Âfor Âcompletion Âby
ÂÂ Â Â Â Â Â Âselecting the socket for writing. ÂAfter select(2) indicates writability, use getsockopt(2) to read the SO_ERROR option at level SOL_SOCKET
ÂÂ Â Â Â Â Â Âto determine whether connect() completed successfully (SO_ERROR is zero) or unsuccessfully (SO_ERROR is one of the usual error codes listed
ÂÂ Â Â Â Â Â Âhere, explaining the reason for the failure).

i knowÂSO_ERROR will detectÂsk_err_soft andÂsk_err, Âfurther moreÂthere is not detect sk_err_soft in tcp_poll.ÂÂmy question is why not return EPOLLERR in tcp_poll( detect sk_err_soft).

Thank!


--
åèçå

èç:www.douban.com/people/mustang/

blog: www.pagefault.info

twitter: www.twitter.com/minibobo
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux