net device state analysis from vmcore

net device state analysis from vmcore

 

1. crash7lates> net
   NET_DEVICE     NAME   IP ADDRESS(ES)
ffff881ff183f000  lo     127.0.0.1
ffff881ff0480000  eth0   192.168.4.3
ffff881ff0640000  eth1
ffff883ff0460000  eth2
ffff883ff04e0000  eth3
ffff881fee711000  usb0   169.254.182.77
ffff881ff2bd4000  ib0
ffff881faa672000  ib1
ffff883fed811000  bond0
ffff881fee6a6000  bond1  192.168.40.3
ffff881ff12b8000  eth5B
ffff881f9f988000  eth7B
ffff881ff1220000  eth5
ffff881ff11a0000  eth7
ffff881fef1b0000  eth4B
ffff881f9d358000  eth6B
ffff881f9a86c000  eth6
ffff881f98978000  eth4
ffff883fedec7000  bond2  138.3.12.46, 138.3.12.48

 

2. We want to check eth4.

 

1)eth4
crash7lates> struct net_device ffff881f98978000 | grep state
  state = 6,
  operstate = 2 '\002',
  reg_state = NETREG_REGISTERED,
  rtnl_link_state = RTNL_LINK_INITIALIZED,
      state_initialized = 1,
      state_in_sysfs = 1,
      state_add_uevent_sent = 1,
      state_remove_uevent_sent = 0,
      power_state = {
crash7lates> eval 6
hexadecimal: 6
    decimal: 6
      octal: 6
     binary: 0000000000000000000000000000000000000000000000000000000000000110
struct net_device member state has the followings:

 

/* These flag bits are private to the generic network queueing
 * layer, they may not be explicitly referenced by any other
 * code.
 */

 

enum netdev_state_t {
        __LINK_STATE_START,
        __LINK_STATE_PRESENT,
        __LINK_STATE_NOCARRIER,
        __LINK_STATE_LINKWATCH_PENDING,
        __LINK_STATE_DORMANT,
};

 

From the above, we can find __LINK_STATE_PRESENT & __LINK_STATE_NOCARRIER exist in state.

 

Now we check priv state and flag.

 

crash7lates> eval 0x840 + ffff881f98978000
hexadecimal: ffff881f98978840
    decimal: 18446612268018272320  (-131805691279296)
      octal: 1777774201763045704100
     binary: 1111111111111111100010000001111110011000100101111000100001000000
crash7lates> struct xve_dev_priv ffff881f98978840
...
  flags = 2696,
  state = 131080,
...

 

crash7lates> eval 2696
hexadecimal: a88
    decimal: 2696
      octal: 5210
     binary: 0000000000000000000000000000000000000000000000000000101010001000
struct xve_dev_priv member flags has the followings:

 

enum {
        XVE_FLAG_OPER_UP = 0,
        XVE_FLAG_INITIALIZED = 1,
        XVE_FLAG_ADMIN_UP = 2,
        XVE_PKEY_ASSIGNED = 3,
        XVE_PKEY_STOP = 4,
        XVE_IB_DEV_OPEN = 5,
        XVE_MCAST_RUN = 6,
        XVE_STOP_REAPER = 7,
        XVE_FLAG_ADMIN_CM = 9,
        XVE_FLAG_UMCAST = 10,
        XVE_FLAG_CSUM = 11,
        XVE_MCAST_RUN_GC = 12,
        XVE_FLAG_ADVERT_JOIN = 13,
        XVE_FLAG_IB_EVENT = 14,
        XVE_FLAG_DONT_DETACH_MCAST = 15,
        XVE_MAX_BACKOFF_SECONDS = 16,
        XVE_DRAIN_IN_PROGRESS = 17,
};

 

So XVE_PKEY_ASSIGNED & XVE_STOP_REAPER & XVE_FLAG_ADMIN_CM & XVE_FLAG_CSUM exist in flags.
XVE_FLAG_ADMIN_UP does not exist in flags.

 

struct xve_dev_priv member state has the followings:
...
#define XVE_OS_ADMIN_UP         2
#define XVE_OPER_UP                     9
...

 

crash7lates> eval 131080
hexadecimal: 20008
    decimal: 131080
      octal: 400010
     binary: 0000000000000000000000000000000000000000000000100000000000001000

 

XVE_OS_ADMIN_UP & XVE_OPER_UP do not exist in state.

So when the bug occurred, eth4 was down.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

mounter625

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值