Skip to contentSkip to conversation

verbs_match_ent device field uninitialised with new driver id matching

DISCUSSION Potnuri Bharat Teja 2 participants 2 messages Jul 25, 2019 InfiniBand

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
Quoted 7 lines · Potnuri Bharat Teja

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.

Yes, only PCI matches use these fields, all other match types have them as zero.

Jason