net/pcap: fix registration of timestamp dynamic field
authorOlivier Matz <olivier.matz@6wind.com>
Fri, 13 Nov 2020 10:39:57 +0000 (11:39 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 13 Nov 2020 18:43:27 +0000 (19:43 +0100)
commit28b987c442d5746f75d20f734bfac1f83f52797f
tree8c8dcf4d2dff573eb0b3a2e654e38a01cc6d6aee
parent1c21ee95cf5298fe7b6a8b7d8a997ff3c402a08f
net/pcap: fix registration of timestamp dynamic field

In pcap pmd, the timestamp mbuf dynamic field is mandatory. When the
pcap pmd is created in a secondary process (this is the case for pdump),
it cannot be registered because this is not allowed from a secondary
process.

To ensure that the field is properly registered, do it from probe()
instead of configure(). Indeed, probe() is first invoked on the primary
process when a device is created in a secondary, this enables
registering dynfield from secondary process.

Bugzilla ID: 571
Fixes: d23d73d088c1 ("net/pcap: switch Rx timestamp to dynamic mbuf field")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/pcap/rte_eth_pcap.c