summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorZhu Lingshan <lszhu@suse.com>2018-05-02 06:13:39 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2018-05-08 08:52:49 +0300
commit0e5aee393956f14b82c42486aefc327ba594ca60 (patch)
tree1f6badbe611fb70a196d11e9d3fa53b599578816 /tools/perf/scripts/python/export-to-sqlite.py
parent9899e4d3523faaef17c67141aa80ff2088f17871 (diff)
downloadlinux-0e5aee393956f14b82c42486aefc327ba594ca60.tar.xz
scsi: tcmu: add new netlink events helpers
Add new netlink events helpers tcmu_netlink_event_init() and tcmu_netlink_event_send(). These new functions intend to replace existing netlink events helper function tcmu_netlink_event(). The existing function tcmu_netlink_event() works well for events like TCMU_ADDED_DEVICE and TCMU_REMOVED_DEVICE which only has one netlink attribute. But if there is a command requires more than one attributes to send out, we have to use a struct to adapt the paremeter reconfig_data, it is hard to use one struct or a union in one struct to adapt every command with different attributes, it may get long and ugly. With the new two functions, we can call tcmu_netlink_event_init() to initialize a netlink event, then add all attributes we need by using nla_put_xxx(), at last use tcmu_netlink_event_send() to send it out. So that we don't need to use a long struct or union if we want to send mulitple attributes for different commands. [mkp: typos] Signed-off-by: Zhu Lingshan <lszhu@suse.com> Acked-by: Mike Christie <mchristi@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions