diff mbox

[1/3] linux-generic: pktio: increase MTU of loop interface

Message ID 1440089058-12833-1-git-send-email-stuart.haslam@linaro.org
State New
Headers show

Commit Message

Stuart Haslam Aug. 20, 2015, 4:44 p.m. UTC
There's no need to enforce an artificial MTU for the loop interface.
Previously this value was reported but not enforced.

Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org>
---
 platform/linux-generic/pktio/loop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Maxim Uvarov Aug. 24, 2015, 9:34 a.m. UTC | #1
On 08/20/15 19:44, Stuart Haslam wrote:
> There's no need to enforce an artificial MTU for the loop interface.
> Previously this value was reported but not enforced.
>
> Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org>
> ---
>   platform/linux-generic/pktio/loop.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/platform/linux-generic/pktio/loop.c b/platform/linux-generic/pktio/loop.c
> index 188a9ee..55371f2 100644
> --- a/platform/linux-generic/pktio/loop.c
> +++ b/platform/linux-generic/pktio/loop.c
> @@ -19,7 +19,7 @@
>   #include <odp/helper/ip.h>
>   
>   /* MTU to be reported for the "loop" interface */
> -#define PKTIO_LOOP_MTU 1500
> +#define PKTIO_LOOP_MTU INT_MAX
In general yes, there is no limit. But for other pktio we support 
maximum len of jumbo frame.
int max might be confusing here. How about changing it to 9*1024?

Maxim.

>   /* MAC address for the "loop" interface */
>   static const char pktio_loop_mac[] = {0x02, 0xe9, 0x34, 0x80, 0x73, 0x01};
>
Stuart Haslam Aug. 27, 2015, 10:38 a.m. UTC | #2
On Mon, Aug 24, 2015 at 12:34:10PM +0300, Maxim Uvarov wrote:
> On 08/20/15 19:44, Stuart Haslam wrote:
> >There's no need to enforce an artificial MTU for the loop interface.
> >Previously this value was reported but not enforced.
> >
> >Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org>
> >---
> >  platform/linux-generic/pktio/loop.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/platform/linux-generic/pktio/loop.c b/platform/linux-generic/pktio/loop.c
> >index 188a9ee..55371f2 100644
> >--- a/platform/linux-generic/pktio/loop.c
> >+++ b/platform/linux-generic/pktio/loop.c
> >@@ -19,7 +19,7 @@
> >  #include <odp/helper/ip.h>
> >  /* MTU to be reported for the "loop" interface */
> >-#define PKTIO_LOOP_MTU 1500
> >+#define PKTIO_LOOP_MTU INT_MAX
> In general yes, there is no limit. But for other pktio we support
> maximum len of jumbo frame.
> int max might be confusing here. How about changing it to 9*1024?
> 

I did consider using 64K, but an artificial limit would mean having a
length check on every packet in loopback_send(), using INT_MAX avoids
that [1] and I couldn't think of a good reason to use a lower value. I'm
not sure what there is to be confused about.
diff mbox

Patch

diff --git a/platform/linux-generic/pktio/loop.c b/platform/linux-generic/pktio/loop.c
index 188a9ee..55371f2 100644
--- a/platform/linux-generic/pktio/loop.c
+++ b/platform/linux-generic/pktio/loop.c
@@ -19,7 +19,7 @@ 
 #include <odp/helper/ip.h>
 
 /* MTU to be reported for the "loop" interface */
-#define PKTIO_LOOP_MTU 1500
+#define PKTIO_LOOP_MTU INT_MAX
 /* MAC address for the "loop" interface */
 static const char pktio_loop_mac[] = {0x02, 0xe9, 0x34, 0x80, 0x73, 0x01};