verbs_match_ent device field uninitialised with new driver id matching
Hi Jason,0c3cecfe04d (verbs: Use CHARDEV info from netlink to bind drivers) With above commit, device and vendor fields of verbs_match_entry are left unintialised as match_driver_id succeeds always. This has broken user space cxgb4 iwarp as it uses device to get the chipversion. I am sending a patch to fix it in cxgb4 But I wanted to know if device and vendor fields being 0 is as expected.
(gdb) p *(const struct verbs_match_ent *)0x155553d7d0c0 $2 = {
driver_data = 0x0,
u = {
modalias = 0x4 <Address 0x4 out of bounds>,
driver_id = 4 '\004'
},
vendor = 0,
device = 0,
kind = 3 '\003'
}Thanks,
Bharat
Quoted 7 lines · Potnuri Bharat Teja
Hi Jason,
0c3cecfe04d(verbs: Use CHARDEV info from netlink to bind drivers) With above commit,device and vendorfields ofverbs_match_entryare left unintialised asmatch_driver_idsucceeds always. This has broken user space cxgb4 iwarp as it usesdeviceto get the chipversion. I am sending a patch to fix it in cxgb4 But I wanted to know if device and vendor fields being 0 is as expected.
Yes, only PCI matches use these fields, all other match types have them as zero.
Jason