15/10/2020 04:56, Bing Zhao: > From: Thomas Monjalon <tho...@monjalon.net> > > 08/10/2020 14:05, Bing Zhao: > > > +int > > > +rte_eth_hairpin_bind(uint16_t tx_port, uint16_t rx_port) { > > > + struct rte_eth_dev *dev; > > > + int ret; > > > + > > > + RTE_ETH_VALID_PORTID_OR_ERR_RET(tx_port, -EINVAL); > > > > It should be -ENODEV > > Got it, changed. BTW, I checked the ethdev and it seems some functions are > using "EINVAL" and some are using "ENODEV". So should all of these functions > use "ENODEV"?
Yes there is a patch pending to return ENODEV everywhere: https://patches.dpdk.org/patch/80568/