On Tue, Aug 8, 2017 at 2:38 AM, Vamsi Attunuru <vamsi.cav...@gmail.com>
wrote:

> Signed-off-by: Vamsi Attunuru <vattun...@cavium.com>
> Signed-off-by: Shally Verma <sve...@cavium.com>
> Signed-off-by: Mahipal Challa <mcha...@cavium.com>
>
> ---
>  include/odp/api/spec/packet_io.h | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
>
> diff --git a/include/odp/api/spec/packet_io.h
> b/include/odp/api/spec/packet_io.h
> index d42cebf..be81c3d 100644
> --- a/include/odp/api/spec/packet_io.h
> +++ b/include/odp/api/spec/packet_io.h
> @@ -452,6 +452,9 @@ typedef union odp_pktio_set_op_t {
>         struct {
>                 /** Promiscuous mode */
>                 uint32_t promisc_mode : 1;
> +
> +               /** Allow app to set MTU size */
> +               uint32_t mtu_set : 1;
>         } op;
>         /** All bits of the bit field structure.
>           * This field can be used to set/clear all flags, or bitwise
> @@ -480,6 +483,9 @@ typedef struct odp_pktio_capability_t {
>
>         /** @deprecated Use enable_loop inside odp_pktin_config_t */
>         odp_bool_t ODP_DEPRECATE(loop_supported);
> +
> +       /** Maximum MTU size supported */
> +       uint32_t max_mtu_size;
>  } odp_pktio_capability_t;
>
>  /**
> @@ -910,6 +916,21 @@ int odp_pktout_send(odp_pktout_queue_t queue, const
> odp_packet_t packets[],
>  uint32_t odp_pktio_mtu(odp_pktio_t pktio);
>
>  /**
> + * Set MTU value of a packet IO interface.
> + *
> + * Application should pass value upto max_mtu_size as indicated by
> + * odp_pktio_capability_t:max_mtu_size. Any value beyond max_mtu_size
> + * limit will result in failure. mtu value < 68 also results in failure.
>

Seems like it would be better to have an explicit min_mtu_size in the
odp_pktio_capability() than this arbitrary note buried as a comment.


> + *
> + * @param pktio  Packet IO handle.
> + * @param mtu    MTU value to be set.
> + *
> + * @return  0 on success
> + * @retval <0 on failure
> + */
> +int odp_pktio_mtu_set(odp_pktio_t pktio, uint32_t mtu);
> +
> +/**
>   * Enable/Disable promiscuous mode on a packet IO interface.
>   *
>   * @param[in] pktio    Packet IO handle.
> --
> 1.9.3
>
>

Reply via email to