Message ID | 1456862218-26220-1-git-send-email-bill.fischofer@linaro.org |
---|---|
State | Accepted |
Commit | f87d4e826982f115932ca1209d57f21ea269a769 |
Headers | show |
For the series Reviewed-by: Mike Holmes <mike.holmes@linaro.org> On 1 March 2016 at 14:56, Bill Fischofer <bill.fischofer@linaro.org> 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 <bill.fischofer@linaro.org> > --- > 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 > lng-odp@lists.linaro.org > 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"
Merged, Maxim. On 03/02/16 23:54, Mike Holmes wrote: > For the series Reviewed-by: Mike Holmes <mike.holmes@linaro.org > <mailto:mike.holmes@linaro.org>> > > On 1 March 2016 at 14:56, Bill Fischofer <bill.fischofer@linaro.org > <mailto:bill.fischofer@linaro.org>> 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 <bill.fischofer@linaro.org > <mailto:bill.fischofer@linaro.org>> > --- > 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 > lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org> > 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 > lng-odp@lists.linaro.org > https://lists.linaro.org/mailman/listinfo/lng-odp
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,
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 <bill.fischofer@linaro.org> --- platform/linux-generic/pktio/loop.c | 7 +++++++ 1 file changed, 7 insertions(+)