• Mina Almasry's avatar
    netdev: add dmabuf introspection · d0caf987
    Mina Almasry authored
    Add dmabuf information to page_pool stats:
    
    $ ./cli.py --spec ../netlink/specs/netdev.yaml --dump page-pool-get
    ...
     {'dmabuf': 10,
      'id': 456,
      'ifindex': 3,
      'inflight': 1023,
      'inflight-mem': 4190208},
     {'dmabuf': 10,
      'id': 455,
      'ifindex': 3,
      'inflight': 1023,
      'inflight-mem': 4190208},
     {'dmabuf': 10,
      'id': 454,
      'ifindex': 3,
      'inflight': 1023,
      'inflight-mem': 4190208},
     {'dmabuf': 10,
      'id': 453,
      'ifindex': 3,
      'inflight': 1023,
      'inflight-mem': 4190208},
     {'dmabuf': 10,
      'id': 452,
      'ifindex': 3,
      'inflight': 1023,
      'inflight-mem': 4190208},
     {'dmabuf': 10,
      'id': 451,
      'ifindex': 3,
      'inflight': 1023,
      'inflight-mem': 4190208},
     {'dmabuf': 10,
      'id': 450,
      'ifindex': 3,
      'inflight': 1023,
      'inflight-mem': 4190208},
     {'dmabuf': 10,
      'id': 449,
      'ifindex': 3,
      'inflight': 1023,
      'inflight-mem': 4190208},
    
    And queue stats:
    
    $ ./cli.py --spec ../netlink/specs/netdev.yaml --dump queue-get
    ...
    {'dmabuf': 10, 'id': 8, 'ifindex': 3, 'type': 'rx'},
    {'dmabuf': 10, 'id': 9, 'ifindex': 3, 'type': 'rx'},
    {'dmabuf': 10, 'id': 10, 'ifindex': 3, 'type': 'rx'},
    {'dmabuf': 10, 'id': 11, 'ifindex': 3, 'type': 'rx'},
    {'dmabuf': 10, 'id': 12, 'ifindex': 3, 'type': 'rx'},
    {'dmabuf': 10, 'id': 13, 'ifindex': 3, 'type': 'rx'},
    {'dmabuf': 10, 'id': 14, 'ifindex': 3, 'type': 'rx'},
    {'dmabuf': 10, 'id': 15, 'ifindex': 3, 'type': 'rx'},
    Suggested-by: default avatarJakub Kicinski <kuba@kernel.org>
    Signed-off-by: default avatarMina Almasry <almasrymina@google.com>
    Reviewed-by: default avatarJakub Kicinski <kuba@kernel.org>
    Link: https://patch.msgid.link/20240910171458.219195-14-almasrymina@google.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    d0caf987
netdev-genl.c 21.8 KB