All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net: Remove useless function skb_header_release
@ 2017-09-19 14:32 gfree.wind
  2017-09-20 21:30 ` David Miller
  0 siblings, 1 reply; 6+ messages in thread
From: gfree.wind @ 2017-09-19 14:32 UTC (permalink / raw)
  To: davem, linux-kernel; +Cc: Gao Feng

From: Gao Feng <gfree.wind@vip.163.com>

There is no one which would invokes the function skb_header_release.
So just remove it now.

Signed-off-by: Gao Feng <gfree.wind@vip.163.com>
---
 include/linux/skbuff.h | 16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 72299ef..ce632cd 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1457,22 +1457,6 @@ static inline int skb_header_unclone(struct sk_buff *skb, gfp_t pri)
 }
 
 /**
- *	skb_header_release - release reference to header
- *	@skb: buffer to operate on
- *
- *	Drop a reference to the header part of the buffer.  This is done
- *	by acquiring a payload reference.  You must not read from the header
- *	part of skb->data after this.
- *	Note : Check if you can use __skb_header_release() instead.
- */
-static inline void skb_header_release(struct sk_buff *skb)
-{
-	BUG_ON(skb->nohdr);
-	skb->nohdr = 1;
-	atomic_add(1 << SKB_DATAREF_SHIFT, &skb_shinfo(skb)->dataref);
-}
-
-/**
  *	__skb_header_release - release reference to header
  *	@skb: buffer to operate on
  *
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] net: Remove useless function skb_header_release
  2017-09-19 14:32 [PATCH net-next] net: Remove useless function skb_header_release gfree.wind
@ 2017-09-20 21:30 ` David Miller
  2017-09-21  4:37   ` Gao Feng
  0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2017-09-20 21:30 UTC (permalink / raw)
  To: gfree.wind; +Cc: linux-kernel

From: gfree.wind@vip.163.com
Date: Tue, 19 Sep 2017 22:32:48 +0800

> From: Gao Feng <gfree.wind@vip.163.com>
> 
> There is no one which would invokes the function skb_header_release.
> So just remove it now.
> 
> Signed-off-by: Gao Feng <gfree.wind@vip.163.com>

Networking patches must be at least CC:'d to netdev@vger.kernel.org,
thank you.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re:Re: [PATCH net-next] net: Remove useless function skb_header_release
  2017-09-20 21:30 ` David Miller
@ 2017-09-21  4:37   ` Gao Feng
  0 siblings, 0 replies; 6+ messages in thread
From: Gao Feng @ 2017-09-21  4:37 UTC (permalink / raw)
  To: David Miller; +Cc: linux-kernel


At 2017-09-21 05:30:46, "David Miller" <davem@davemloft.net> wrote:
>From: gfree.wind@vip.163.com
>Date: Tue, 19 Sep 2017 22:32:48 +0800
>
>> From: Gao Feng <gfree.wind@vip.163.com>
>> 
>> There is no one which would invokes the function skb_header_release.
>> So just remove it now.
>> 
>> Signed-off-by: Gao Feng <gfree.wind@vip.163.com>
>
>Networking patches must be at least CC:'d to netdev@vger.kernel.org,
>thank you.

Thanks your reminder.
I just used the result of get_maintainer.pl, and didn't noticed this point you mentioned.

I would send it again.

Regards
Feng

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next ] net: Remove useless function skb_header_release
  2017-09-21  4:39 [PATCH net-next ] " gfree.wind
  2017-09-21  4:49 ` Joe Perches
@ 2017-09-21 22:25 ` David Miller
  1 sibling, 0 replies; 6+ messages in thread
From: David Miller @ 2017-09-21 22:25 UTC (permalink / raw)
  To: gfree.wind; +Cc: netdev

From: gfree.wind@vip.163.com
Date: Thu, 21 Sep 2017 12:39:31 +0800

> From: Gao Feng <gfree.wind@vip.163.com>
> 
> There is no one which would invokes the function skb_header_release.
> So just remove it now.
> 
> Signed-off-by: Gao Feng <gfree.wind@vip.163.com>

As Joe Perches mentioned, there are comment references remaining.

This should be removed too because they can be confusing for people.

Thanks.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next ] net: Remove useless function skb_header_release
  2017-09-21  4:39 [PATCH net-next ] " gfree.wind
@ 2017-09-21  4:49 ` Joe Perches
  2017-09-21 22:25 ` David Miller
  1 sibling, 0 replies; 6+ messages in thread
From: Joe Perches @ 2017-09-21  4:49 UTC (permalink / raw)
  To: gfree.wind, davem, netdev

On Thu, 2017-09-21 at 12:39 +0800, gfree.wind@vip.163.com wrote:
> From: Gao Feng <gfree.wind@vip.163.com>
> 
> There is no one which would invokes the function skb_header_release.
> So just remove it now.

This in incomplete.
There are other references to this function.

$ git grep -w skb_header_release
drivers/net/usb/asix_common.c:	 * TCP packets for example are cloned, but skb_header_release()
include/linux/skbuff.h: *	skb_header_release - release reference to header
include/linux/skbuff.h:static inline void skb_header_release(struct sk_buff *skb)
include/linux/skbuff.h: *	Variant of skb_header_release() assuming skb is private to caller.
net/batman-adv/soft-interface.c:	 * data using skb_header_release in our skbs to allow skb_cow_header to

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH net-next ] net: Remove useless function skb_header_release
@ 2017-09-21  4:39 gfree.wind
  2017-09-21  4:49 ` Joe Perches
  2017-09-21 22:25 ` David Miller
  0 siblings, 2 replies; 6+ messages in thread
From: gfree.wind @ 2017-09-21  4:39 UTC (permalink / raw)
  To: davem, netdev; +Cc: Gao Feng

From: Gao Feng <gfree.wind@vip.163.com>

There is no one which would invokes the function skb_header_release.
So just remove it now.

Signed-off-by: Gao Feng <gfree.wind@vip.163.com>
---
 include/linux/skbuff.h | 16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 72299ef..ce632cd 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1457,22 +1457,6 @@ static inline int skb_header_unclone(struct sk_buff *skb, gfp_t pri)
 }
 
 /**
- *	skb_header_release - release reference to header
- *	@skb: buffer to operate on
- *
- *	Drop a reference to the header part of the buffer.  This is done
- *	by acquiring a payload reference.  You must not read from the header
- *	part of skb->data after this.
- *	Note : Check if you can use __skb_header_release() instead.
- */
-static inline void skb_header_release(struct sk_buff *skb)
-{
-	BUG_ON(skb->nohdr);
-	skb->nohdr = 1;
-	atomic_add(1 << SKB_DATAREF_SHIFT, &skb_shinfo(skb)->dataref);
-}
-
-/**
  *	__skb_header_release - release reference to header
  *	@skb: buffer to operate on
  *
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-09-21 22:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-19 14:32 [PATCH net-next] net: Remove useless function skb_header_release gfree.wind
2017-09-20 21:30 ` David Miller
2017-09-21  4:37   ` Gao Feng
2017-09-21  4:39 [PATCH net-next ] " gfree.wind
2017-09-21  4:49 ` Joe Perches
2017-09-21 22:25 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.