Backports Archive on lore.kernel.org
 help / color / Atom feed
From: Hauke Mehrtens <hauke@hauke-m.de>
To: backports@vger.kernel.org
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Subject: [PATCH 15/18] header: Remove include/net/inet_frag.h
Date: Mon,  1 Jul 2019 23:49:11 +0200
Message-ID: <20190701214914.8066-17-hauke@hauke-m.de> (raw)
In-Reply-To: <20190701214914.8066-1-hauke@hauke-m.de>

The functions provided by include/net/inet_frag.h are not used by any
code in backports any more and this file causes compile warnings
with kernel 3.16.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 backport/backport-include/net/inet_frag.h | 76 -----------------------
 backport/compat/compat-3.9.c              | 12 ----
 2 files changed, 88 deletions(-)
 delete mode 100644 backport/backport-include/net/inet_frag.h

diff --git a/backport/backport-include/net/inet_frag.h b/backport/backport-include/net/inet_frag.h
deleted file mode 100644
index f37b8a5b..00000000
--- a/backport/backport-include/net/inet_frag.h
+++ /dev/null
@@ -1,76 +0,0 @@
-#ifndef __BACKPORT__NET_FRAG_H__
-#define __BACKPORT__NET_FRAG_H__
-#include_next <net/inet_frag.h>
-#include <linux/version.h>
-
-#if LINUX_VERSION_IS_LESS(3,9,0)
-/* Memory Tracking Functions. */
-#define frag_mem_limit LINUX_BACKPORT(frag_mem_limit)
-static inline int frag_mem_limit(struct netns_frags *nf)
-{
-	return atomic_read(&nf->mem);
-}
-
-#define init_frag_mem_limit LINUX_BACKPORT(init_frag_mem_limit)
-static inline void init_frag_mem_limit(struct netns_frags *nf)
-{
-	atomic_set(&nf->mem, 0);
-}
-
-#define sum_frag_mem_limit LINUX_BACKPORT(sum_frag_mem_limit)
-static inline int sum_frag_mem_limit(struct netns_frags *nf)
-{
-	return atomic_read(&nf->mem);
-}
-
-#define inet_frag_maybe_warn_overflow LINUX_BACKPORT(inet_frag_maybe_warn_overflow)
-void inet_frag_maybe_warn_overflow(struct inet_frag_queue *q,
-				   const char *prefix);
-#endif /* LINUX_VERSION_IS_LESS(3,9,0) */
-
-/* the type of the paramater changed with kernel 4.3 */
-#if LINUX_VERSION_IS_LESS(3,9,0) || LINUX_VERSION_IN_RANGE(3,16,51, 3,17,0)
-#define sub_frag_mem_limit LINUX_BACKPORT(sub_frag_mem_limit)
-static inline void sub_frag_mem_limit(struct netns_frags *nf, int i)
-{
-	atomic_sub(i, &nf->mem);
-}
-
-#define add_frag_mem_limit LINUX_BACKPORT(add_frag_mem_limit)
-static inline void add_frag_mem_limit(struct netns_frags *nf, int i)
-{
-	atomic_add(i, &nf->mem);
-}
-#elif LINUX_VERSION_IS_LESS(4,3,0)
-#define sub_frag_mem_limit LINUX_BACKPORT(sub_frag_mem_limit)
-static inline void sub_frag_mem_limit(struct netns_frags *nf, int i)
-{
-	__percpu_counter_add(&nf->mem, -i, frag_percpu_counter_batch);
-}
-
-#define add_frag_mem_limit LINUX_BACKPORT(add_frag_mem_limit)
-static inline void add_frag_mem_limit(struct netns_frags *nf, int i)
-{
-	__percpu_counter_add(&nf->mem, i, frag_percpu_counter_batch);
-}
-#endif /* LINUX_VERSION_IS_LESS(4,3,0) */
-
-#if LINUX_VERSION_IS_LESS(4,4,0) && \
-    LINUX_VERSION_IS_GEQ(3,9,0)
-#define inet_frags_uninit_net LINUX_BACKPORT(inet_frags_uninit_net)
-static inline void inet_frags_uninit_net(struct netns_frags *nf)
-{
-	percpu_counter_destroy(&nf->mem);
-}
-#endif /* < 4.4 && >= 3.9 */
-
-#if LINUX_VERSION_IS_LESS(4,4,0)
-static inline int backport_inet_frags_init_net(struct netns_frags *nf)
-{
-	inet_frags_init_net(nf);
-	return 0;
-}
-#define inet_frags_init_net LINUX_BACKPORT(inet_frags_init_net)
-#endif /* < 4.4 */
-
-#endif /* __BACKPORT__NET_FRAG_H__ */
diff --git a/backport/compat/compat-3.9.c b/backport/compat/compat-3.9.c
index 93889b55..6975a788 100644
--- a/backport/compat/compat-3.9.c
+++ b/backport/compat/compat-3.9.c
@@ -61,18 +61,6 @@ void eth_commit_mac_addr_change(struct net_device *dev, void *p)
 }
 EXPORT_SYMBOL_GPL(eth_commit_mac_addr_change);
 
