From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============5228730178267712084==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [RFC PATCH 2/5] driver/net/tun: Added features for USO. Date: Tue, 25 Jan 2022 23:14:05 +0800 Message-ID: <202201252316.Wm0ucNBh-lkp@intel.com> In-Reply-To: <20220125084702.3636253-3-andrew@daynix.com> List-Id: --===============5228730178267712084== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Andrew, [FYI, it's a private test report for your RFC patch.] [auto build test WARNING on net-next/master] [also build test WARNING on net/master mst-vhost/linux-next linus/master v5= .17-rc1 next-20220125] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Andrew-Melnychenko/TUN-Vir= tioNet-USO-features-support/20220125-171057 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git = 6e667749271e58d34238cf700e543beabdbe6184 config: mips-allyesconfig (https://download.01.org/0day-ci/archive/20220125= /202201252316.Wm0ucNBh-lkp(a)intel.com/config) compiler: mips-linux-gcc (GCC) 11.2.0 reproduce (this is a W=3D1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/= make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/3c1c2daa10c8eac3d9b546fa8= caf99fcb5a40454 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Andrew-Melnychenko/TUN-VirtioNet-U= SO-features-support/20220125-171057 git checkout 3c1c2daa10c8eac3d9b546fa8caf99fcb5a40454 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-11.2.0 make.cross= O=3Dbuild_dir ARCH=3Dmips SHELL=3D/bin/bash drivers/net/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): drivers/net/tap.c: In function 'set_offload': >> drivers/net/tap.c:945:25: warning: suggest parentheses around comparison= in operand of '&' [-Wparentheses] 945 | if (arg & (TUN_F_USO4 | TUN_F_USO6) =3D=3D (TUN_= F_USO4 | TUN_F_USO6)) | ^ drivers/net/tap.c:958:26: warning: suggest parentheses around comparison= in operand of '&' [-Wparentheses] 958 | feature_mask & (TUN_F_USO4 | TUN_F_USO6) =3D=3D (TUN= _F_USO4 | TUN_F_USO6)) | ^ vim +945 drivers/net/tap.c 919 = 920 static int set_offload(struct tap_queue *q, unsigned long arg) 921 { 922 struct tap_dev *tap; 923 netdev_features_t features; 924 netdev_features_t feature_mask =3D 0; 925 = 926 tap =3D rtnl_dereference(q->tap); 927 if (!tap) 928 return -ENOLINK; 929 = 930 features =3D tap->dev->features; 931 = 932 if (arg & TUN_F_CSUM) { 933 feature_mask =3D NETIF_F_HW_CSUM; 934 = 935 if (arg & (TUN_F_TSO4 | TUN_F_TSO6)) { 936 if (arg & TUN_F_TSO_ECN) 937 feature_mask |=3D NETIF_F_TSO_ECN; 938 if (arg & TUN_F_TSO4) 939 feature_mask |=3D NETIF_F_TSO; 940 if (arg & TUN_F_TSO6) 941 feature_mask |=3D NETIF_F_TSO6; 942 } 943 = 944 /* TODO: for now USO4 and USO6 should work simultaneously */ > 945 if (arg & (TUN_F_USO4 | TUN_F_USO6) =3D=3D (TUN_F_USO4 | TUN_F_USO= 6)) 946 features |=3D NETIF_F_GSO_UDP_L4; 947 } 948 = 949 /* tun/tap driver inverts the usage for TSO offloads, where 950 * setting the TSO bit means that the userspace wants to 951 * accept TSO frames and turning it off means that user space 952 * does not support TSO. 953 * For tap, we have to invert it to mean the same thing. 954 * When user space turns off TSO, we turn off GSO/LRO so that 955 * user-space will not receive TSO frames. 956 */ 957 if (feature_mask & (NETIF_F_TSO | NETIF_F_TSO6) || 958 feature_mask & (TUN_F_USO4 | TUN_F_USO6) =3D=3D (TUN_F_USO4 | T= UN_F_USO6)) 959 features |=3D RX_OFFLOADS; 960 else 961 features &=3D ~RX_OFFLOADS; 962 = 963 /* tap_features are the same as features on tun/tap and 964 * reflect user expectations. 965 */ 966 tap->tap_features =3D feature_mask; 967 if (tap->update_features) 968 tap->update_features(tap, features); 969 = 970 return 0; 971 } 972 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============5228730178267712084==--