[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201804202341.XBNA3w8M%fengguang.wu@intel.com>
Date: Fri, 20 Apr 2018 23:22:22 +0800
From: kbuild test robot <lkp@...el.com>
To: GhantaKrishnamurthy MohanKrishna
<mohan.krishna.ghanta.krishnamurthy@...csson.com>
Cc: kbuild-all@...org, tipc-discussion@...ts.sourceforge.net,
jon.maloy@...csson.com, maloy@...jonn.com, ying.xue@...driver.com,
mohan.krishna.ghanta.krishnamurthy@...csson.com,
netdev@...r.kernel.org, davem@...emloft.net
Subject: Re: [net-next 1/3] tipc: set default MTU for UDP media
Hi GhantaKrishnamurthy,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on net-next/master]
url: https://github.com/0day-ci/linux/commits/GhantaKrishnamurthy-MohanKrishna/tipc-Confgiuration-of-MTU-for-media-UDP/20180420-224412
config: x86_64-randconfig-x018-201815 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
Note: the linux-review/GhantaKrishnamurthy-MohanKrishna/tipc-Confgiuration-of-MTU-for-media-UDP/20180420-224412 HEAD 5757244a45c9114ee8a7ed60e9b074107605f6eb builds fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>):
net//tipc/udp_media.c: In function 'tipc_udp_enable':
>> net//tipc/udp_media.c:716:20: error: 'struct tipc_media' has no member named 'mtu'
b->mtu = b->media->mtu;
^~
net//tipc/udp_media.c: At top level:
net//tipc/udp_media.c:805:3: error: 'struct tipc_media' has no member named 'mtu'
.mtu = TIPC_DEF_LINK_UDP_MTU,
^~~
vim +716 net//tipc/udp_media.c
632
633 /**
634 * tipc_udp_enable - callback to create a new udp bearer instance
635 * @net: network namespace
636 * @b: pointer to generic tipc_bearer
637 * @attrs: netlink bearer configuration
638 *
639 * validate the bearer parameters and initialize the udp bearer
640 * rtnl_lock should be held
641 */
642 static int tipc_udp_enable(struct net *net, struct tipc_bearer *b,
643 struct nlattr *attrs[])
644 {
645 int err = -EINVAL;
646 struct udp_bearer *ub;
647 struct udp_media_addr remote = {0};
648 struct udp_media_addr local = {0};
649 struct udp_port_cfg udp_conf = {0};
650 struct udp_tunnel_sock_cfg tuncfg = {NULL};
651 struct nlattr *opts[TIPC_NLA_UDP_MAX + 1];
652 u8 node_id[NODE_ID_LEN] = {0,};
653
654 ub = kzalloc(sizeof(*ub), GFP_ATOMIC);
655 if (!ub)
656 return -ENOMEM;
657
658 INIT_LIST_HEAD(&ub->rcast.list);
659
660 if (!attrs[TIPC_NLA_BEARER_UDP_OPTS])
661 goto err;
662
663 if (nla_parse_nested(opts, TIPC_NLA_UDP_MAX,
664 attrs[TIPC_NLA_BEARER_UDP_OPTS],
665 tipc_nl_udp_policy, NULL))
666 goto err;
667
668 if (!opts[TIPC_NLA_UDP_LOCAL] || !opts[TIPC_NLA_UDP_REMOTE]) {
669 pr_err("Invalid UDP bearer configuration");
670 err = -EINVAL;
671 goto err;
672 }
673
674 err = tipc_parse_udp_addr(opts[TIPC_NLA_UDP_LOCAL], &local,
675 &ub->ifindex);
676 if (err)
677 goto err;
678
679 err = tipc_parse_udp_addr(opts[TIPC_NLA_UDP_REMOTE], &remote, NULL);
680 if (err)
681 goto err;
682
683 /* Autoconfigure own node identity if needed */
684 if (!tipc_own_id(net)) {
685 memcpy(node_id, local.ipv6.in6_u.u6_addr8, 16);
686 tipc_net_init(net, node_id, 0);
687 }
688 if (!tipc_own_id(net)) {
689 pr_warn("Failed to set node id, please configure manually\n");
690 err = -EINVAL;
691 goto err;
692 }
693
694 b->bcast_addr.media_id = TIPC_MEDIA_TYPE_UDP;
695 b->bcast_addr.broadcast = TIPC_BROADCAST_SUPPORT;
696 rcu_assign_pointer(b->media_ptr, ub);
697 rcu_assign_pointer(ub->bearer, b);
698 tipc_udp_media_addr_set(&b->addr, &local);
699 if (local.proto == htons(ETH_P_IP)) {
700 struct net_device *dev;
701
702 dev = __ip_dev_find(net, local.ipv4.s_addr, false);
703 if (!dev) {
704 err = -ENODEV;
705 goto err;
706 }
707 udp_conf.family = AF_INET;
708 udp_conf.local_ip.s_addr = htonl(INADDR_ANY);
709 udp_conf.use_udp_checksums = false;
710 ub->ifindex = dev->ifindex;
711 if (tipc_mtu_bad(dev, sizeof(struct iphdr) +
712 sizeof(struct udphdr))) {
713 err = -EINVAL;
714 goto err;
715 }
> 716 b->mtu = b->media->mtu;
717 #if IS_ENABLED(CONFIG_IPV6)
718 } else if (local.proto == htons(ETH_P_IPV6)) {
719 udp_conf.family = AF_INET6;
720 udp_conf.use_udp6_tx_checksums = true;
721 udp_conf.use_udp6_rx_checksums = true;
722 udp_conf.local_ip6 = in6addr_any;
723 b->mtu = 1280;
724 #endif
725 } else {
726 err = -EAFNOSUPPORT;
727 goto err;
728 }
729 udp_conf.local_udp_port = local.port;
730 err = udp_sock_create(net, &udp_conf, &ub->ubsock);
731 if (err)
732 goto err;
733 tuncfg.sk_user_data = ub;
734 tuncfg.encap_type = 1;
735 tuncfg.encap_rcv = tipc_udp_recv;
736 tuncfg.encap_destroy = NULL;
737 setup_udp_tunnel_sock(net, ub->ubsock, &tuncfg);
738
739 /**
740 * The bcast media address port is used for all peers and the ip
741 * is used if it's a multicast address.
742 */
743 memcpy(&b->bcast_addr.value, &remote, sizeof(remote));
744 if (tipc_udp_is_mcast_addr(&remote))
745 err = enable_mcast(ub, &remote);
746 else
747 err = tipc_udp_rcast_add(b, &remote);
748 if (err)
749 goto err;
750
751 return 0;
752 err:
753 if (ub->ubsock)
754 udp_tunnel_sock_release(ub->ubsock);
755 kfree(ub);
756 return err;
757 }
758
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Download attachment ".config.gz" of type "application/gzip" (27623 bytes)
Powered by blists - more mailing lists