linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: kuba@kernel.org
Cc: luobin9@huawei.com, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, aviad.krawczyk@huawei.com,
	luoxianjun@huawei.com, cloud.wangxiaoyun@huawei.com,
	yin.yinshi@huawei.com
Subject: Re: [PATCH net 1/6] hinic: fix process of long length skb without frags
Date: Mon, 16 Mar 2020 17:33:30 -0700 (PDT)	[thread overview]
Message-ID: <20200316.173330.2197524619383790235.davem@davemloft.net> (raw)
In-Reply-To: <20200316144408.00797c6f@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>

From: Jakub Kicinski <kuba@kernel.org>
Date: Mon, 16 Mar 2020 14:44:08 -0700

> On Mon, 16 Mar 2020 00:56:25 +0000 Luo bin wrote:
>> -#define MIN_SKB_LEN                     17
>> +#define MIN_SKB_LEN			17
>> +#define HINIC_GSO_MAX_SIZE		65536
> 
>> +	if (unlikely(skb->len > HINIC_GSO_MAX_SIZE && nr_sges == 1)) {
>> +		txq->txq_stats.frag_len_overflow++;
>> +		goto skb_error;
>> +	}
> 
> I don't think drivers should have to check this condition.
> 
> We have netdev->gso_max_size which should be initialized to 
> 
> include/linux/netdevice.h:#define GSO_MAX_SIZE          65536
> 
> in
> 
> net/core/dev.c: dev->gso_max_size = GSO_MAX_SIZE;
> 
> Please send a patch to pktgen to uphold the normal stack guarantees.

Agreed, the driver should not have to validate this.

  reply	other threads:[~2020-03-17  0:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-16  0:56 [PATCH net 0/6] hinic: BugFixes Luo bin
2020-03-16  0:56 ` [PATCH net 1/6] hinic: fix process of long length skb without frags Luo bin
2020-03-16 21:44   ` Jakub Kicinski
2020-03-17  0:33     ` David Miller [this message]
2020-03-19  2:37       ` luobin (L)
2020-03-16  0:56 ` [PATCH net 2/6] hinic: fix a bug of waitting for IO stopped Luo bin
2020-03-16  0:56 ` [PATCH net 3/6] hinic: fix the bug of clearing event queue Luo bin
2020-03-16 21:48   ` Jakub Kicinski
2020-03-16  0:56 ` [PATCH net 4/6] hinic: fix out-of-order excution in arm cpu Luo bin
2020-03-16  0:56 ` [PATCH net 5/6] hinic: fix wrong para of wait_for_completion_timeout Luo bin
2020-03-16  0:56 ` [PATCH net 6/6] hinic: fix wrong value of MIN_SKB_LEN Luo bin

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=20200316.173330.2197524619383790235.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=aviad.krawczyk@huawei.com \
    --cc=cloud.wangxiaoyun@huawei.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luobin9@huawei.com \
    --cc=luoxianjun@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=yin.yinshi@huawei.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).