linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] drivers/net/wan/x25_asy: Remove an unnecessary x25_type_trans call
@ 2020-09-12  2:18 Xie He
  2020-09-14  5:32 ` Martin Schiller
  2020-09-14 21:41 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Xie He @ 2020-09-12  2:18 UTC (permalink / raw)
  To: David S. Miller, Jakub Kicinski, netdev, linux-kernel
  Cc: Xie He, Martin Schiller

x25_type_trans only needs to be called before we call netif_rx to pass
the skb to upper layers.

It does not need to be called before lapb_data_received. The LAPB module
does not need the fields that are set by calling it.

In the other two X.25 drivers - lapbether and hdlc_x25. x25_type_trans
is only called before netif_rx and not before lapb_data_received.

Cc: Martin Schiller <ms@dev.tdt.de>
Signed-off-by: Xie He <xie.he.0141@gmail.com>
---
 drivers/net/wan/x25_asy.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c
index 5a7cf8bf9d0d..ab56a5e6447a 100644
--- a/drivers/net/wan/x25_asy.c
+++ b/drivers/net/wan/x25_asy.c
@@ -202,8 +202,7 @@ static void x25_asy_bump(struct x25_asy *sl)
 		return;
 	}
 	skb_put_data(skb, sl->rbuff, count);
-	skb->protocol = x25_type_trans(skb, sl->dev);
-	err = lapb_data_received(skb->dev, skb);
+	err = lapb_data_received(sl->dev, skb);
 	if (err != LAPB_OK) {
 		kfree_skb(skb);
 		printk(KERN_DEBUG "x25_asy: data received err - %d\n", err);
-- 
2.25.1


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

* Re: [PATCH net-next] drivers/net/wan/x25_asy: Remove an unnecessary x25_type_trans call
  2020-09-12  2:18 [PATCH net-next] drivers/net/wan/x25_asy: Remove an unnecessary x25_type_trans call Xie He
@ 2020-09-14  5:32 ` Martin Schiller
  2020-09-14  6:24   ` Xie He
  2020-09-14 21:41 ` David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Martin Schiller @ 2020-09-14  5:32 UTC (permalink / raw)
  To: Xie He; +Cc: David S. Miller, Jakub Kicinski, netdev, linux-kernel

On 2020-09-12 04:18, Xie He wrote:
> x25_type_trans only needs to be called before we call netif_rx to pass
> the skb to upper layers.
> 
> It does not need to be called before lapb_data_received. The LAPB 
> module
> does not need the fields that are set by calling it.
> 
> In the other two X.25 drivers - lapbether and hdlc_x25. x25_type_trans
> is only called before netif_rx and not before lapb_data_received.
> 
> Cc: Martin Schiller <ms@dev.tdt.de>
> Signed-off-by: Xie He <xie.he.0141@gmail.com>
> ---
>  drivers/net/wan/x25_asy.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c
> index 5a7cf8bf9d0d..ab56a5e6447a 100644
> --- a/drivers/net/wan/x25_asy.c
> +++ b/drivers/net/wan/x25_asy.c
> @@ -202,8 +202,7 @@ static void x25_asy_bump(struct x25_asy *sl)
>  		return;
>  	}
>  	skb_put_data(skb, sl->rbuff, count);
> -	skb->protocol = x25_type_trans(skb, sl->dev);
> -	err = lapb_data_received(skb->dev, skb);
> +	err = lapb_data_received(sl->dev, skb);
>  	if (err != LAPB_OK) {
>  		kfree_skb(skb);
>  		printk(KERN_DEBUG "x25_asy: data received err - %d\n", err);

Acked-by: Martin Schiller <ms@dev.tdt.de>


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

* Re: [PATCH net-next] drivers/net/wan/x25_asy: Remove an unnecessary x25_type_trans call
  2020-09-14  5:32 ` Martin Schiller
@ 2020-09-14  6:24   ` Xie He
  0 siblings, 0 replies; 4+ messages in thread
From: Xie He @ 2020-09-14  6:24 UTC (permalink / raw)
  To: Martin Schiller
  Cc: David S. Miller, Jakub Kicinski, Linux Kernel Network Developers, LKML

On Sun, Sep 13, 2020 at 10:32 PM Martin Schiller <ms@dev.tdt.de> wrote:
>
> Acked-by: Martin Schiller <ms@dev.tdt.de>

Thank you, Martin!

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

* Re: [PATCH net-next] drivers/net/wan/x25_asy: Remove an unnecessary x25_type_trans call
  2020-09-12  2:18 [PATCH net-next] drivers/net/wan/x25_asy: Remove an unnecessary x25_type_trans call Xie He
  2020-09-14  5:32 ` Martin Schiller
@ 2020-09-14 21:41 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2020-09-14 21:41 UTC (permalink / raw)
  To: xie.he.0141; +Cc: kuba, netdev, linux-kernel, ms

From: Xie He <xie.he.0141@gmail.com>
Date: Fri, 11 Sep 2020 19:18:07 -0700

> x25_type_trans only needs to be called before we call netif_rx to pass
> the skb to upper layers.
> 
> It does not need to be called before lapb_data_received. The LAPB module
> does not need the fields that are set by calling it.
> 
> In the other two X.25 drivers - lapbether and hdlc_x25. x25_type_trans
> is only called before netif_rx and not before lapb_data_received.
> 
> Cc: Martin Schiller <ms@dev.tdt.de>
> Signed-off-by: Xie He <xie.he.0141@gmail.com>

Applied to net-next, thanks.

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

end of thread, other threads:[~2020-09-14 21:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-12  2:18 [PATCH net-next] drivers/net/wan/x25_asy: Remove an unnecessary x25_type_trans call Xie He
2020-09-14  5:32 ` Martin Schiller
2020-09-14  6:24   ` Xie He
2020-09-14 21:41 ` David Miller

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).