Hi Roopa,

I love your patch! Yet something to improve:

[auto build test ERROR on net-next/master]

url:    
https://github.com/0day-ci/linux/commits/Roopa-Prabhu/vxlan-support-changelink-for-a-few-more-attributes/20181130-030315
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

>> drivers/net/vxlan.c:3526:22: error: Expected ; at end of statement
>> drivers/net/vxlan.c:3526:22: error: got {
>> drivers/net/vxlan.c:3534:17: error: Expected ) in function declarator
   drivers/net/vxlan.c:3534:17: error: got [
>> drivers/net/vxlan.c:3534:9: error: Trying to use reserved word 'if' as 
>> identifier
   drivers/net/vxlan.c:3536:25: error: Trying to use reserved word 'if' as 
identifier
>> drivers/net/vxlan.c:3536:25: error: Expected ; at the end of type declaration
   drivers/net/vxlan.c:3536:25: error: got }
>> drivers/net/vxlan.c:3539:25: error: Trying to use reserved word 'return' as 
>> identifier
>> drivers/net/vxlan.c:3539:32: error: Expected ; at end of declaration
   drivers/net/vxlan.c:3539:32: error: got -
   drivers/net/vxlan.c:3540:17: error: Expected ; at the end of type declaration
   drivers/net/vxlan.c:3540:17: error: got }
   drivers/net/vxlan.c:3542:9: error: Expected ; at the end of type declaration
   drivers/net/vxlan.c:3542:9: error: got }
   drivers/net/vxlan.c:3546:25: error: Trying to use reserved word 'if' as 
identifier
   drivers/net/vxlan.c:3546:25: error: Expected ; at the end of type declaration
   drivers/net/vxlan.c:3546:25: error: got }
   drivers/net/vxlan.c:3549:25: error: Trying to use reserved word 'return' as 
identifier
   drivers/net/vxlan.c:3549:32: error: Expected ; at end of declaration
   drivers/net/vxlan.c:3549:32: error: got -
   drivers/net/vxlan.c:3550:17: error: Expected ; at the end of type declaration
   drivers/net/vxlan.c:3550:17: error: got }
   drivers/net/vxlan.c:3553:9: error: Expected ; at the end of type declaration
   drivers/net/vxlan.c:3553:9: error: got }
   drivers/net/vxlan.c:3558:63: error: Expected ) in function declarator
   drivers/net/vxlan.c:3558:63: error: got ,
   drivers/net/vxlan.c:3561:56: error: Expected ) in function declarator
   drivers/net/vxlan.c:3561:56: error: got ,
   drivers/net/vxlan.c:3564:56: error: Expected ) in function declarator
   drivers/net/vxlan.c:3564:56: error: got ,
   drivers/net/vxlan.c:3567:49: error: Expected ) in function declarator
   drivers/net/vxlan.c:3567:49: error: got ,
   drivers/net/vxlan.c:3570:49: error: Expected ) in function declarator
   drivers/net/vxlan.c:3570:49: error: got ,
   drivers/net/vxlan.c:3573:63: error: Expected ) in function declarator
   drivers/net/vxlan.c:3573:63: error: got ,
   drivers/net/vxlan.c:3576:15: error: Expected ) in function declarator
   drivers/net/vxlan.c:3576:15: error: got [
   drivers/net/vxlan.c:3576:9: error: Trying to use reserved word 'if' as 
identifier
   drivers/net/vxlan.c:3578:25: error: Trying to use reserved word 'if' as 
identifier
   drivers/net/vxlan.c:3578:25: error: Expected ; at the end of type declaration
   drivers/net/vxlan.c:3578:25: error: got }
   drivers/net/vxlan.c:3581:25: error: Trying to use reserved word 'return' as 
identifier
   drivers/net/vxlan.c:3581:32: error: Expected ; at end of declaration
   drivers/net/vxlan.c:3581:32: error: got -
   drivers/net/vxlan.c:3582:17: error: Expected ; at the end of type declaration
   drivers/net/vxlan.c:3582:17: error: got }
   drivers/net/vxlan.c:3584:9: error: Expected ; at the end of type declaration
   drivers/net/vxlan.c:3584:9: error: got }
   drivers/net/vxlan.c:3589:9: error: Trying to use reserved word 'return' as 
identifier
   drivers/net/vxlan.c:3589:16: error: Expected ; at end of declaration
   drivers/net/vxlan.c:3589:16: error: got 0
   drivers/net/vxlan.c:3590:1: error: Expected ; at the end of type declaration
   drivers/net/vxlan.c:3590:1: error: got }
   drivers/net/vxlan.c:3600:9: error: Trying to use reserved word 'if' as 
identifier
   drivers/net/vxlan.c:3601:17: error: Expected ; at end of declaration
>> drivers/net/vxlan.c:3601:17: error: got return
   drivers/net/vxlan.c:3603:9: error: Trying to use reserved word 'return' as 
identifier
   drivers/net/vxlan.c:3603:16: error: Expected ; at end of declaration
>> drivers/net/vxlan.c:3603:16: error: got __vxlan_dev_create
   drivers/net/vxlan.c:3604:1: error: Expected ; at the end of type declaration
   drivers/net/vxlan.c:3604:1: error: got }
   drivers/net/vxlan.c:3620:9: error: Trying to use reserved word 'if' as 
identifier
   drivers/net/vxlan.c:3621:17: error: Expected ; at end of declaration
   drivers/net/vxlan.c:3621:17: error: got return
   drivers/net/vxlan.c:3624:9: error: Expected ) in function declarator
   drivers/net/vxlan.c:3624:9: error: got &
   drivers/net/vxlan.c:3627:9: error: Trying to use reserved word 'if' as 
identifier
   drivers/net/vxlan.c:3628:17: error: Expected ; at end of declaration
   drivers/net/vxlan.c:3628:17: error: got return
   drivers/net/vxlan.c:3630:30: error: Expected ) in function declarator
   drivers/net/vxlan.c:3630:30: error: got !=
   drivers/net/vxlan.c:3630:9: error: Trying to use reserved word 'if' as 
identifier
   drivers/net/vxlan.c:3634:13: error: Expected ) in function declarator
   drivers/net/vxlan.c:3634:13: error: got !
   drivers/net/vxlan.c:3634:9: error: Trying to use reserved word 'if' as 
identifier
   drivers/net/vxlan.c:3636:21: error: Expected ) in function declarator
   drivers/net/vxlan.c:3636:21: error: got !
   drivers/net/vxlan.c:3636:17: error: Trying to use reserved word 'if' as 
identifier
   drivers/net/vxlan.c:3645:21: error: Expected ) in function declarator
   drivers/net/vxlan.c:3645:21: error: got !
   drivers/net/vxlan.c:3645:17: error: Trying to use reserved word 'if' as 
identifier
   drivers/net/vxlan.c:3654:25: error: Trying to use reserved word 'if' as 
identifier
   drivers/net/vxlan.c:3658:69: error: Expected ) in function declarator
