Lines Matching defs:nc

245 	struct napi_alloc_cache *nc = this_cpu_ptr(&napi_alloc_cache);
251 data = __page_frag_alloc_align(&nc->page, fragsz,
264 struct page_frag_cache *nc = this_cpu_ptr(&netdev_alloc_cache);
267 data = __page_frag_alloc_align(nc, fragsz,
286 struct napi_alloc_cache *nc = this_cpu_ptr(&napi_alloc_cache);
290 if (unlikely(!nc->skb_count)) {
294 nc->skb_cache))
295 nc->skb_count = NAPI_SKB_CACHE_BULK;
296 if (unlikely(!nc->skb_count)) {
302 skb = nc->skb_cache[--nc->skb_count];
303 if (nc->skb_count)
304 prefetch(nc->skb_cache[nc->skb_count - 1]);
346 struct napi_alloc_cache *nc = this_cpu_ptr(&napi_alloc_cache);
351 if (nc->skb_count >= n)
355 bulk = min(NAPI_SKB_CACHE_SIZE - nc->skb_count, NAPI_SKB_CACHE_BULK);
358 &nc->skb_cache[nc->skb_count]))
359 nc->skb_count += bulk;
360 if (likely(nc->skb_count >= n))
366 n - nc->skb_count, &skbs[nc->skb_count]))
367 n = nc->skb_count;
368 if (likely(nc->skb_count >= n))
372 total -= n - nc->skb_count;
373 n = nc->skb_count;
376 for (u32 base = nc->skb_count - n, i = 0; i < n; i++) {
377 skbs[i] = nc->skb_cache[base + i];
383 nc->skb_count -= n;
764 struct page_frag_cache *nc;
789 nc = this_cpu_ptr(&netdev_alloc_cache);
790 data = page_frag_alloc(nc, len, gfp_mask);
791 pfmemalloc = page_frag_cache_is_pfmemalloc(nc);
796 nc = this_cpu_ptr(&napi_alloc_cache.page);
797 data = page_frag_alloc(nc, len, gfp_mask);
798 pfmemalloc = page_frag_cache_is_pfmemalloc(nc);
841 struct napi_alloc_cache *nc;
868 nc = this_cpu_ptr(&napi_alloc_cache);
870 data = page_frag_alloc(&nc->page, len, gfp_mask);
871 pfmemalloc = page_frag_cache_is_pfmemalloc(&nc->page);
1460 struct napi_alloc_cache *nc = this_cpu_ptr(&napi_alloc_cache);
1466 nc->skb_cache[nc->skb_count++] = skb;
1468 if (unlikely(nc->skb_count == NAPI_SKB_CACHE_SIZE)) {
1472 kasan_mempool_unpoison_object(nc->skb_cache[i],
1477 nc->skb_cache + remaining);
1478 nc->skb_count = remaining;