-void inet_frag_maybe_warn_overflow(struct inet_frag_queue *q,
-				   const char *prefix)
-{
-	static const char msg[] = "inet_frag_find: Fragment hash bucket"
-		" list length grew over limit " __stringify(INETFRAGS_MAXDEPTH)
-		". Dropping fragment.\n";
-
-	if (PTR_ERR(q) == -ENOBUFS)
-		LIMIT_NETDEBUG(KERN_WARNING "%s%s", prefix, msg);
-}
-EXPORT_SYMBOL_GPL(inet_frag_maybe_warn_overflow);
-
 void __sg_page_iter_start(struct sg_page_iter *piter,
 			  struct scatterlist *sglist, unsigned int nents,
 			  unsigned long pgoffset)
-- 
2.20.1

--
To unsubscribe from this list: send the line "unsubscribe backports" in

  parent reply index

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-01 21:48 [PATCH 00/18] backports: Update for kernel 5.2 Hauke Mehrtens
2019-07-01 21:48 ` [PATCH 01/18] patches: update select queue patches Hauke Mehrtens
2019-07-01 21:48 ` [PATCH 02/18] backport: rcupdate: add rcu_head_init and rcu_head_after_call_rcu Hauke Mehrtens
2019-07-01 21:48 ` [PATCH 03/18] backport: check for failure when allocating ops in genetlink Hauke Mehrtens
2019-07-01 21:48 ` [PATCH 04/18] backport-include: add empty lockdep_map structure in lockdep.h Hauke Mehrtens
2019-07-01 21:49 ` [PATCH 05/18] patches: Make patches apply on top of kernel 5.2-rc6 Hauke Mehrtens
2019-07-01 21:49 ` [PATCH 06/18] backport: Extend netlink parsing with strict validation Hauke Mehrtens
2019-07-01 21:49 ` [PATCH 07/18] header: Add backport-include/net/ipv6_stubs.h Hauke Mehrtens
2019-07-01 21:49 ` [PATCH 08/18] header: Add sdio_retune*() functions Hauke Mehrtens
2019-07-01 21:49 ` [PATCH 09/18] header: Add HRTIMER_MODE_{ABS,REL}_SOFT Hauke Mehrtens
2019-07-01 21:49 ` [PATCH 10/18] patch: Remove usage of DMI_PRODUCT_SKU Hauke Mehrtens
2019-07-01 21:49 ` [PATCH 11/18] header: Make napi_complete_done() return bool Hauke Mehrtens
2019-07-01 21:49 ` [PATCH 12/18] header: add hrtimer_forward() and ns_to_ktime() Hauke Mehrtens
2019-07-01 21:49 ` [PATCH 13/18] dependencies: Add MT7615E dependency Hauke Mehrtens
2019-07-01 21:49 ` [PATCH 14/18] patches: rtw88: Add missing include on kernel 3.18 Hauke Mehrtens
2019-07-01 21:49 ` [PATCH 14/18] " Hauke Mehrtens
2019-07-01 21:49 ` Hauke Mehrtens [this message]
2019-07-01 21:49 ` [PATCH 16/18] defconfig: update wifi defconfig Hauke Mehrtens
2019-07-01 21:49 ` [PATCH 17/18] header: fix of_get_mac_address() Hauke Mehrtens
2019-07-01 21:49 ` [PATCH 18/18] header: add support for GCC7 and GCC8 Hauke Mehrtens
2019-07-02  7:44   ` Johannes Berg

Reply instructions:

You may reply publically 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=20190701214914.8066-17-hauke@hauke-m.de \
    --to=hauke@hauke-m.de \
    --cc=backports@vger.kernel.org \
    /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

Backports Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/backports/0 backports/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 backports backports/ https://lore.kernel.org/backports \
		backports@vger.kernel.org backports@archiver.kernel.org
	public-inbox-index backports


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.backports


AGPL code for this site: git clone https://public-inbox.org/ public-inbox