diff options
author | Maxim Uvarov <maxim.uvarov@linaro.org> | 2014-12-18 17:21:45 +0300 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2014-12-19 16:04:52 +0300 |
commit | d3ab1869515fc15ef53de8558872df1e7e56bb3f (patch) | |
tree | 2f92efa48e88a378b8e771eb6c8aae5aac366a21 /platform/linux-generic | |
parent | 1a9a887527a784e338fda18167a573f64b53e058 (diff) |
api: pktio: remove odp_pktio_set_mtu
Not all hardware can change MTU size from ODP application.
Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'platform/linux-generic')
-rw-r--r-- | platform/linux-generic/include/api/odp_packet_io.h | 13 | ||||
-rw-r--r-- | platform/linux-generic/odp_packet_io.c | 42 |
2 files changed, 0 insertions, 55 deletions
diff --git a/platform/linux-generic/include/api/odp_packet_io.h b/platform/linux-generic/include/api/odp_packet_io.h index a1ad75408..e4577c378 100644 --- a/platform/linux-generic/include/api/odp_packet_io.h +++ b/platform/linux-generic/include/api/odp_packet_io.h @@ -111,19 +111,6 @@ int odp_pktio_inq_remdef(odp_pktio_t id); odp_queue_t odp_pktio_outq_getdef(odp_pktio_t id); /** - * Configure the MTU for a packet IO interface. - * - * @param[in] id ODP packet IO handle. - * @param[in] mtu The value of MTU that the interface will be configured to - * use. - * - * @retval 0 on success. - * @retval -1 if specified mtu can not be handled. - * @retval -1 on any other error or illegal input parameters. - */ -int odp_pktio_set_mtu(odp_pktio_t id, int mtu); - -/** * Return the currently configured MTU value of a packet IO interface. * * @param[in] id ODP packet IO handle. diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c index a016b6f91..9376b6fa5 100644 --- a/platform/linux-generic/odp_packet_io.c +++ b/platform/linux-generic/odp_packet_io.c @@ -538,48 +538,6 @@ static int sockfd_from_pktio_entry(pktio_entry_t *entry) } } -int odp_pktio_set_mtu(odp_pktio_t id, int mtu) -{ - pktio_entry_t *entry; - int sockfd; - struct ifreq ifr; - int ret; - - if (mtu <= 0) { - ODP_DBG("illegal MTU value %d\n", mtu); - return -1; - } - - entry = get_pktio_entry(id); - if (entry == NULL) { - ODP_DBG("pktio entry %d does not exist\n", id); - return -1; - } - - lock_entry(entry); - - if (odp_unlikely(is_free(entry))) { - unlock_entry(entry); - ODP_DBG("already freed pktio\n"); - return -1; - } - - sockfd = sockfd_from_pktio_entry(entry); - strncpy(ifr.ifr_name, entry->s.name, IFNAMSIZ - 1); - ifr.ifr_name[IFNAMSIZ - 1] = 0; - ifr.ifr_mtu = mtu; - - ret = ioctl(sockfd, SIOCSIFMTU, &ifr); - if (ret < 0) { - ODP_DBG("ioctl SIOCSIFMTU error\n"); - unlock_entry(entry); - return -1; - } - - unlock_entry(entry); - return 0; -} - int odp_pktio_mtu(odp_pktio_t id) { pktio_entry_t *entry; |