netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] ixgbe: fcoe: return value of skb_linearize should be handled
@ 2016-12-07  7:43 Zhouyi Zhou
  2016-12-07 17:30 ` Jeff Kirsher
  2016-12-08  1:32 ` [Intel-wired-lan] " Rustad, Mark D
  0 siblings, 2 replies; 4+ messages in thread
From: Zhouyi Zhou @ 2016-12-07  7:43 UTC (permalink / raw)
  To: jeffrey.t.kirsher, intel-wired-lan, netdev, linux-kernel
  Cc: Zhouyi Zhou, Zhouyi Zhou

Signed-off-by: Zhouyi Zhou <yizhouzhou@ict.ac.cn>
Reviewed-by: Cong Wang <xiyou.wangcong@gmail.com>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com> 
Reviewed-by: Eric Dumazet <eric.dumazet@gmail.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c | 6 +++++-
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 3 +--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c
index 2a653ec..7b6bdb7 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c
@@ -490,7 +490,11 @@ int ixgbe_fcoe_ddp(struct ixgbe_adapter *adapter,
 	 */
 	if ((fh->fh_r_ctl == FC_RCTL_DD_SOL_DATA) &&
 	    (fctl & FC_FC_END_SEQ)) {
-		skb_linearize(skb);
+		int err;
+
+		err = skb_linearize(skb);
+		if (err)
+			return err;
 		crc = (struct fcoe_crc_eof *)skb_put(skb, sizeof(*crc));
 		crc->fcoe_eof = FC_EOF_T;
 	}
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index fee1f29..4926d48 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -2173,8 +2173,7 @@ static int ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector,
 				total_rx_bytes += ddp_bytes;
 				total_rx_packets += DIV_ROUND_UP(ddp_bytes,
 								 mss);
-			}
-			if (!ddp_bytes) {
+			} else {
 				dev_kfree_skb_any(skb);
 				continue;
 			}
-- 
1.9.1

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

* Re: [PATCH 1/1] ixgbe: fcoe: return value of skb_linearize should be handled
  2016-12-07  7:43 [PATCH 1/1] ixgbe: fcoe: return value of skb_linearize should be handled Zhouyi Zhou
@ 2016-12-07 17:30 ` Jeff Kirsher
  2016-12-08  1:21   ` Zhouyi Zhou
  2016-12-08  1:32 ` [Intel-wired-lan] " Rustad, Mark D
  1 sibling, 1 reply; 4+ messages in thread
From: Jeff Kirsher @ 2016-12-07 17:30 UTC (permalink / raw)
  To: Zhouyi Zhou, intel-wired-lan, netdev, linux-kernel; +Cc: Zhouyi Zhou

[-- Attachment #1: Type: text/plain, Size: 732 bytes --]

On Wed, 2016-12-07 at 15:43 +0800, Zhouyi Zhou wrote:
> Signed-off-by: Zhouyi Zhou <yizhouzhou@ict.ac.cn>
> Reviewed-by: Cong Wang <xiyou.wangcong@gmail.com>
> Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com> 
> Reviewed-by: Eric Dumazet <eric.dumazet@gmail.com>
> ---
>  drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c | 6 +++++-
>  drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 3 +--
>  2 files changed, 6 insertions(+), 3 deletions(-)

Did Cong, Yuval and Eric give their Reviewed-by offline?  I see they made
comments and suggests, but never saw them actually give you their Reviewed-
by.  You cannot automatically add their Reviewed-by, Signed-off-by, etc
just because someone provides feedback on your patch.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH 1/1] ixgbe: fcoe: return value of skb_linearize should be handled
  2016-12-07 17:30 ` Jeff Kirsher
@ 2016-12-08  1:21   ` Zhouyi Zhou
  0 siblings, 0 replies; 4+ messages in thread
From: Zhouyi Zhou @ 2016-12-08  1:21 UTC (permalink / raw)
  To: Jeff Kirsher
  Cc: intel-wired-lan, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, Zhouyi Zhou

Thanks Jeff for your advice,
Sorry for the  my innocence as a Linux kernel rookie.

Zhouyi

On Thu, Dec 8, 2016 at 1:30 AM, Jeff Kirsher
<jeffrey.t.kirsher@intel.com> wrote:
> On Wed, 2016-12-07 at 15:43 +0800, Zhouyi Zhou wrote:
>> Signed-off-by: Zhouyi Zhou <yizhouzhou@ict.ac.cn>
>> Reviewed-by: Cong Wang <xiyou.wangcong@gmail.com>
>> Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
>> Reviewed-by: Eric Dumazet <eric.dumazet@gmail.com>
>> ---
>>  drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c | 6 +++++-
>>  drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 3 +--
>>  2 files changed, 6 insertions(+), 3 deletions(-)
>
> Did Cong, Yuval and Eric give their Reviewed-by offline?  I see they made
> comments and suggests, but never saw them actually give you their Reviewed-
> by.  You cannot automatically add their Reviewed-by, Signed-off-by, etc
> just because someone provides feedback on your patch.

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

* Re: [Intel-wired-lan] [PATCH 1/1] ixgbe: fcoe: return value of skb_linearize should be handled
  2016-12-07  7:43 [PATCH 1/1] ixgbe: fcoe: return value of skb_linearize should be handled Zhouyi Zhou
  2016-12-07 17:30 ` Jeff Kirsher
@ 2016-12-08  1:32 ` Rustad, Mark D
  1 sibling, 0 replies; 4+ messages in thread
From: Rustad, Mark D @ 2016-12-08  1:32 UTC (permalink / raw)
  To: Zhouyi Zhou
  Cc: Kirsher, Jeffrey T, intel-wired-lan@lists.osuosl.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Zhouyi Zhou

[-- Attachment #1: Type: text/plain, Size: 832 bytes --]

Zhouyi Zhou <zhouzhouyi@gmail.com> wrote:

> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c  
> b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> index fee1f29..4926d48 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> @@ -2173,8 +2173,7 @@ static int ixgbe_clean_rx_irq(struct ixgbe_q_vector  
> *q_vector,
>  				total_rx_bytes += ddp_bytes;
>  				total_rx_packets += DIV_ROUND_UP(ddp_bytes,
>  								 mss);
> -			}
> -			if (!ddp_bytes) {
> +			} else {
>  				dev_kfree_skb_any(skb);
>  				continue;
>  			}

This is changing the logic by treating a negative ddp_bytes value (an error  
return) the same as a 0 value. This is probably wrong and inappropriate for  
this patch in any case.

--
Mark Rustad, Networking Division, Intel Corporation

[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 841 bytes --]

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

end of thread, other threads:[~2016-12-08  1:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-07  7:43 [PATCH 1/1] ixgbe: fcoe: return value of skb_linearize should be handled Zhouyi Zhou
2016-12-07 17:30 ` Jeff Kirsher
2016-12-08  1:21   ` Zhouyi Zhou
2016-12-08  1:32 ` [Intel-wired-lan] " Rustad, Mark D

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