netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: John Ousterhout <ouster@cs.stanford.edu>, netdev@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, John Ousterhout <ouster@cs.stanford.edu>
Subject: Re: [PATCH net-next 12/12] net: homa: create Makefile and Kconfig
Date: Tue, 29 Oct 2024 22:21:22 +0800	[thread overview]
Message-ID: <202410292232.sT4alx5x-lkp@intel.com> (raw)
In-Reply-To: <20241028213541.1529-13-ouster@cs.stanford.edu>

Hi John,

kernel test robot noticed the following build warnings:

[auto build test WARNING on net-next/main]

url:    https://github.com/intel-lab-lkp/linux/commits/John-Ousterhout/net-homa-define-user-visible-API-for-Homa/20241029-095137
base:   net-next/main
patch link:    https://lore.kernel.org/r/20241028213541.1529-13-ouster%40cs.stanford.edu
patch subject: [PATCH net-next 12/12] net: homa: create Makefile and Kconfig
config: m68k-allmodconfig (https://download.01.org/0day-ci/archive/20241029/202410292232.sT4alx5x-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241029/202410292232.sT4alx5x-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410292232.sT4alx5x-lkp@intel.com/

All warnings (new ones prefixed by >>):

   net/homa/homa_pool.c: In function 'homa_pool_init':
>> net/homa/homa_pool.c:55:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      55 |         if (((__u64)region) & ~PAGE_MASK)
         |              ^

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for GET_FREE_REGION
   Depends on [n]: SPARSEMEM [=n]
   Selected by [m]:
   - RESOURCE_KUNIT_TEST [=m] && RUNTIME_TESTING_MENU [=y] && KUNIT [=m]


vim +55 net/homa/homa_pool.c

2076aa7e789765 John Ousterhout 2024-10-28   40  
2076aa7e789765 John Ousterhout 2024-10-28   41  /**
2076aa7e789765 John Ousterhout 2024-10-28   42   * homa_pool_init() - Initialize a homa_pool; any previous contents of the
2076aa7e789765 John Ousterhout 2024-10-28   43   * objects are overwritten.
2076aa7e789765 John Ousterhout 2024-10-28   44   * @hsk:          Socket containing the pool to initialize.
2076aa7e789765 John Ousterhout 2024-10-28   45   * @region:       First byte of the memory region for the pool, allocated
2076aa7e789765 John Ousterhout 2024-10-28   46   *                by the application; must be page-aligned.
2076aa7e789765 John Ousterhout 2024-10-28   47   * @region_size:  Total number of bytes available at @buf_region.
2076aa7e789765 John Ousterhout 2024-10-28   48   * Return: Either zero (for success) or a negative errno for failure.
2076aa7e789765 John Ousterhout 2024-10-28   49   */
2076aa7e789765 John Ousterhout 2024-10-28   50  int homa_pool_init(struct homa_sock *hsk, void *region, __u64 region_size)
2076aa7e789765 John Ousterhout 2024-10-28   51  {
2076aa7e789765 John Ousterhout 2024-10-28   52  	struct homa_pool *pool = hsk->buffer_pool;
2076aa7e789765 John Ousterhout 2024-10-28   53  	int i, result;
2076aa7e789765 John Ousterhout 2024-10-28   54  
2076aa7e789765 John Ousterhout 2024-10-28  @55  	if (((__u64)region) & ~PAGE_MASK)
2076aa7e789765 John Ousterhout 2024-10-28   56  		return -EINVAL;
2076aa7e789765 John Ousterhout 2024-10-28   57  	pool->hsk = hsk;
2076aa7e789765 John Ousterhout 2024-10-28   58  	pool->region = (char *)region;
2076aa7e789765 John Ousterhout 2024-10-28   59  	pool->num_bpages = region_size >> HOMA_BPAGE_SHIFT;
2076aa7e789765 John Ousterhout 2024-10-28   60  	pool->descriptors = NULL;
2076aa7e789765 John Ousterhout 2024-10-28   61  	pool->cores = NULL;
2076aa7e789765 John Ousterhout 2024-10-28   62  	if (pool->num_bpages < MIN_POOL_SIZE) {
2076aa7e789765 John Ousterhout 2024-10-28   63  		result = -EINVAL;
2076aa7e789765 John Ousterhout 2024-10-28   64  		goto error;
2076aa7e789765 John Ousterhout 2024-10-28   65  	}
2076aa7e789765 John Ousterhout 2024-10-28   66  	pool->descriptors = kmalloc_array(pool->num_bpages,
2076aa7e789765 John Ousterhout 2024-10-28   67  					  sizeof(struct homa_bpage), GFP_ATOMIC);
2076aa7e789765 John Ousterhout 2024-10-28   68  	if (!pool->descriptors) {
2076aa7e789765 John Ousterhout 2024-10-28   69  		result = -ENOMEM;
2076aa7e789765 John Ousterhout 2024-10-28   70  		goto error;
2076aa7e789765 John Ousterhout 2024-10-28   71  	}
2076aa7e789765 John Ousterhout 2024-10-28   72  	for (i = 0; i < pool->num_bpages; i++) {
2076aa7e789765 John Ousterhout 2024-10-28   73  		struct homa_bpage *bp = &pool->descriptors[i];
2076aa7e789765 John Ousterhout 2024-10-28   74  
2076aa7e789765 John Ousterhout 2024-10-28   75  		spin_lock_init(&bp->lock);
2076aa7e789765 John Ousterhout 2024-10-28   76  		atomic_set(&bp->refs, 0);
2076aa7e789765 John Ousterhout 2024-10-28   77  		bp->owner = -1;
2076aa7e789765 John Ousterhout 2024-10-28   78  		bp->expiration = 0;
2076aa7e789765 John Ousterhout 2024-10-28   79  	}
2076aa7e789765 John Ousterhout 2024-10-28   80  	atomic_set(&pool->free_bpages, pool->num_bpages);
2076aa7e789765 John Ousterhout 2024-10-28   81  	pool->bpages_needed = INT_MAX;
2076aa7e789765 John Ousterhout 2024-10-28   82  
2076aa7e789765 John Ousterhout 2024-10-28   83  	/* Allocate and initialize core-specific data. */
2076aa7e789765 John Ousterhout 2024-10-28   84  	pool->cores = kmalloc_array(nr_cpu_ids, sizeof(struct homa_pool_core),
2076aa7e789765 John Ousterhout 2024-10-28   85  				    GFP_ATOMIC);
2076aa7e789765 John Ousterhout 2024-10-28   86  	if (!pool->cores) {
2076aa7e789765 John Ousterhout 2024-10-28   87  		result = -ENOMEM;
2076aa7e789765 John Ousterhout 2024-10-28   88  		goto error;
2076aa7e789765 John Ousterhout 2024-10-28   89  	}
2076aa7e789765 John Ousterhout 2024-10-28   90  	pool->num_cores = nr_cpu_ids;
2076aa7e789765 John Ousterhout 2024-10-28   91  	for (i = 0; i < pool->num_cores; i++) {
2076aa7e789765 John Ousterhout 2024-10-28   92  		pool->cores[i].page_hint = 0;
2076aa7e789765 John Ousterhout 2024-10-28   93  		pool->cores[i].allocated = 0;
2076aa7e789765 John Ousterhout 2024-10-28   94  		pool->cores[i].next_candidate = 0;
2076aa7e789765 John Ousterhout 2024-10-28   95  	}
2076aa7e789765 John Ousterhout 2024-10-28   96  	pool->check_waiting_invoked = 0;
2076aa7e789765 John Ousterhout 2024-10-28   97  
2076aa7e789765 John Ousterhout 2024-10-28   98  	return 0;
2076aa7e789765 John Ousterhout 2024-10-28   99  
2076aa7e789765 John Ousterhout 2024-10-28  100  error:
2076aa7e789765 John Ousterhout 2024-10-28  101  	kfree(pool->descriptors);
2076aa7e789765 John Ousterhout 2024-10-28  102  	kfree(pool->cores);
2076aa7e789765 John Ousterhout 2024-10-28  103  	pool->region = NULL;
2076aa7e789765 John Ousterhout 2024-10-28  104  	return result;
2076aa7e789765 John Ousterhout 2024-10-28  105  }
2076aa7e789765 John Ousterhout 2024-10-28  106  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  parent reply	other threads:[~2024-10-29 14:22 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-28 21:35 [PATCH net-next 00/12] Begin upstreaming Homa transport protocol John Ousterhout
2024-10-28 21:35 ` [PATCH net-next 01/12] net: homa: define user-visible API for Homa John Ousterhout
2024-10-29 21:59   ` Andrew Lunn
2024-10-30  4:06     ` John Ousterhout
2024-10-30 12:41       ` Andrew Lunn
2024-11-01 17:47         ` John Ousterhout
2024-11-01 18:01           ` Andrew Lunn
2024-11-07 21:58   ` Edward Cree
2024-11-08 17:55     ` John Ousterhout
2024-11-08 22:02       ` Edward Cree
2024-11-08 22:32         ` Stephen Hemminger
2024-10-28 21:35 ` [PATCH net-next 02/12] net: homa: define Homa packet formats John Ousterhout
2024-10-28 21:35 ` [PATCH net-next 03/12] net: homa: create shared Homa header files John Ousterhout
2024-10-29  6:47   ` kernel test robot
2024-11-02 19:39     ` John Ousterhout
2024-10-28 21:35 ` [PATCH net-next 04/12] net: homa: create homa_pool.h and homa_pool.c John Ousterhout
2024-10-30  0:09   ` Andrew Lunn
2024-10-30  4:15     ` John Ousterhout
2024-10-30 12:54       ` Andrew Lunn
2024-10-30 15:48         ` John Ousterhout
2024-11-04 13:12           ` Przemek Kitszel
2024-11-04 23:57             ` John Ousterhout
     [not found]         ` <CAGXJAmyLsx9DPGdhZwPxn0wXjFAFV3dqjhFHpaBLtKZ1mtYBSQ@mail.gmail.com>
     [not found]           ` <16f2e9cc-9b5e-4325-b5c7-fe7fd72600a8@lunn.ch>
2024-10-30 20:13             ` John Ousterhout
2024-10-30 20:17             ` John Ousterhout
2024-10-28 21:35 ` [PATCH net-next 05/12] net: homa: create homa_rpc.h and homa_rpc.c John Ousterhout
2024-10-28 21:35 ` [PATCH net-next 06/12] net: homa: create homa_peer.h and homa_peer.c John Ousterhout
2024-10-28 21:35 ` [PATCH net-next 07/12] net: homa: create homa_sock.h and homa_sock.c John Ousterhout
2024-10-28 21:35 ` [PATCH net-next 08/12] net: homa: create homa_incoming.c John Ousterhout
2024-10-30  1:13   ` Andrew Lunn
2024-10-30  4:51     ` John Ousterhout
2024-10-30 13:06       ` Andrew Lunn
2024-10-30 15:49         ` John Ousterhout
2024-10-30 18:23   ` Eric Dumazet
2024-10-30 18:33     ` John Ousterhout
2024-10-28 21:35 ` [PATCH net-next 09/12] net: homa: create homa_outgoing.c John Ousterhout
2024-10-30  0:42   ` Andrew Lunn
2024-10-30  4:30     ` John Ousterhout
2024-10-28 21:35 ` [PATCH net-next 10/12] net: homa: create homa_timer.c John Ousterhout
2024-10-30 19:02   ` Eric Dumazet
2024-10-31 18:55     ` John Ousterhout
2024-10-28 21:35 ` [PATCH net-next 11/12] net: homa: create homa_plumbing.c homa_utils.c John Ousterhout
2024-10-30  1:03   ` Andrew Lunn
2024-10-28 21:35 ` [PATCH net-next 12/12] net: homa: create Makefile and Kconfig John Ousterhout
2024-10-29 14:00   ` kernel test robot
2024-10-29 14:21   ` kernel test robot [this message]
2024-10-29 18:42   ` kernel test robot
2024-10-30  1:09   ` kernel test robot
2024-11-03  0:11     ` John Ousterhout

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202410292232.sT4alx5x-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=ouster@cs.stanford.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).