OSDN Git Service

af_packet: refactoring code for prb_calc_retire_blk_tmo
authorMao Wenan <maowenan@huawei.com>
Mon, 23 Dec 2019 10:42:57 +0000 (18:42 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 26 Dec 2019 23:19:59 +0000 (15:19 -0800)
commit0914d2bb11cc182039084ac3b961dc359b647468
tree91384b24bde79137393de9231c976c4b24795d33
parent9476654bd5e8ad42abe8ee9f9e90069ff8e60c17
af_packet: refactoring code for prb_calc_retire_blk_tmo

If __ethtool_get_link_ksettings() is failed and with
non-zero value, prb_calc_retire_blk_tmo() should return
DEFAULT_PRB_RETIRE_TOV firstly.

This patch is to refactory code and make it more readable.

Signed-off-by: Mao Wenan <maowenan@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/packet/af_packet.c