why use INP_WLOCK instead of INP_RLOCK



Hi All,

I am not sure if anybody has asked it before. I could not find answer by
doing rough search on Internet, if it is duplicate question, sorry in
advance.

My question is that, for getting socket options in tcp_ctloutput() in
tcp_usrreq.c, why do we need to do lock with INP_WLOCK(inp) as setting
socket options does. Why do we just use INP_RLOCK(inp), as it looks not
changing anything in tcp control block?

Thank you for your kindly answer.

Jim
_______________________________________________
freebsd-net@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: why use INP_WLOCK instead of INP_RLOCK
    ... socket options does. ... changing anything in tcp control block? ... I also have a large pending patchset adding connection group support, and aligning software lookup tables with hardware work distribution via RSS, which is due to go in before 9.0. ...
    (freebsd-net)
  • Re: why use INP_WLOCK instead of INP_RLOCK
    ... why do we need to do lock with INP_WLOCKas setting ... socket options does. ... changing anything in tcp control block? ...
    (freebsd-net)