[dpdk-dev] [PATCH v2 3/6] net/pcap: move OS-dependent code to separate files
Dmitry Kozlyuk
dmitry.kozliuk at gmail.com
Thu Feb 25 17:05:00 CET 2021
2021-02-25 14:51, Ferruh Yigit:
> On 2/14/2021 2:16 AM, Dmitry Kozlyuk wrote:
> > PCAP PMD queries interface information differently for Linux and
> > FreeBSD, OS-specific code is guarded by #ifdef. In preparation to add
> > Windows-specific part and libpcap wrapper, extract OS-independent
> > interface and move implementations to separate files. Rename
> > rte_eth_pcap.c to pcap_ethdev.c for consistency with the rest of DPDK.
> >
> > Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk at gmail.com>
>
> <...>
>
> > +int
> > +osdep_iface_index_get(const char *name)
> > +{
> > + return if_nametoindex(name);
> > +}
>
>
> The 'osdep_iface_index_get' wrapper is not required for this patch and can be
> done in patch 6/6, but OK to have here to make the switch clear.
Yes, it was my intention to keep Windows patches separate.
More information about the dev
mailing list