For the series Reviewed-by: Mike Holmes <[email protected]> On 1 March 2016 at 14:56, Bill Fischofer <[email protected]> wrote:
> ODP loopback interfaces should always be considered up, so add a > handler for odp_pktio_link_status() for this device type that always > returns 1 to indicate the link is up. > > Signed-off-by: Bill Fischofer <[email protected]> > --- > platform/linux-generic/pktio/loop.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/platform/linux-generic/pktio/loop.c > b/platform/linux-generic/pktio/loop.c > index dbb0e7b..0ea6d0e 100644 > --- a/platform/linux-generic/pktio/loop.c > +++ b/platform/linux-generic/pktio/loop.c > @@ -134,6 +134,12 @@ static int loopback_mac_addr_get(pktio_entry_t > *pktio_entry ODP_UNUSED, > return ETH_ALEN; > } > > +static int loopback_link_status(pktio_entry_t *pktio_entry ODP_UNUSED) > +{ > + /* loopback interfaces are always up */ > + return 1; > +} > + > static int loopback_promisc_mode_set(pktio_entry_t *pktio_entry, > odp_bool_t enable) > { > @@ -176,6 +182,7 @@ const pktio_if_ops_t loopback_pktio_ops = { > .promisc_mode_set = loopback_promisc_mode_set, > .promisc_mode_get = loopback_promisc_mode_get, > .mac_get = loopback_mac_addr_get, > + .link_status = loopback_link_status, > .capability = NULL, > .input_queues_config = NULL, > .output_queues_config = NULL, > -- > 2.5.0 > > _______________________________________________ > lng-odp mailing list > [email protected] > https://lists.linaro.org/mailman/listinfo/lng-odp > -- Mike Holmes Technical Manager - Linaro Networking Group Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs "Work should be fun and collborative, the rest follows"
_______________________________________________ lng-odp mailing list [email protected] https://lists.linaro.org/mailman/listinfo/lng-odp
