On Wed, Aug 12, 2015 at 10:00 AM, Jesse Gross <je...@nicira.com> wrote:
> On Tue, Aug 11, 2015 at 10:17 PM, Pravin B Shelar <pshe...@nicira.com> wrote:
>> diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
>> index 78d49d1..5e9bab8 100644
>> --- a/drivers/net/geneve.c
>> +++ b/drivers/net/geneve.c
>> @@ -378,6 +379,11 @@ static int geneve_newlink(struct net *net, struct 
>> net_device *dev,
>>         if (data[IFLA_GENEVE_TOS])
>>                 geneve->tos = nla_get_u8(data[IFLA_GENEVE_TOS]);
>>
>> +       if (data[IFLA_GENEVE_PORT])
>> +               geneve->dst_port = 
>> htons(nla_get_u16(data[IFLA_GENEVE_PORT]));
>> +       else
>> +               geneve->dst_port = htons(GENEVE_UDP_PORT);
>
> I think there is a looming compatibility problem: if the request for
> an alternate port isn't successful then it will be silently ignored,
> which would presumably be confusing to the user when things appeared
> to have worked without an error. Perhaps the right thing to do is to
> check to see whether you get it back when the configuration is dumped
> but it is worth thinking about now.
>

Right, compatibility can to be handled by checking configuration.

> Presumably IFLA_GENEVE_PORT should be added to geneve_policy.
>
ok.

> Not specific to this patch but I think that it will make things
> significantly easier in the future if changelink was implemented.
> VXLAN has the same issue as well.

Do you mean allow dst-port configuration only through changelink()?
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to