[dpdk-dev] [PATCH 2/3] net/af_packet: add accessor for iface

Charles (Chas) Williams ciwillia at brocade.com
Mon May 22 15:20:52 CEST 2017



On 05/22/2017 05:39 AM, Ferruh Yigit wrote:
> Hi Chas,
>
> On 5/17/2017 7:03 PM, Charles (Chas) Williams wrote:
>> Provide an accessor for the name of the underlying linux interface
>> used by the AF_PACKET-based interface.
>
> This patch provides a PMD specific API to get PMD internal data
> (internals->if_name).
>
> I think we should avoid PMD specific APIs if possible.
>
> internals->if_name is provided by application, as devargs to af_packet
> (iface=..), so app already knows port_id -> if_name mapping.
>
> OR
>
> With rte_eth_dev_info_get() af_packet returns the if_index for
> underlying interface, it is possible to use if_indextoname() to get ifname.
>
> Because above methods exists to get if_name, I think this API is not
> necessary.

I will go this route then.

>>
>> Signed-off-by: Charles (Chas) Williams <ciwillia at brocade.com>
>
> <...>
>


More information about the dev mailing list