>> drivers/net/vxlan.c:3658:69: error: got (
   drivers/net/vxlan.c:3660:17: error: Expected ; at the end of type declaration
   drivers/net/vxlan.c:3660:17: error: got }
   drivers/net/vxlan.c:3662:9: error: Expected ; at the end of type declaration
   drivers/net/vxlan.c:3662:9: error: got }
   drivers/net/vxlan.c:3665:1: error: Expected ; at the end of type declaration
   drivers/net/vxlan.c:3665:1: error: got }
   drivers/net/vxlan.c:3673:27: error: Expected ) in function declarator
   drivers/net/vxlan.c:3673:27: error: got &
   drivers/net/vxlan.c:3674:18: error: Expected ) in function declarator
   drivers/net/vxlan.c:3674:18: error: got &
   drivers/net/vxlan.c:3676:1: error: Expected ; at the end of type declaration
   drivers/net/vxlan.c:3676:1: error: got }
   drivers/net/vxlan.c:3706:1: error: Expected ; at the end of type declaration
   drivers/net/vxlan.c:3706:1: error: got }
   drivers/net/vxlan.c:3717:24: error: Expected ) in function declarator
>> drivers/net/vxlan.c:3717:24: error: too many errors
   drivers/net/vxlan.c: In function 'vxlan_nl2conf':
   drivers/net/vxlan.c:3526:3: error: expected '}' before 'else'
      else {
      ^~~~

vim +3526 drivers/net/vxlan.c

5b4a0054c Roopa Prabhu       2018-11-28  3393  
8bcdc4f3a Roopa Prabhu       2017-02-20  3394  static int vxlan_nl2conf(struct 
nlattr *tb[], struct nlattr *data[],
8bcdc4f3a Roopa Prabhu       2017-02-20  3395                    struct 
net_device *dev, struct vxlan_config *conf,
87801e838 Roopa Prabhu       2018-11-28  3396                    bool 
changelink, struct netlink_ext_ack *extack)
0dfbdf410 Thomas Graf        2015-07-21  3397  {
8bcdc4f3a Roopa Prabhu       2017-02-20  3398   struct vxlan_dev *vxlan = 
netdev_priv(dev);
8bcdc4f3a Roopa Prabhu       2017-02-20  3399  
8bcdc4f3a Roopa Prabhu       2017-02-20  3400   memset(conf, 0, sizeof(*conf));
8bcdc4f3a Roopa Prabhu       2017-02-20  3401  
8bcdc4f3a Roopa Prabhu       2017-02-20  3402   /* if changelink operation, 
start with old existing cfg */
8bcdc4f3a Roopa Prabhu       2017-02-20  3403   if (changelink)
8bcdc4f3a Roopa Prabhu       2017-02-20  3404           memcpy(conf, 
&vxlan->cfg, sizeof(*conf));
0dfbdf410 Thomas Graf        2015-07-21  3405  
8bcdc4f3a Roopa Prabhu       2017-02-20  3406   if (data[IFLA_VXLAN_ID]) {
8bcdc4f3a Roopa Prabhu       2017-02-20  3407           __be32 vni = 
cpu_to_be32(nla_get_u32(data[IFLA_VXLAN_ID]));
e277de5f3 Jesse Gross        2015-10-16  3408  
87801e838 Roopa Prabhu       2018-11-28  3409           if (changelink && (vni 
!= conf->vni)) {
87801e838 Roopa Prabhu       2018-11-28  3410                   
NL_SET_ERR_MSG_ATTR(extack, tb[IFLA_VXLAN_ID],
87801e838 Roopa Prabhu       2018-11-28  3411                                   
    "Cannot change vni");
8bcdc4f3a Roopa Prabhu       2017-02-20  3412                   return 
-EOPNOTSUPP;
87801e838 Roopa Prabhu       2018-11-28  3413           }
8bcdc4f3a Roopa Prabhu       2017-02-20  3414           conf->vni = 
cpu_to_be32(nla_get_u32(data[IFLA_VXLAN_ID]));
8bcdc4f3a Roopa Prabhu       2017-02-20  3415   }
0dfbdf410 Thomas Graf        2015-07-21  3416  
0dfbdf410 Thomas Graf        2015-07-21  3417   if (data[IFLA_VXLAN_GROUP]) {
87801e838 Roopa Prabhu       2018-11-28  3418           if (changelink && 
(conf->remote_ip.sa.sa_family != AF_INET)) {
87801e838 Roopa Prabhu       2018-11-28  3419                   
NL_SET_ERR_MSG_ATTR(extack, tb[IFLA_VXLAN_GROUP],
87801e838 Roopa Prabhu       2018-11-28  3420                                   
    "New group addr family does not match old group");
ce44a4aea Matthias Schiffer  2017-06-19  3421                   return 
-EOPNOTSUPP;
87801e838 Roopa Prabhu       2018-11-28  3422           }
8bcdc4f3a Roopa Prabhu       2017-02-20  3423           
conf->remote_ip.sin.sin_addr.s_addr = nla_get_in_addr(data[IFLA_VXLAN_GROUP]);
ce44a4aea Matthias Schiffer  2017-06-19  3424           
conf->remote_ip.sa.sa_family = AF_INET;
0dfbdf410 Thomas Graf        2015-07-21  3425   } else if 
(data[IFLA_VXLAN_GROUP6]) {
87801e838 Roopa Prabhu       2018-11-28  3426           if 
(!IS_ENABLED(CONFIG_IPV6)) {
87801e838 Roopa Prabhu       2018-11-28  3427                   
NL_SET_ERR_MSG_ATTR(extack, tb[IFLA_VXLAN_GROUP6],
87801e838 Roopa Prabhu       2018-11-28  3428                                   
    "IPv6 support not enabled in the kernel");
0dfbdf410 Thomas Graf        2015-07-21  3429                   return 
-EPFNOSUPPORT;
87801e838 Roopa Prabhu       2018-11-28  3430           }
0dfbdf410 Thomas Graf        2015-07-21  3431  
87801e838 Roopa Prabhu       2018-11-28  3432           if (changelink && 
(conf->remote_ip.sa.sa_family != AF_INET6)) {
87801e838 Roopa Prabhu       2018-11-28  3433                   
NL_SET_ERR_MSG_ATTR(extack, tb[IFLA_VXLAN_GROUP6],
87801e838 Roopa Prabhu       2018-11-28  3434                                   
    "New group addr family does not match old group");
ce44a4aea Matthias Schiffer  2017-06-19  3435                   return 
-EOPNOTSUPP;
87801e838 Roopa Prabhu       2018-11-28  3436           }
ce44a4aea Matthias Schiffer  2017-06-19  3437  
8bcdc4f3a Roopa Prabhu       2017-02-20  3438           
conf->remote_ip.sin6.sin6_addr = nla_get_in6_addr(data[IFLA_VXLAN_GROUP6]);
8bcdc4f3a Roopa Prabhu       2017-02-20  3439           
conf->remote_ip.sa.sa_family = AF_INET6;
0dfbdf410 Thomas Graf        2015-07-21  3440   }
0dfbdf410 Thomas Graf        2015-07-21  3441  
0dfbdf410 Thomas Graf        2015-07-21  3442   if (data[IFLA_VXLAN_LOCAL]) {
87801e838 Roopa Prabhu       2018-11-28  3443           if (changelink && 
(conf->saddr.sa.sa_family != AF_INET)) {
87801e838 Roopa Prabhu       2018-11-28  3444                   
NL_SET_ERR_MSG_ATTR(extack, tb[IFLA_VXLAN_LOCAL],
87801e838 Roopa Prabhu       2018-11-28  3445                                   
    "New local addr family does not match old");
ce44a4aea Matthias Schiffer  2017-06-19  3446                   return 
-EOPNOTSUPP;
87801e838 Roopa Prabhu       2018-11-28  3447           }
ce44a4aea Matthias Schiffer  2017-06-19  3448  
8bcdc4f3a Roopa Prabhu       2017-02-20  3449           
conf->saddr.sin.sin_addr.s_addr = nla_get_in_addr(data[IFLA_VXLAN_LOCAL]);
8bcdc4f3a Roopa Prabhu       2017-02-20  3450           
conf->saddr.sa.sa_family = AF_INET;
0dfbdf410 Thomas Graf        2015-07-21  3451   } else if 
(data[IFLA_VXLAN_LOCAL6]) {
87801e838 Roopa Prabhu       2018-11-28  3452           if 
(!IS_ENABLED(CONFIG_IPV6)) {
87801e838 Roopa Prabhu       2018-11-28  3453                   
NL_SET_ERR_MSG_ATTR(extack, tb[IFLA_VXLAN_LOCAL6],
87801e838 Roopa Prabhu       2018-11-28  3454                                   
    "IPv6 support not enabled in the kernel");
0dfbdf410 Thomas Graf        2015-07-21  3455                   return 
-EPFNOSUPPORT;
87801e838 Roopa Prabhu       2018-11-28  3456           }
0dfbdf410 Thomas Graf        2015-07-21  3457  
87801e838 Roopa Prabhu       2018-11-28  3458           if (changelink && 
(conf->saddr.sa.sa_family != AF_INET6)) {
87801e838 Roopa Prabhu       2018-11-28  3459                   
NL_SET_ERR_MSG_ATTR(extack, tb[IFLA_VXLAN_LOCAL6],
87801e838 Roopa Prabhu       2018-11-28  3460                                   
    "New local6 addr family does not match old");
ce44a4aea Matthias Schiffer  2017-06-19  3461                   return 
-EOPNOTSUPP;
87801e838 Roopa Prabhu       2018-11-28  3462           }
ce44a4aea Matthias Schiffer  2017-06-19  3463  
0dfbdf410 Thomas Graf        2015-07-21  3464           /* TODO: respect scope 
id */
8bcdc4f3a Roopa Prabhu       2017-02-20  3465           
conf->saddr.sin6.sin6_addr = nla_get_in6_addr(data[IFLA_VXLAN_LOCAL6]);
8bcdc4f3a Roopa Prabhu       2017-02-20  3466           
conf->saddr.sa.sa_family = AF_INET6;
0dfbdf410 Thomas Graf        2015-07-21  3467   }
0dfbdf410 Thomas Graf        2015-07-21  3468  
0dfbdf410 Thomas Graf        2015-07-21  3469   if (data[IFLA_VXLAN_LINK])
8bcdc4f3a Roopa Prabhu       2017-02-20  3470           conf->remote_ifindex = 
nla_get_u32(data[IFLA_VXLAN_LINK]);
0dfbdf410 Thomas Graf        2015-07-21  3471  
d342894c5 stephen hemminger  2012-10-01  3472   if (data[IFLA_VXLAN_TOS])
8bcdc4f3a Roopa Prabhu       2017-02-20  3473           conf->tos  = 
nla_get_u8(data[IFLA_VXLAN_TOS]);
d342894c5 stephen hemminger  2012-10-01  3474  
afb97186f Vincent Bernat     2012-10-30  3475   if (data[IFLA_VXLAN_TTL])
8bcdc4f3a Roopa Prabhu       2017-02-20  3476           conf->ttl = 
nla_get_u8(data[IFLA_VXLAN_TTL]);
afb97186f Vincent Bernat     2012-10-30  3477  
5b4a0054c Roopa Prabhu       2018-11-28  3478   vxlan_nl2flag(conf, data, 
IFLA_VXLAN_TTL_INHERIT,
5b4a0054c Roopa Prabhu       2018-11-28  3479                 
VXLAN_F_TTL_INHERIT);
72f6d71e4 Hangbin Liu        2018-04-17  3480  
e7f70af11 Daniel Borkmann    2016-03-09  3481   if (data[IFLA_VXLAN_LABEL])
8bcdc4f3a Roopa Prabhu       2017-02-20  3482           conf->label = 
nla_get_be32(data[IFLA_VXLAN_LABEL]) &
e7f70af11 Daniel Borkmann    2016-03-09  3483                        
IPV6_FLOWLABEL_MASK;
e7f70af11 Daniel Borkmann    2016-03-09  3484  
5b4a0054c Roopa Prabhu       2018-11-28  3485   if (data[IFLA_VXLAN_LEARNING])
5b4a0054c Roopa Prabhu       2018-11-28  3486           vxlan_nl2flag(conf, 
data, IFLA_VXLAN_LEARNING,
5b4a0054c Roopa Prabhu       2018-11-28  3487                         
VXLAN_F_LEARN);
5b4a0054c Roopa Prabhu       2018-11-28  3488   else if (!changelink)
8bcdc4f3a Roopa Prabhu       2017-02-20  3489           /* default to learn on 
a new device */
8bcdc4f3a Roopa Prabhu       2017-02-20  3490           conf->flags |= 
VXLAN_F_LEARN;
d342894c5 stephen hemminger  2012-10-01  3491  
40051c4dc Ido Schimmel       2018-11-21  3492   if (data[IFLA_VXLAN_AGEING])
8bcdc4f3a Roopa Prabhu       2017-02-20  3493           conf->age_interval = 
nla_get_u32(data[IFLA_VXLAN_AGEING]);
d342894c5 stephen hemminger  2012-10-01  3494  
5b4a0054c Roopa Prabhu       2018-11-28  3495   vxlan_nl2flag(conf, data, 
IFLA_VXLAN_PROXY, VXLAN_F_PROXY);
5b4a0054c Roopa Prabhu       2018-11-28  3496   vxlan_nl2flag(conf, data, 
IFLA_VXLAN_RSC, VXLAN_F_RSC);
5b4a0054c Roopa Prabhu       2018-11-28  3497   vxlan_nl2flag(conf, data, 
IFLA_VXLAN_L2MISS, VXLAN_F_L2MISS);
5b4a0054c Roopa Prabhu       2018-11-28  3498   vxlan_nl2flag(conf, data, 
IFLA_VXLAN_L3MISS, VXLAN_F_L3MISS);
e4f67addf David Stevens      2012-11-20  3499  
8bcdc4f3a Roopa Prabhu       2017-02-20  3500   if (data[IFLA_VXLAN_LIMIT]) {
87801e838 Roopa Prabhu       2018-11-28  3501           if (changelink) {
87801e838 Roopa Prabhu       2018-11-28  3502                   
NL_SET_ERR_MSG_ATTR(extack, tb[IFLA_VXLAN_LIMIT],
87801e838 Roopa Prabhu       2018-11-28  3503                                   
    "Cannot change limit");
8bcdc4f3a Roopa Prabhu       2017-02-20  3504                   return 
-EOPNOTSUPP;
87801e838 Roopa Prabhu       2018-11-28  3505           }
8bcdc4f3a Roopa Prabhu       2017-02-20  3506           conf->addrmax = 
nla_get_u32(data[IFLA_VXLAN_LIMIT]);
8bcdc4f3a Roopa Prabhu       2017-02-20  3507   }
d342894c5 stephen hemminger  2012-10-01  3508  
8bcdc4f3a Roopa Prabhu       2017-02-20  3509   if 
(data[IFLA_VXLAN_COLLECT_METADATA]) {
87801e838 Roopa Prabhu       2018-11-28  3510           if (changelink) {
87801e838 Roopa Prabhu       2018-11-28  3511                   
NL_SET_ERR_MSG_ATTR(extack,
87801e838 Roopa Prabhu       2018-11-28  3512                                   
    tb[IFLA_VXLAN_COLLECT_METADATA],
87801e838 Roopa Prabhu       2018-11-28  3513                                   
    "Cannot change metadata flag");
8bcdc4f3a Roopa Prabhu       2017-02-20  3514                   return 
-EOPNOTSUPP;
87801e838 Roopa Prabhu       2018-11-28  3515           }
5b4a0054c Roopa Prabhu       2018-11-28  3516           vxlan_nl2flag(conf, 
data, IFLA_VXLAN_COLLECT_METADATA,
5b4a0054c Roopa Prabhu       2018-11-28  3517                         
VXLAN_F_COLLECT_METADATA);
8bcdc4f3a Roopa Prabhu       2017-02-20  3518   }
f8a9b1bc1 Alexei Starovoitov 2015-07-30  3519  
05f47d69c stephen hemminger  2012-10-09  3520   if 
(data[IFLA_VXLAN_PORT_RANGE]) {
8bcdc4f3a Roopa Prabhu       2017-02-20  3521           if (!changelink) {
05f47d69c stephen hemminger  2012-10-09  3522                   const struct 
ifla_vxlan_port_range *p
05f47d69c stephen hemminger  2012-10-09  3523                           = 
nla_data(data[IFLA_VXLAN_PORT_RANGE]);
8bcdc4f3a Roopa Prabhu       2017-02-20  3524                   conf->port_min 
= ntohs(p->low);
8bcdc4f3a Roopa Prabhu       2017-02-20  3525                   conf->port_max 
= ntohs(p->high);
87801e838 Roopa Prabhu       2018-11-28 @3526           else {
87801e838 Roopa Prabhu       2018-11-28  3527                   
NL_SET_ERR_MSG_ATTR(extack,
87801e838 Roopa Prabhu       2018-11-28  3528                                   
    tb[IFLA_VXLAN_PORT_RANGE],
87801e838 Roopa Prabhu       2018-11-28  3529                                   
    "Cannot change port range");
8bcdc4f3a Roopa Prabhu       2017-02-20  3530                   return 
-EOPNOTSUPP;
8bcdc4f3a Roopa Prabhu       2017-02-20  3531           }
8bcdc4f3a Roopa Prabhu       2017-02-20  3532   }
8bcdc4f3a Roopa Prabhu       2017-02-20  3533  
8bcdc4f3a Roopa Prabhu       2017-02-20 @3534   if (data[IFLA_VXLAN_PORT]) {
87801e838 Roopa Prabhu       2018-11-28  3535           if (changelink) {
87801e838 Roopa Prabhu       2018-11-28 @3536                   
NL_SET_ERR_MSG_ATTR(extack,
87801e838 Roopa Prabhu       2018-11-28  3537                                   
    tb[IFLA_VXLAN_PORT],
87801e838 Roopa Prabhu       2018-11-28  3538                                   
    "Cannot change port");
8bcdc4f3a Roopa Prabhu       2017-02-20 @3539                   return 
-EOPNOTSUPP;
87801e838 Roopa Prabhu       2018-11-28  3540           }
8bcdc4f3a Roopa Prabhu       2017-02-20  3541           conf->dst_port = 
nla_get_be16(data[IFLA_VXLAN_PORT]);
8bcdc4f3a Roopa Prabhu       2017-02-20  3542   }
8bcdc4f3a Roopa Prabhu       2017-02-20  3543  
8bcdc4f3a Roopa Prabhu       2017-02-20  3544   if (data[IFLA_VXLAN_UDP_CSUM]) {
87801e838 Roopa Prabhu       2018-11-28  3545           if (changelink) {
87801e838 Roopa Prabhu       2018-11-28  3546                   
NL_SET_ERR_MSG_ATTR(extack,
87801e838 Roopa Prabhu       2018-11-28  3547                                   
    tb[IFLA_VXLAN_UDP_CSUM],
87801e838 Roopa Prabhu       2018-11-28  3548                                   
    "Cannot change udp csum");
8bcdc4f3a Roopa Prabhu       2017-02-20  3549                   return 
-EOPNOTSUPP;
87801e838 Roopa Prabhu       2018-11-28  3550           }
8bcdc4f3a Roopa Prabhu       2017-02-20  3551           if 
(!nla_get_u8(data[IFLA_VXLAN_UDP_CSUM]))
8bcdc4f3a Roopa Prabhu       2017-02-20  3552                   conf->flags |= 
VXLAN_F_UDP_ZERO_CSUM_TX;
8bcdc4f3a Roopa Prabhu       2017-02-20  3553   }
8bcdc4f3a Roopa Prabhu       2017-02-20  3554  
5b4a0054c Roopa Prabhu       2018-11-28  3555   vxlan_nl2flag(conf, data, 
IFLA_VXLAN_UDP_ZERO_CSUM6_TX,
5b4a0054c Roopa Prabhu       2018-11-28  3556                 
VXLAN_F_UDP_ZERO_CSUM6_TX);
8bcdc4f3a Roopa Prabhu       2017-02-20  3557  
5b4a0054c Roopa Prabhu       2018-11-28  3558   vxlan_nl2flag(conf, data, 
IFLA_VXLAN_UDP_ZERO_CSUM6_RX,
5b4a0054c Roopa Prabhu       2018-11-28  3559                 
VXLAN_F_UDP_ZERO_CSUM6_RX);
8bcdc4f3a Roopa Prabhu       2017-02-20  3560  
5b4a0054c Roopa Prabhu       2018-11-28  3561   vxlan_nl2flag(conf, data, 
IFLA_VXLAN_REMCSUM_TX,
5b4a0054c Roopa Prabhu       2018-11-28  3562                 
VXLAN_F_REMCSUM_TX);
8bcdc4f3a Roopa Prabhu       2017-02-20  3563  
5b4a0054c Roopa Prabhu       2018-11-28  3564   vxlan_nl2flag(conf, data, 
IFLA_VXLAN_REMCSUM_RX,
5b4a0054c Roopa Prabhu       2018-11-28  3565                 
VXLAN_F_REMCSUM_RX);
8bcdc4f3a Roopa Prabhu       2017-02-20  3566  
5b4a0054c Roopa Prabhu       2018-11-28  3567   vxlan_nl2flag(conf, data, 
IFLA_VXLAN_GBP,
5b4a0054c Roopa Prabhu       2018-11-28  3568                 VXLAN_F_GBP);
8bcdc4f3a Roopa Prabhu       2017-02-20  3569  
5b4a0054c Roopa Prabhu       2018-11-28  3570   vxlan_nl2flag(conf, data, 
IFLA_VXLAN_GPE,
5b4a0054c Roopa Prabhu       2018-11-28  3571                 VXLAN_F_GPE);
8bcdc4f3a Roopa Prabhu       2017-02-20  3572  
5b4a0054c Roopa Prabhu       2018-11-28  3573   vxlan_nl2flag(conf, data, 
IFLA_VXLAN_REMCSUM_NOPARTIAL,
5b4a0054c Roopa Prabhu       2018-11-28  3574                 
VXLAN_F_REMCSUM_NOPARTIAL);
8bcdc4f3a Roopa Prabhu       2017-02-20  3575  
8bcdc4f3a Roopa Prabhu       2017-02-20  3576   if (tb[IFLA_MTU]) {
87801e838 Roopa Prabhu       2018-11-28  3577           if (changelink) {
87801e838 Roopa Prabhu       2018-11-28  3578                   
NL_SET_ERR_MSG_ATTR(extack,
87801e838 Roopa Prabhu       2018-11-28  3579                                   
    tb[IFLA_MTU],
87801e838 Roopa Prabhu       2018-11-28  3580                                   
    "Cannot change mtu");
8bcdc4f3a Roopa Prabhu       2017-02-20  3581                   return 
-EOPNOTSUPP;
87801e838 Roopa Prabhu       2018-11-28  3582           }
8bcdc4f3a Roopa Prabhu       2017-02-20  3583           conf->mtu = 
nla_get_u32(tb[IFLA_MTU]);
8bcdc4f3a Roopa Prabhu       2017-02-20 @3584   }
8bcdc4f3a Roopa Prabhu       2017-02-20  3585  
b4d306978 Stefano Brivio     2018-11-08  3586   if (data[IFLA_VXLAN_DF])
b4d306978 Stefano Brivio     2018-11-08  3587           conf->df = 
nla_get_u8(data[IFLA_VXLAN_DF]);
b4d306978 Stefano Brivio     2018-11-08  3588  
8bcdc4f3a Roopa Prabhu       2017-02-20 @3589   return 0;
05f47d69c stephen hemminger  2012-10-09  3590  }
05f47d69c stephen hemminger  2012-10-09  3591  
8bcdc4f3a Roopa Prabhu       2017-02-20  3592  static int vxlan_newlink(struct 
net *src_net, struct net_device *dev,
7a3f4a185 Matthias Schiffer  2017-06-25  3593                    struct nlattr 
*tb[], struct nlattr *data[],
7a3f4a185 Matthias Schiffer  2017-06-25  3594                    struct 
netlink_ext_ack *extack)
8bcdc4f3a Roopa Prabhu       2017-02-20  3595  {
8bcdc4f3a Roopa Prabhu       2017-02-20  3596   struct vxlan_config conf;
8bcdc4f3a Roopa Prabhu       2017-02-20  3597   int err;
8bcdc4f3a Roopa Prabhu       2017-02-20  3598  
87801e838 Roopa Prabhu       2018-11-28  3599   err = vxlan_nl2conf(tb, data, 
dev, &conf, false, extack);
8bcdc4f3a Roopa Prabhu       2017-02-20  3600   if (err)
8bcdc4f3a Roopa Prabhu       2017-02-20 @3601           return err;
8bcdc4f3a Roopa Prabhu       2017-02-20  3602  
653ef6a3e Girish Moodalbail  2017-08-11 @3603   return 
__vxlan_dev_create(src_net, dev, &conf, extack);
8bcdc4f3a Roopa Prabhu       2017-02-20  3604  }
359a0ea98 Tom Herbert        2014-06-04  3605  
8bcdc4f3a Roopa Prabhu       2017-02-20  3606  static int 
vxlan_changelink(struct net_device *dev, struct nlattr *tb[],
ad744b223 Matthias Schiffer  2017-06-25  3607                       struct 
nlattr *data[],
ad744b223 Matthias Schiffer  2017-06-25  3608                       struct 
netlink_ext_ack *extack)
8bcdc4f3a Roopa Prabhu       2017-02-20  3609  {
8bcdc4f3a Roopa Prabhu       2017-02-20  3610   struct vxlan_dev *vxlan = 
netdev_priv(dev);
8bcdc4f3a Roopa Prabhu       2017-02-20  3611   struct vxlan_rdst *dst = 
&vxlan->default_dst;
40051c4dc Ido Schimmel       2018-11-21  3612   unsigned long old_age_interval;
8bcdc4f3a Roopa Prabhu       2017-02-20  3613   struct vxlan_rdst old_dst;
8bcdc4f3a Roopa Prabhu       2017-02-20  3614   struct vxlan_config conf;
0241b8367 Roopa Prabhu       2018-07-04  3615   struct vxlan_fdb *f = NULL;
8bcdc4f3a Roopa Prabhu       2017-02-20  3616   int err;
dfd8645ea Tom Herbert        2015-01-12  3617  
8bcdc4f3a Roopa Prabhu       2017-02-20  3618   err = vxlan_nl2conf(tb, data,
87801e838 Roopa Prabhu       2018-11-28  3619                       dev, &conf, 
true, extack);
8bcdc4f3a Roopa Prabhu       2017-02-20  3620   if (err)
8bcdc4f3a Roopa Prabhu       2017-02-20  3621           return err;
dfd8645ea Tom Herbert        2015-01-12  3622  
40051c4dc Ido Schimmel       2018-11-21  3623   old_age_interval = 
vxlan->cfg.age_interval;
8bcdc4f3a Roopa Prabhu       2017-02-20  3624   memcpy(&old_dst, dst, 
sizeof(struct vxlan_rdst));
3511494ce Thomas Graf        2015-01-15  3625  
653ef6a3e Girish Moodalbail  2017-08-11  3626   err = 
vxlan_dev_configure(vxlan->net, dev, &conf, true, extack);
8bcdc4f3a Roopa Prabhu       2017-02-20  3627   if (err)
8bcdc4f3a Roopa Prabhu       2017-02-20  3628           return err;
e1e5314de Jiri Benc          2016-04-05  3629  
40051c4dc Ido Schimmel       2018-11-21  3630   if (old_age_interval != 
vxlan->cfg.age_interval)
40051c4dc Ido Schimmel       2018-11-21  3631           
mod_timer(&vxlan->age_timer, jiffies);
40051c4dc Ido Schimmel       2018-11-21  3632  
8bcdc4f3a Roopa Prabhu       2017-02-20  3633   /* handle default dst entry */
8bcdc4f3a Roopa Prabhu       2017-02-20 @3634   if 
(!vxlan_addr_equal(&dst->remote_ip, &old_dst.remote_ip)) {
8bcdc4f3a Roopa Prabhu       2017-02-20  3635           
spin_lock_bh(&vxlan->hash_lock);
8bcdc4f3a Roopa Prabhu       2017-02-20  3636           if 
(!vxlan_addr_any(&old_dst.remote_ip))
8bcdc4f3a Roopa Prabhu       2017-02-20  3637                   
__vxlan_fdb_delete(vxlan, all_zeros_mac,
8bcdc4f3a Roopa Prabhu       2017-02-20  3638                                   
   old_dst.remote_ip,
8bcdc4f3a Roopa Prabhu       2017-02-20  3639                                   
   vxlan->cfg.dst_port,
8bcdc4f3a Roopa Prabhu       2017-02-20  3640                                   
   old_dst.remote_vni,
8bcdc4f3a Roopa Prabhu       2017-02-20  3641                                   
   old_dst.remote_vni,
0e6160f3f Petr Machata       2018-11-21  3642                                   
   old_dst.remote_ifindex,
0e6160f3f Petr Machata       2018-11-21  3643                                   
   true);
0ace2ca89 Tom Herbert        2015-02-10  3644  
8bcdc4f3a Roopa Prabhu       2017-02-20  3645           if 
(!vxlan_addr_any(&dst->remote_ip)) {
0241b8367 Roopa Prabhu       2018-07-04  3646                   err = 
vxlan_fdb_create(vxlan, all_zeros_mac,
8bcdc4f3a Roopa Prabhu       2017-02-20  3647                                   
       &dst->remote_ip,
8bcdc4f3a Roopa Prabhu       2017-02-20  3648                                   
       NUD_REACHABLE | NUD_PERMANENT,
8bcdc4f3a Roopa Prabhu       2017-02-20  3649                                   
       vxlan->cfg.dst_port,
8bcdc4f3a Roopa Prabhu       2017-02-20  3650                                   
       dst->remote_vni,
8bcdc4f3a Roopa Prabhu       2017-02-20  3651                                   
       dst->remote_vni,
8bcdc4f3a Roopa Prabhu       2017-02-20  3652                                   
       dst->remote_ifindex,
0241b8367 Roopa Prabhu       2018-07-04  3653                                   
       NTF_SELF, &f);
8bcdc4f3a Roopa Prabhu       2017-02-20  3654                   if (err) {
8bcdc4f3a Roopa Prabhu       2017-02-20  3655                           
spin_unlock_bh(&vxlan->hash_lock);
8bcdc4f3a Roopa Prabhu       2017-02-20  3656                           return 
err;
8bcdc4f3a Roopa Prabhu       2017-02-20  3657                   }
0e6160f3f Petr Machata       2018-11-21 @3658                   
vxlan_fdb_notify(vxlan, f, first_remote_rtnl(f),
0e6160f3f Petr Machata       2018-11-21  3659                                   
 RTM_NEWNEIGH, true);
8bcdc4f3a Roopa Prabhu       2017-02-20  3660           }
8bcdc4f3a Roopa Prabhu       2017-02-20  3661           
spin_unlock_bh(&vxlan->hash_lock);
8bcdc4f3a Roopa Prabhu       2017-02-20  3662   }
ce577668a Chen Haiquan       2016-05-27  3663  
8bcdc4f3a Roopa Prabhu       2017-02-20  3664   return 0;
afbd8bae9 Mike Rapoport      2013-06-25  3665  }
afbd8bae9 Mike Rapoport      2013-06-25  3666  
d342894c5 stephen hemminger  2012-10-01  3667  static void vxlan_dellink(struct 
net_device *dev, struct list_head *head)
d342894c5 stephen hemminger  2012-10-01  3668  {
d342894c5 stephen hemminger  2012-10-01  3669   struct vxlan_dev *vxlan = 
netdev_priv(dev);
d342894c5 stephen hemminger  2012-10-01  3670  
8b3f9337e Roopa Prabhu       2017-01-23  3671   vxlan_flush(vxlan, true);
8b3f9337e Roopa Prabhu       2017-01-23  3672  
58ce31cca Tom Herbert        2015-08-19 @3673   
gro_cells_destroy(&vxlan->gro_cells);
553675fb5 stephen hemminger  2013-05-16  3674   list_del(&vxlan->next);
d342894c5 stephen hemminger  2012-10-01  3675   unregister_netdevice_queue(dev, 
head);
d342894c5 stephen hemminger  2012-10-01  3676  }
d342894c5 stephen hemminger  2012-10-01  3677  
d342894c5 stephen hemminger  2012-10-01  3678  static size_t 
vxlan_get_size(const struct net_device *dev)
d342894c5 stephen hemminger  2012-10-01  3679  {
d342894c5 stephen hemminger  2012-10-01  3680  
d342894c5 stephen hemminger  2012-10-01  3681   return 
nla_total_size(sizeof(__u32)) +  /* IFLA_VXLAN_ID */
e4c7ed415 Cong Wang          2013-08-31  3682           
nla_total_size(sizeof(struct in6_addr)) + /* IFLA_VXLAN_GROUP{6} */
d342894c5 stephen hemminger  2012-10-01  3683           
nla_total_size(sizeof(__u32)) + /* IFLA_VXLAN_LINK */
e4c7ed415 Cong Wang          2013-08-31  3684           
nla_total_size(sizeof(struct in6_addr)) + /* IFLA_VXLAN_LOCAL{6} */
d342894c5 stephen hemminger  2012-10-01  3685           
nla_total_size(sizeof(__u8)) +  /* IFLA_VXLAN_TTL */
8fd780698 Hangbin Liu        2018-09-26  3686           
nla_total_size(sizeof(__u8)) +  /* IFLA_VXLAN_TTL_INHERIT */
d342894c5 stephen hemminger  2012-10-01  3687           
nla_total_size(sizeof(__u8)) +  /* IFLA_VXLAN_TOS */
b4d306978 Stefano Brivio     2018-11-08  3688           
nla_total_size(sizeof(__u8)) +  /* IFLA_VXLAN_DF */
e7f70af11 Daniel Borkmann    2016-03-09  3689           
nla_total_size(sizeof(__be32)) + /* IFLA_VXLAN_LABEL */
d342894c5 stephen hemminger  2012-10-01  3690           
nla_total_size(sizeof(__u8)) +  /* IFLA_VXLAN_LEARNING */
e4f67addf David Stevens      2012-11-20  3691           
nla_total_size(sizeof(__u8)) +  /* IFLA_VXLAN_PROXY */
e4f67addf David Stevens      2012-11-20  3692           
nla_total_size(sizeof(__u8)) +  /* IFLA_VXLAN_RSC */
e4f67addf David Stevens      2012-11-20  3693           
nla_total_size(sizeof(__u8)) +  /* IFLA_VXLAN_L2MISS */
e4f67addf David Stevens      2012-11-20  3694           
nla_total_size(sizeof(__u8)) +  /* IFLA_VXLAN_L3MISS */
da8b43c0e Alexei Starovoitov 2015-08-04  3695           
nla_total_size(sizeof(__u8)) +  /* IFLA_VXLAN_COLLECT_METADATA */
d342894c5 stephen hemminger  2012-10-01  3696           
nla_total_size(sizeof(__u32)) + /* IFLA_VXLAN_AGEING */
d342894c5 stephen hemminger  2012-10-01  3697           
nla_total_size(sizeof(__u32)) + /* IFLA_VXLAN_LIMIT */
05f47d69c stephen hemminger  2012-10-09  3698           
nla_total_size(sizeof(struct ifla_vxlan_port_range)) +
823aa873b stephen hemminger  2013-04-27  3699           
nla_total_size(sizeof(__be16)) + /* IFLA_VXLAN_PORT */
359a0ea98 Tom Herbert        2014-06-04  3700           
nla_total_size(sizeof(__u8)) + /* IFLA_VXLAN_UDP_CSUM */
359a0ea98 Tom Herbert        2014-06-04  3701           
nla_total_size(sizeof(__u8)) + /* IFLA_VXLAN_UDP_ZERO_CSUM6_TX */
359a0ea98 Tom Herbert        2014-06-04  3702           
nla_total_size(sizeof(__u8)) + /* IFLA_VXLAN_UDP_ZERO_CSUM6_RX */
dfd8645ea Tom Herbert        2015-01-12  3703           
nla_total_size(sizeof(__u8)) + /* IFLA_VXLAN_REMCSUM_TX */
dfd8645ea Tom Herbert        2015-01-12  3704           
nla_total_size(sizeof(__u8)) + /* IFLA_VXLAN_REMCSUM_RX */
d342894c5 stephen hemminger  2012-10-01  3705           0;
d342894c5 stephen hemminger  2012-10-01  3706  }
d342894c5 stephen hemminger  2012-10-01  3707  
d342894c5 stephen hemminger  2012-10-01  3708  static int 
vxlan_fill_info(struct sk_buff *skb, const struct net_device *dev)
d342894c5 stephen hemminger  2012-10-01  3709  {
d342894c5 stephen hemminger  2012-10-01  3710   const struct vxlan_dev *vxlan = 
netdev_priv(dev);
c7995c43f Atzm Watanabe      2013-04-16  3711   const struct vxlan_rdst *dst = 
&vxlan->default_dst;
05f47d69c stephen hemminger  2012-10-09  3712   struct ifla_vxlan_port_range 
ports = {
0dfbdf410 Thomas Graf        2015-07-21  3713           .low =  
htons(vxlan->cfg.port_min),
0dfbdf410 Thomas Graf        2015-07-21  3714           .high = 
htons(vxlan->cfg.port_max),
05f47d69c stephen hemminger  2012-10-09  3715   };
d342894c5 stephen hemminger  2012-10-01  3716  
54bfd872b Jiri Benc          2016-02-16 @3717   if (nla_put_u32(skb, 
IFLA_VXLAN_ID, be32_to_cpu(dst->remote_vni)))
d342894c5 stephen hemminger  2012-10-01  3718           goto nla_put_failure;
d342894c5 stephen hemminger  2012-10-01  3719  
e4c7ed415 Cong Wang          2013-08-31  3720   if 
(!vxlan_addr_any(&dst->remote_ip)) {
e4c7ed415 Cong Wang          2013-08-31  3721           if 
(dst->remote_ip.sa.sa_family == AF_INET) {
930345ea6 Jiri Benc          2015-03-29  3722                   if 
(nla_put_in_addr(skb, IFLA_VXLAN_GROUP,
e4c7ed415 Cong Wang          2013-08-31  3723                                   
    dst->remote_ip.sin.sin_addr.s_addr))
e4c7ed415 Cong Wang          2013-08-31  3724                           goto 
nla_put_failure;
e4c7ed415 Cong Wang          2013-08-31  3725  #if IS_ENABLED(CONFIG_IPV6)
e4c7ed415 Cong Wang          2013-08-31  3726           } else {
930345ea6 Jiri Benc          2015-03-29  3727                   if 
(nla_put_in6_addr(skb, IFLA_VXLAN_GROUP6,
e4c7ed415 Cong Wang          2013-08-31  3728                                   
     &dst->remote_ip.sin6.sin6_addr))
d342894c5 stephen hemminger  2012-10-01  3729                           goto 
nla_put_failure;
e4c7ed415 Cong Wang          2013-08-31  3730  #endif
e4c7ed415 Cong Wang          2013-08-31  3731           }
e4c7ed415 Cong Wang          2013-08-31  3732   }
d342894c5 stephen hemminger  2012-10-01  3733  
c7995c43f Atzm Watanabe      2013-04-16  3734   if (dst->remote_ifindex && 
nla_put_u32(skb, IFLA_VXLAN_LINK, dst->remote_ifindex))
d342894c5 stephen hemminger  2012-10-01  3735           goto nla_put_failure;
d342894c5 stephen hemminger  2012-10-01  3736  
0dfbdf410 Thomas Graf        2015-07-21  3737   if 
(!vxlan_addr_any(&vxlan->cfg.saddr)) {
0dfbdf410 Thomas Graf        2015-07-21  3738           if 
(vxlan->cfg.saddr.sa.sa_family == AF_INET) {
930345ea6 Jiri Benc          2015-03-29  3739                   if 
(nla_put_in_addr(skb, IFLA_VXLAN_LOCAL,
0dfbdf410 Thomas Graf        2015-07-21  3740                                   
    vxlan->cfg.saddr.sin.sin_addr.s_addr))
e4c7ed415 Cong Wang          2013-08-31  3741                           goto 
nla_put_failure;
e4c7ed415 Cong Wang          2013-08-31  3742  #if IS_ENABLED(CONFIG_IPV6)
e4c7ed415 Cong Wang          2013-08-31  3743           } else {
930345ea6 Jiri Benc          2015-03-29  3744                   if 
(nla_put_in6_addr(skb, IFLA_VXLAN_LOCAL6,
0dfbdf410 Thomas Graf        2015-07-21  3745                                   
     &vxlan->cfg.saddr.sin6.sin6_addr))
d342894c5 stephen hemminger  2012-10-01  3746                           goto 
nla_put_failure;
e4c7ed415 Cong Wang          2013-08-31  3747  #endif
e4c7ed415 Cong Wang          2013-08-31  3748           }
e4c7ed415 Cong Wang          2013-08-31  3749   }
d342894c5 stephen hemminger  2012-10-01  3750  
0dfbdf410 Thomas Graf        2015-07-21  3751   if (nla_put_u8(skb, 
IFLA_VXLAN_TTL, vxlan->cfg.ttl) ||
8fd780698 Hangbin Liu        2018-09-26  3752       nla_put_u8(skb, 
IFLA_VXLAN_TTL_INHERIT,
8fd780698 Hangbin Liu        2018-09-26  3753                  
!!(vxlan->cfg.flags & VXLAN_F_TTL_INHERIT)) ||
0dfbdf410 Thomas Graf        2015-07-21  3754       nla_put_u8(skb, 
IFLA_VXLAN_TOS, vxlan->cfg.tos) ||
b4d306978 Stefano Brivio     2018-11-08  3755       nla_put_u8(skb, 
IFLA_VXLAN_DF, vxlan->cfg.df) ||
e7f70af11 Daniel Borkmann    2016-03-09  3756       nla_put_be32(skb, 
IFLA_VXLAN_LABEL, vxlan->cfg.label) ||
e4f67addf David Stevens      2012-11-20  3757       nla_put_u8(skb, 
IFLA_VXLAN_LEARNING,
dc5321d79 Matthias Schiffer  2017-06-19  3758                   
!!(vxlan->cfg.flags & VXLAN_F_LEARN)) ||
e4f67addf David Stevens      2012-11-20  3759       nla_put_u8(skb, 
IFLA_VXLAN_PROXY,
dc5321d79 Matthias Schiffer  2017-06-19  3760                   
!!(vxlan->cfg.flags & VXLAN_F_PROXY)) ||
dc5321d79 Matthias Schiffer  2017-06-19  3761       nla_put_u8(skb, 
IFLA_VXLAN_RSC,
dc5321d79 Matthias Schiffer  2017-06-19  3762                  
!!(vxlan->cfg.flags & VXLAN_F_RSC)) ||
e4f67addf David Stevens      2012-11-20  3763       nla_put_u8(skb, 
IFLA_VXLAN_L2MISS,
dc5321d79 Matthias Schiffer  2017-06-19  3764                   
!!(vxlan->cfg.flags & VXLAN_F_L2MISS)) ||
e4f67addf David Stevens      2012-11-20  3765       nla_put_u8(skb, 
IFLA_VXLAN_L3MISS,
dc5321d79 Matthias Schiffer  2017-06-19  3766                   
!!(vxlan->cfg.flags & VXLAN_F_L3MISS)) ||
da8b43c0e Alexei Starovoitov 2015-08-04  3767       nla_put_u8(skb, 
IFLA_VXLAN_COLLECT_METADATA,
dc5321d79 Matthias Schiffer  2017-06-19  3768                  
!!(vxlan->cfg.flags & VXLAN_F_COLLECT_METADATA)) ||
0dfbdf410 Thomas Graf        2015-07-21  3769       nla_put_u32(skb, 
IFLA_VXLAN_AGEING, vxlan->cfg.age_interval) ||
0dfbdf410 Thomas Graf        2015-07-21  3770       nla_put_u32(skb, 
IFLA_VXLAN_LIMIT, vxlan->cfg.addrmax) ||
0dfbdf410 Thomas Graf        2015-07-21  3771       nla_put_be16(skb, 
IFLA_VXLAN_PORT, vxlan->cfg.dst_port) ||
359a0ea98 Tom Herbert        2014-06-04  3772       nla_put_u8(skb, 
IFLA_VXLAN_UDP_CSUM,
dc5321d79 Matthias Schiffer  2017-06-19  3773                   
!(vxlan->cfg.flags & VXLAN_F_UDP_ZERO_CSUM_TX)) ||
359a0ea98 Tom Herbert        2014-06-04  3774       nla_put_u8(skb, 
IFLA_VXLAN_UDP_ZERO_CSUM6_TX,
dc5321d79 Matthias Schiffer  2017-06-19  3775                   
!!(vxlan->cfg.flags & VXLAN_F_UDP_ZERO_CSUM6_TX)) ||
359a0ea98 Tom Herbert        2014-06-04  3776       nla_put_u8(skb, 
IFLA_VXLAN_UDP_ZERO_CSUM6_RX,
dc5321d79 Matthias Schiffer  2017-06-19  3777                   
!!(vxlan->cfg.flags & VXLAN_F_UDP_ZERO_CSUM6_RX)) ||
dfd8645ea Tom Herbert        2015-01-12  3778       nla_put_u8(skb, 
IFLA_VXLAN_REMCSUM_TX,
dc5321d79 Matthias Schiffer  2017-06-19  3779                   
!!(vxlan->cfg.flags & VXLAN_F_REMCSUM_TX)) ||
dfd8645ea Tom Herbert        2015-01-12  3780       nla_put_u8(skb, 
IFLA_VXLAN_REMCSUM_RX,
dc5321d79 Matthias Schiffer  2017-06-19  3781                   
!!(vxlan->cfg.flags & VXLAN_F_REMCSUM_RX)))
d342894c5 stephen hemminger  2012-10-01  3782           goto nla_put_failure;
d342894c5 stephen hemminger  2012-10-01  3783  
05f47d69c stephen hemminger  2012-10-09  3784   if (nla_put(skb, 
IFLA_VXLAN_PORT_RANGE, sizeof(ports), &ports))
05f47d69c stephen hemminger  2012-10-09  3785           goto nla_put_failure;
05f47d69c stephen hemminger  2012-10-09  3786  
dc5321d79 Matthias Schiffer  2017-06-19  3787   if (vxlan->cfg.flags & 
VXLAN_F_GBP &&
3511494ce Thomas Graf        2015-01-15  3788       nla_put_flag(skb, 
IFLA_VXLAN_GBP))
3511494ce Thomas Graf        2015-01-15  3789           goto nla_put_failure;
3511494ce Thomas Graf        2015-01-15  3790  
dc5321d79 Matthias Schiffer  2017-06-19  3791   if (vxlan->cfg.flags & 
VXLAN_F_GPE &&
e1e5314de Jiri Benc          2016-04-05  3792       nla_put_flag(skb, 
IFLA_VXLAN_GPE))
e1e5314de Jiri Benc          2016-04-05  3793           goto nla_put_failure;
e1e5314de Jiri Benc          2016-04-05  3794  
dc5321d79 Matthias Schiffer  2017-06-19  3795   if (vxlan->cfg.flags & 
VXLAN_F_REMCSUM_NOPARTIAL &&
0ace2ca89 Tom Herbert        2015-02-10  3796       nla_put_flag(skb, 
IFLA_VXLAN_REMCSUM_NOPARTIAL))
0ace2ca89 Tom Herbert        2015-02-10  3797           goto nla_put_failure;
0ace2ca89 Tom Herbert        2015-02-10  3798  
d342894c5 stephen hemminger  2012-10-01  3799   return 0;
d342894c5 stephen hemminger  2012-10-01  3800  
d342894c5 stephen hemminger  2012-10-01  3801  nla_put_failure:
d342894c5 stephen hemminger  2012-10-01  3802   return -EMSGSIZE;
d342894c5 stephen hemminger  2012-10-01  3803  }
d342894c5 stephen hemminger  2012-10-01  3804  

:::::: The code at line 3526 was first introduced by commit
:::::: 87801e83818723ec4d39bd3fcff55eb8a0741a89 vxlan: extack support for some 
changelink cases

:::::: TO: Roopa Prabhu <ro...@cumulusnetworks.com>
:::::: CC: 0day robot <l...@intel.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

Reply via email to