linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Albert Zhou <albert.zhou.50@gmail.com>
To: gregkh@linuxfoundation.org
Cc: linux-usb@vger.kernel.org, nic_swsd@realtek.com,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, netdev@vger.kernel.org
Subject: [PATCH net-next RFC 1/5] net: move back netif_set_gso_max helpers
Date: Wed,  9 Nov 2022 02:33:38 +1100	[thread overview]
Message-ID: <20221108153342.18979-2-albert.zhou.50@gmail.com> (raw)
In-Reply-To: <20221108153342.18979-1-albert.zhou.50@gmail.com>

Reverse commit 744d49daf8bd ("net: move netif_set_gso_max helpers") by
moving the functions netif_set_gso_max* back to netdevice.h so that the
updated R8152 v2 driver can use them.

Signed-off-by: Albert Zhou <albert.zhou.50@gmail.com>
---
 include/linux/netdevice.h | 21 +++++++++++++++++++++
 net/core/dev.h            | 21 ---------------------
 2 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index eddf8ee270e7..8fa98c67a466 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -4952,6 +4952,27 @@ static inline bool netif_needs_gso(struct sk_buff *skb,
 			 (skb->ip_summed != CHECKSUM_UNNECESSARY)));
 }
 
+static inline void netif_set_gso_max_size(struct net_device *dev,
+					  unsigned int size)
+{
+	/* dev->gso_max_size is read locklessly from sk_setup_caps() */
+	WRITE_ONCE(dev->gso_max_size, size);
+}
+
+static inline void netif_set_gso_max_segs(struct net_device *dev,
+					  unsigned int segs)
+{
+	/* dev->gso_max_segs is read locklessly from sk_setup_caps() */
+	WRITE_ONCE(dev->gso_max_segs, segs);
+}
+
+static inline void netif_set_gro_max_size(struct net_device *dev,
+					  unsigned int size)
+{
+	/* This pairs with the READ_ONCE() in skb_gro_receive() */
+	WRITE_ONCE(dev->gro_max_size, size);
+}
+
 void netif_set_tso_max_size(struct net_device *dev, unsigned int size);
 void netif_set_tso_max_segs(struct net_device *dev, unsigned int segs);
 void netif_inherit_tso_max(struct net_device *to,
diff --git a/net/core/dev.h b/net/core/dev.h
index cbb8a925175a..c3a4dc66e4b3 100644
--- a/net/core/dev.h
+++ b/net/core/dev.h
@@ -88,25 +88,4 @@ int dev_change_carrier(struct net_device *dev, bool new_carrier);
 
 void __dev_set_rx_mode(struct net_device *dev);
 
-static inline void netif_set_gso_max_size(struct net_device *dev,
-					  unsigned int size)
-{
-	/* dev->gso_max_size is read locklessly from sk_setup_caps() */
-	WRITE_ONCE(dev->gso_max_size, size);
-}
-
-static inline void netif_set_gso_max_segs(struct net_device *dev,
-					  unsigned int segs)
-{
-	/* dev->gso_max_segs is read locklessly from sk_setup_caps() */
-	WRITE_ONCE(dev->gso_max_segs, segs);
-}
-
-static inline void netif_set_gro_max_size(struct net_device *dev,
-					  unsigned int size)
-{
-	/* This pairs with the READ_ONCE() in skb_gro_receive() */
-	WRITE_ONCE(dev->gro_max_size, size);
-}
-
 #endif
-- 
2.34.1


  reply	other threads:[~2022-11-08 15:33 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-08 15:33 [PATCH net-next RFC 0/5] Update r8152 to version two Albert Zhou
2022-11-08 15:33 ` Albert Zhou [this message]
2022-11-08 17:27   ` [PATCH net-next RFC 1/5] net: move back netif_set_gso_max helpers Greg KH
2022-11-08 15:33 ` [PATCH net-next RFC 3/5] r8152: remove backwards compatibility Albert Zhou
2022-11-08 15:33 ` [PATCH net-next RFC 4/5] r8152: merge header into source Albert Zhou
2022-11-08 15:33 ` [PATCH net-next RFC 5/5] r8152: remove redundant code Albert Zhou
     [not found] ` <20221108153342.18979-3-albert.zhou.50@gmail.com>
2022-11-08 17:28   ` [PATCH net-next RFC 2/5] r8152: update to version two Greg KH
2022-11-09  4:50     ` Albert Zhou
2022-11-09  7:42       ` Greg KH
2022-11-08 20:50 ` [PATCH net-next RFC 0/5] Update r8152 " Jakub Kicinski
2022-11-09  4:43   ` Albert Zhou
2022-11-09 18:40     ` Jakub Kicinski
2022-11-16 15:13       ` Albert Zhou
2022-11-16 16:34         ` Jakub Kicinski
2022-11-08 21:03 ` Francois Romieu
2022-11-09  4:54   ` Albert Zhou
2022-11-09 11:02 ` Hayes Wang
2022-11-09 11:20   ` Albert Zhou

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=20221108153342.18979-2-albert.zhou.50@gmail.com \
    --to=albert.zhou.50@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kuba@kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nic_swsd@realtek.com \
    --cc=pabeni@redhat.com \
    /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).