lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202006171731.kxSqRiHH%lkp@intel.com>
Date:   Wed, 17 Jun 2020 17:40:34 +0800
From:   kernel test robot <lkp@...el.com>
To:     Sameeh Jubran <sameehj@...zon.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: drivers/net/ethernet/amazon/ena/ena_netdev.c:312:9: warning: missing
 braces around initializer

Hi Sameeh,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   69119673bd50b176ded34032fadd41530fb5af21
commit: 548c4940b9f1f527f81509468dd60b61418880b6 net: ena: Implement XDP_TX action
date:   6 months ago
config: i386-randconfig-r004-20200617 (attached as .config)
compiler: gcc-4.9 (Ubuntu 4.9.3-13ubuntu2) 4.9.3
reproduce (this is a W=1 build):
        git checkout 548c4940b9f1f527f81509468dd60b61418880b6
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>, old ones prefixed by <<):

drivers/net/ethernet/amazon/ena/ena_netdev.c: In function 'ena_xdp_xmit_buff':
>> drivers/net/ethernet/amazon/ena/ena_netdev.c:312:9: warning: missing braces around initializer [-Wmissing-braces]
struct ena_com_tx_ctx ena_tx_ctx = {0};
^
drivers/net/ethernet/amazon/ena/ena_netdev.c:312:9: warning: (near initialization for 'ena_tx_ctx.ena_meta') [-Wmissing-braces]
drivers/net/ethernet/amazon/ena/ena_netdev.c:315:19: warning: variable 'rx_ring' set but not used [-Wunused-but-set-variable]
struct ena_ring *rx_ring;
^
drivers/net/ethernet/amazon/ena/ena_netdev.c: At top level:
drivers/net/ethernet/amazon/ena/ena_netdev.c:465:6: warning: no previous prototype for 'ena_xdp_exchange_program_rx_in_range' [-Wmissing-prototypes]
void ena_xdp_exchange_program_rx_in_range(struct ena_adapter *adapter,
^
drivers/net/ethernet/amazon/ena/ena_netdev.c:486:6: warning: no previous prototype for 'ena_xdp_exchange_program' [-Wmissing-prototypes]
void ena_xdp_exchange_program(struct ena_adapter *adapter,
^
drivers/net/ethernet/amazon/ena/ena_netdev.c:1553:5: warning: no previous prototype for 'ena_xdp_handle_buff' [-Wmissing-prototypes]
int ena_xdp_handle_buff(struct ena_ring *rx_ring, struct xdp_buff *xdp)
^

vim +312 drivers/net/ethernet/amazon/ena/ena_netdev.c

   305	
   306	static int ena_xdp_xmit_buff(struct net_device *dev,
   307				     struct xdp_buff *xdp,
   308				     int qid,
   309				     struct ena_rx_buffer *rx_info)
   310	{
   311		struct ena_adapter *adapter = netdev_priv(dev);
 > 312		struct ena_com_tx_ctx ena_tx_ctx = {0};
   313		struct ena_tx_buffer *tx_info;
   314		struct ena_ring *xdp_ring;
   315		struct ena_ring *rx_ring;
   316		u16 next_to_use, req_id;
   317		int rc;
   318		void *push_hdr;
   319		u32 push_len;
   320	
   321		xdp_ring = &adapter->tx_ring[qid];
   322		next_to_use = xdp_ring->next_to_use;
   323		req_id = xdp_ring->free_ids[next_to_use];
   324		tx_info = &xdp_ring->tx_buffer_info[req_id];
   325		tx_info->num_of_bufs = 0;
   326		rx_ring = &xdp_ring->adapter->rx_ring[qid -
   327			  xdp_ring->adapter->xdp_first_ring];
   328		page_ref_inc(rx_info->page);
   329		tx_info->xdp_rx_page = rx_info->page;
   330	
   331		rc = ena_xdp_tx_map_buff(xdp_ring, tx_info, xdp, &push_hdr, &push_len);
   332		if (unlikely(rc))
   333			goto error_drop_packet;
   334	
   335		ena_tx_ctx.ena_bufs = tx_info->bufs;
   336		ena_tx_ctx.push_header = push_hdr;
   337		ena_tx_ctx.num_bufs = tx_info->num_of_bufs;
   338		ena_tx_ctx.req_id = req_id;
   339		ena_tx_ctx.header_len = push_len;
   340	
   341		rc = ena_xmit_common(dev,
   342				     xdp_ring,
   343				     tx_info,
   344				     &ena_tx_ctx,
   345				     next_to_use,
   346				     xdp->data_end - xdp->data);
   347		if (rc)
   348			goto error_unmap_dma;
   349		/* trigger the dma engine. ena_com_write_sq_doorbell()
   350		 * has a mb
   351		 */
   352		ena_com_write_sq_doorbell(xdp_ring->ena_com_io_sq);
   353		u64_stats_update_begin(&xdp_ring->syncp);
   354		xdp_ring->tx_stats.doorbells++;
   355		u64_stats_update_end(&xdp_ring->syncp);
   356	
   357		return NETDEV_TX_OK;
   358	
   359	error_unmap_dma:
   360		ena_unmap_tx_buff(xdp_ring, tx_info);
   361		tx_info->xdpf = NULL;
   362	error_drop_packet:
   363	
   364		return NETDEV_TX_OK;
   365	}
   366	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (34245 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