Re: [PATCH] net: fix the per task frag allocator size

2018-11-22 Thread Yunsheng Lin
On 2018/11/23 10:03, Li RongQing wrote: > when fill task frag, 32K pages, 128MB memory is asked, it > hardly successes when system has memory stress > > and commit '5640f7685831 ("net: use a per task frag allocator")' > said it wants 32768 bytes, not 32768 pages: > >"(up to 32768 bytes

Re: [Patch net-next] net: dump more useful information in netdev_rx_csum_fault()

2018-11-09 Thread Yunsheng Lin
On 2018/11/10 10:09, Cong Wang wrote: > On Fri, Nov 9, 2018 at 6:02 PM Yunsheng Lin wrote: >> >> On 2018/11/10 9:42, Cong Wang wrote: >>> On Fri, Nov 9, 2018 at 5:39 PM Yunsheng Lin wrote: >>>> >>>> On 2018/11/10 3:43, Cong Wang wrote: >>&g

Re: [Patch net-next] net: dump more useful information in netdev_rx_csum_fault()

2018-11-09 Thread Yunsheng Lin
On 2018/11/10 9:42, Cong Wang wrote: > On Fri, Nov 9, 2018 at 5:39 PM Yunsheng Lin wrote: >> >> On 2018/11/10 3:43, Cong Wang wrote: >>> Currently netdev_rx_csum_fault() only shows a device name, >>> we need more information about the skb for debugging. >>

Re: [Patch net-next] net: dump more useful information in netdev_rx_csum_fault()

2018-11-09 Thread Yunsheng Lin
On 2018/11/10 3:43, Cong Wang wrote: > Currently netdev_rx_csum_fault() only shows a device name, > we need more information about the skb for debugging. > > Sample output: > > ens3: hw csum failure > dev features: 0x00014b89 > skb len=84 data_len=0 gso_size=0 gso_type=0 ip_summed=0

Re: [PATCH][v2] xfrm: replace NR_CPU with nr_cpu_ids

2018-06-19 Thread Yunsheng Lin
On 2018/6/19 15:11, Li RongQing wrote: > The default NR_CPUS can be very large, but actual possible nr_cpu_ids > usually is very small. For some x86 distribution, the NR_CPUS is 8192 > and nr_cpu_ids is 4, so replace NR_CPU to save some memory > > Signed-off-by: Li RongQing > Signed-off-by:

Re: [PATCH net 1/3] qed: Fix possible memory leak in Rx error path handling.

2018-06-19 Thread Yunsheng Lin
On 2018/6/19 14:42, Kalluru, Sudarsana wrote: > > > -Original Message- > From: Yunsheng Lin [mailto:linyunsh...@huawei.com] > Sent: 19 June 2018 11:32 > To: Kalluru, Sudarsana ; da...@davemloft.net > Cc: netdev@vger.kernel.org; Elior, Ariel ; Kalderon, &g

Re: [PATCH net 1/3] qed: Fix possible memory leak in Rx error path handling.

2018-06-19 Thread Yunsheng Lin
On 2018/6/19 12:58, Sudarsana Reddy Kalluru wrote: > Memory for packet buffers need to be freed in the error paths as there is > no consumer (e.g., upper layer) for such packets and that memory will never > get freed. > The issue was uncovered when port was attacked with flood of isatap >

Re: BUG_ON triggered in skb_segment

2018-03-13 Thread Yunsheng Lin
Hi, Song On 2018/3/13 13:45, Yonghong Song wrote: > Hi, > > One of our in-house projects, bpf-based NAT, hits a kernel BUG_ON at > net-next function skb_segment, line 3667. > > 3472 struct sk_buff *skb_segment(struct sk_buff *head_skb, > 3473 netdev_features_t

Re: [PATCH net] net: phy: Restore phy_resume() locking assumption

2018-02-25 Thread Yunsheng Lin
Hi, Andrew On 2018/2/26 7:04, Lunn wrote: > commit f5e64032a799 ("net: phy: fix resume handling") changes the > locking semantics for phy_resume() such that the caller now needs to > hold the phy mutex. Not all call sites were adopted to this new > semantic, resulting in warnings from the added >

Potential display issue with 88997e4208ae "net/8021q: create device with all possible features in wanted_features"

2018-02-06 Thread Yunsheng Lin
to the lower dev' rx-csum feature after commit 88997e4208ae. Is this a display issue? And Do we need to fix this issue? MBR, Yunsheng Lin

Re: [QUESTION] Doubt about NAPI_GRO_CB(skb)->is_atomic in tcpv4 gro process

2017-12-25 Thread Yunsheng Lin
Hi, Alexander On 2017/12/23 0:32, Alexander Duyck wrote: > On Fri, Dec 22, 2017 at 12:49 AM, Yunsheng Lin <linyunsh...@huawei.com> wrote: >> Hi, Alexander >> >> On 2017/12/22 0:29, Alexander Duyck wrote: >>> On Thu, Dec 21, 2017 at 1:16 AM, Yunsheng Lin

Re: [QUESTION] Doubt about NAPI_GRO_CB(skb)->is_atomic in tcpv4 gro process

2017-12-22 Thread Yunsheng Lin
Hi, Alexander On 2017/12/22 0:29, Alexander Duyck wrote: > On Thu, Dec 21, 2017 at 1:16 AM, Yunsheng Lin <linyunsh...@huawei.com> wrote: >> Hi, Alexander >> >> On 2017/12/21 0:24, Alexander Duyck wrote: >>> On Wed, Dec 20, 2017 at 1:09 AM, Yunsheng Lin <liny

Re: [QUESTION] Doubt about NAPI_GRO_CB(skb)->is_atomic in tcpv4 gro process

2017-12-21 Thread Yunsheng Lin
Hi, Alexander On 2017/12/21 0:24, Alexander Duyck wrote: > On Wed, Dec 20, 2017 at 1:09 AM, Yunsheng Lin <linyunsh...@huawei.com> wrote: >> Hi, all >> I have some doubt about NAPI_GRO_CB(skb)->is_atomic when >> analyzing the tcpv4 gro process: >&g

[QUESTION] Doubt about NAPI_GRO_CB(skb)->is_atomic in tcpv4 gro process

2017-12-20 Thread Yunsheng Lin
Hi, all I have some doubt about NAPI_GRO_CB(skb)->is_atomic when analyzing the tcpv4 gro process: Firstly we set NAPI_GRO_CB(skb)->is_atomic to 1 in dev_gro_receive: https://elixir.free-electrons.com/linux/v4.15-rc4/source/net/core/dev.c#L4838 And then in inet_gro_receive, we check the

Re: [PATCH net-next 3/9] net: hns3: Refactor the initialization of command queue

2017-11-01 Thread Yunsheng Lin
Hi, Lipeng On 2017/11/1 22:47, Lipeng wrote: > From: qumingguang > > There is no necessary to reallocate the descriptor and remap the descriptor > memory in reset process, But there is still some other action exit in both exit -> exist > reset process and

Re: [PATCH net-next] bnxt_en: Fix randconfig build errors.

2017-10-28 Thread Yunsheng Lin
l2_key *l2_info, > struct net_device *real_dst_dev) > { > +#ifdef CONFIG_INET Can we use #if IS_ENABLED(CONFIG_INET) here too? I am not familiar with IS_ENABLED, just thought it would be good to be constistent because you are using IS_ENABLED below. Best Reg

Re: [PATCH net-next] qed: Set error code for allocation failures

2017-10-27 Thread Yunsheng Lin
Hi, Dan On 2017/10/27 19:52, Dan Carpenter wrote: > On Fri, Oct 27, 2017 at 05:32:42PM +0800, Yunsheng Lin wrote: >> Hi, Dan >> >> On 2017/10/27 14:40, Dan Carpenter wrote: >>> There are several places where we accidentally return success when >>> kcall

Re: [PATCH net-next] qed: Set error code for allocation failures

2017-10-27 Thread Yunsheng Lin
Hi, Dan On 2017/10/27 14:40, Dan Carpenter wrote: > There are several places where we accidentally return success when > kcalloc() fails. > > Fixes: fcb39f6c10b2 ("qed: Add mpa buffer descriptors for storing and > processing mpa fpdus") > Signed-off-by: Dan Carpenter

[PATCH net-next 0/2] Add mac loopback selftest support in hns3 driver

2017-10-19 Thread Yunsheng Lin
This patchset refactors the skb receiving and transmitting function before adding mac loopback selftest support in hns3 driver. Yunsheng Lin (2): net: hns3: Refactor the skb receiving and transmitting function net: hns3: Add mac loopback selftest support in hns3 driver .../ethernet

[PATCH net-next 1/2] net: hns3: Refactor the skb receiving and transmitting function

2017-10-19 Thread Yunsheng Lin
This patch refactors the skb receiving and transmitting functions and export them in order to support the ethtool's mac loopback selftest. Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 17 - drivers/net/et

[PATCH net-next 2/2] net: hns3: Add mac loopback selftest support in hns3 driver

2017-10-19 Thread Yunsheng Lin
This patch adds mac loopback selftest support for ethtool cmd by checking if a transmitted packet can be received correctly when mac loopback is enabled. Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 54 .../ethernet/his

Re: [net-next 4/9] i40e: Enable 'channel' mode in mqprio for TC configs

2017-10-17 Thread Yunsheng Lin
Hi, Nambiar On 2017/10/17 0:03, Nambiar, Amritha wrote: > On 10/16/2017 1:53 AM, Yunsheng Lin wrote: >> Hi, Jeff >> >> On 2017/10/14 5:52, Jeff Kirsher wrote: >>> From: Amritha Nambiar <amritha.namb...@intel.com> >>> >>> The i40e driver is

[PATCH v2 net-next] net: hns3: Add mqprio hardware offload support in hns3 driver

2017-10-17 Thread Yunsheng Lin
When using tc qdisc, dcb_ops->setup_tc is used to tell hclge_dcb module to do the tm related setup. Only TC_MQPRIO_MODE_CHANNEL offload mode is supported. Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- V2: 1. Add HCLGE_FLAG_MQPRIO_ENABLE to indicate offlaoding the

Re: [net-next 4/9] i40e: Enable 'channel' mode in mqprio for TC configs

2017-10-16 Thread Yunsheng Lin
tdev_priv *np = netdev_priv(netdev); > struct i40e_vsi *vsi = np->vsi; > struct i40e_pf *pf = vsi->back; > - u8 enabled_tc = 0; > + u8 enabled_tc = 0, num_tc, hw; > + bool need_reset = false; > int ret = -EINVAL; > + u16 mode

Re: [PATCH net-next 0/2] Add mqprio hardware offload support in hns3 driver

2017-10-16 Thread Yunsheng Lin
ach underlying qdisc */ for (ntx = 0; ntx < dev->num_tx_queues; ntx++) { qdisc = priv->qdiscs[ntx]; old = dev_graft_qdisc(qdisc->dev_queue, qdisc); if (old) qdisc_destroy(old); --Only call qdisc_hash_add whe

Re: [PATCH net-next 0/2] Add mqprio hardware offload support in hns3 driver

2017-10-15 Thread Yunsheng Lin
" According to the description of the above patchset, the default mode is already dcb, so i will drop the dcb mode patch. I think the scenario you mentioned still existed, and I am willing to implement it if we come to a solution that will suit most in the community. Thanks, Yunsheng Li

Re: [PATCH net-next 0/2] Add mqprio hardware offload support in hns3 driver

2017-10-15 Thread Yunsheng Lin
ions available for monitoring using dcbnl logic > if the > configuration change [for user]; So user can re-configure whatever it wants. Yes, if user is only using dcb tool. > But other than dropping all the qdisc configurations and going back to the > default > qdiscs, what default

Re: [PATCH net-next 1/2] mqprio: Add a new hardware offload type in mqprio

2017-10-12 Thread Yunsheng Lin
Hi, Yuval On 2017/10/13 4:10, Yuval Mintz wrote: >> When a driver supports both dcb and hardware offloaded mqprio, and >> user is running mqprio and dcb tool concurrently, the configuration >> set by each tool may be conflicted with each other because the dcb > (for second 'each') s/each/the >

Re: [PATCH net-next 0/2] Add mqprio hardware offload support in hns3 driver

2017-10-12 Thread Yunsheng Lin
ue does not have a default pfifo mqprio attached. Maybe we can add a callback to notify mqprio the configuration has changed. Thanks Yunsheng Lin > > Cheers, > Yuval > >> >> Yunsheng Lin (2): >> mqprio: Add a new hardware offload type in mqprio >> net: hns3:

[PATCH net-next 0/2] Add mqprio hardware offload support in hns3 driver

2017-10-11 Thread Yunsheng Lin
This patchset adds a new hardware offload type in mqprio before adding mqprio hardware offload support in hns3 driver. Yunsheng Lin (2): mqprio: Add a new hardware offload type in mqprio net: hns3: Add mqprio hardware offload support in hns3 driver drivers/net/ethernet/hisilicon/hns3/hnae3

[PATCH net-next 1/2] mqprio: Add a new hardware offload type in mqprio

2017-10-11 Thread Yunsheng Lin
in the network stack. This patch adds a new offload type to indicate that the underlying driver offload prio mapping as part of DCB. If the driver would be incapable of that it would refuse the offload. User would then have to explicitly request that qdisc offload. Signed-off-by: Yunsheng Lin <linyu

[PATCH net-next 2/2] net: hns3: Add mqprio hardware offload support in hns3 driver

2017-10-11 Thread Yunsheng Lin
When using tc qdisc, dcb_ops->setup_tc is used to tell hclge_dcb module to do the tm related setup. Only TC_MQPRIO_HW_OFFLOAD_DCB offload type is supported. Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 1 + .../net

[PATCH net-next 1/7] net: hns3: Cleanup for shifting true in hns3 driver

2017-10-09 Thread Yunsheng Lin
This patch fixes a shifting true in hclge_main module. Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mai

[PATCH net-next 0/7] A few cleanup for hns3 ethernet driver

2017-10-09 Thread Yunsheng Lin
This patchset contains a few cleanup for hns3 ethernet driver. No functional change intended. Yunsheng Lin (7): net: hns3: Cleanup for shifting true in hns3 driver net: hns3: Add hns3_get_handle macro in hns3 driver net: hns3: Cleanup indentation for Kconfig in the the hisilicon folder

[PATCH net-next 2/7] net: hns3: Add hns3_get_handle macro in hns3 driver

2017-10-09 Thread Yunsheng Lin
There are many places that will need to get the handle of netdev, so add a macro to get the handle of netdev. Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- .../ethernet/hisilicon/hns3/hns3pf/hns3_dcbnl.c| 18 -- .../net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.

[PATCH net-next 7/7] net: hns3: Cleanup for non-static function in hns3 driver

2017-10-09 Thread Yunsheng Lin
This patch fixes the following warning from sparse: warning: symbol 'hns3_set_multicast_list' was not declared. Should it be static. hns3_set_multicast_list turns out to be not used, so delete it. Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- .../net/ethernet/hisilicon/hns3/

[PATCH net-next 3/7] net: hns3: Cleanup indentation for Kconfig in the the hisilicon folder

2017-10-09 Thread Yunsheng Lin
This patch fixes a few indentation for Kconfig file in the hisilicon folder. Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- drivers/net/ethernet/hisilicon/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/Kconfig b/d

[PATCH net-next 6/7] net: hns3: Cleanup for endian issue in hns3 driver

2017-10-09 Thread Yunsheng Lin
This patch fixes a lot of endian issues detected by sparse. Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c | 8 +- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 10 +- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c

[PATCH net-next 5/7] net: hns3: Cleanup for struct that used to send cmd to firmware

2017-10-09 Thread Yunsheng Lin
The hclge_tm module has already added _cmd to the end of struct that used to send cmd to firmware. This will help us finding the endian issues. This patch adds the _cmd to the end of struct that used to send cmd to firmware in hclge_main module. Signed-off-by: Yunsheng Lin <linyunsh...@huawei.

[PATCH net-next 4/7] net: hns3: Consistently using GENMASK in hns3 driver

2017-10-09 Thread Yunsheng Lin
This patch uses GENMASK to generate bit mask whenever possible in hns3 driver. Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 48 +++--- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h| 4 +- 2 files chang

Re: [PATCH] net: hns3: Fix an error handling path in 'hclge_rss_init_hw()'

2017-09-30 Thread Yunsheng Lin
Hi, Christophe On 2017/9/30 13:34, Christophe JAILLET wrote: > If this sanity check fails, we must free 'rss_indir'. Otherwise there is a > memory leak. > 'goto err' as done in the other error handling paths to fix it. Thanks for fixing. > > Fixes: 46a3df9f9718 ("net: hns3: Fix for setting

Re: [PATCH] net: hns3: fix null pointer dereference before null check

2017-09-29 Thread Yunsheng Lin
Hi, Colin On 2017/9/30 3:51, Colin King wrote: > From: Colin Ian King > > pointer ndev is being dereferenced with the call to netif_running > before it is being null checked. Re-order the code to only dereference > ndev after it has been null checked. Thanks for

[PATCH v3 net-next 00/10] Add support for DCB feature in hns3 driver

2017-09-26 Thread Yunsheng Lin
: Initial Submit. Yunsheng Lin (10): net: hns3: Support for dynamically assigning tx buffer to TC net: hns3: Add support for dynamically buffer reallocation net: hns3: Add support for PFC setting in TM module net: hns3: Add support for port shaper setting in TM module net: hns3: Add tc

[PATCH v3 net-next 01/10] net: hns3: Support for dynamically assigning tx buffer to TC

2017-09-26 Thread Yunsheng Lin
This patch add support of dynamically assigning tx buffer to TC when the TC is enabled. It will save buffer for rx direction to avoid packet loss. Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- V2: Fix for not defining variables in local loop. V1: Initial

[PATCH v3 net-next 10/10] net: hns3: Add DCB support when interacting with network stack

2017-09-26 Thread Yunsheng Lin
When using lldptool to configure DCB parameter, hclge_dcb module call the client_ops->setup_tc to tell network stack which queue and priority is using for specific tc. Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- V2: Drop mqprio support. V1: Initi

[PATCH v3 net-next 03/10] net: hns3: Add support for PFC setting in TM module

2017-09-26 Thread Yunsheng Lin
This patch add a pfc_pause_en cmd, and use it to configure PFC option according to fc_mode in hdev->tm_info. Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 68 -- .../net/ethernet/hisilicon/hns3/hns3pf/h

[PATCH v3 net-next 06/10] net: hns3: Add some interface for the support of DCB feature

2017-09-26 Thread Yunsheng Lin
This patch add some interface and export some interface from hclge_tm and hclgc_main to support the upcoming DCB feature. Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 3 +- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h

[PATCH v3 net-next 08/10] net: hns3: Add dcb netlink interface for the support of DCB feature

2017-09-26 Thread Yunsheng Lin
This patch add dcb netlink interface by calling the interface from hclge_dcb module. This patch also update Makefile in order to build hns3_dcbnl module. Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- .../net/ethernet/hisilicon/hns3/hns3pf/Makefile| 2 + .../ethernet/his

[PATCH v3 net-next 09/10] net: hns3: Setting for fc_mode and dcb enable flag in TM module

2017-09-26 Thread Yunsheng Lin
After the DCB feature is supported, fc_mode and dcb enable flag must be set according to the DCB parameter. Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 34 +++--- 1 file changed, 30 insertions(+), 4 del

[PATCH v3 net-next 07/10] net: hns3: Add hclge_dcb module for the support of DCB feature

2017-09-26 Thread Yunsheng Lin
The hclge_dcb module calls the interface from hclge_main/tm and provide interface for the dcb netlink interface. This patch also update Makefiles required to build the DCB supported code in HNS3 Ethernet driver and update the existing Kconfig file in the hisilicon folder. Signed-off-by: Yunsheng

[PATCH v3 net-next 02/10] net: hns3: Add support for dynamically buffer reallocation

2017-09-26 Thread Yunsheng Lin
parameter, and priv_buf is only used at buffer allocation process, so it is ok to use a dynamic allocated temporary memory. Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 5 + .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c

[PATCH v3 net-next 05/10] net: hns3: Add tc-based TM support for sriov enabled port

2017-09-26 Thread Yunsheng Lin
When sriov is enabled and TM is in tc-based mode, vf's TM parameters is not set in TM initialization process. This patch add the tc_based TM support for sriov enabled using the information in vport struct. Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- .../net/ethernet/hisilico

[PATCH v3 net-next 04/10] net: hns3: Add support for port shaper setting in TM module

2017-09-26 Thread Yunsheng Lin
This patch add a tm_port_shaper cmd and set port shaper to HCLGE_ETHER_MAX_RATE on TM initialization process. Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 32 ++ .../net/ethernet/hisilicon/hns3/hns3pf/hclg

Re: [PATCH v2 net-next 10/10] net: hns3: Add mqprio support when interacting with network stack

2017-09-26 Thread Yunsheng Lin
Hi, Yuval On 2017/9/26 20:29, Yuval Mintz wrote: >> Hi, Yuval >> >> On 2017/9/26 14:43, Yuval Mintz wrote: When using tc qdisc to configure DCB parameter, dcb_ops->setup_tc is used to tell hclge_dcb module to do the setup. >>> >>> While this might be a step in the right direction, this

Re: [PATCH v2 net-next 10/10] net: hns3: Add mqprio support when interacting with network stack

2017-09-26 Thread Yunsheng Lin
Hi, Yuval On 2017/9/26 14:43, Yuval Mintz wrote: >> When using tc qdisc to configure DCB parameter, dcb_ops->setup_tc >> is used to tell hclge_dcb module to do the setup. > > While this might be a step in the right direction, this causes an > inconsistency > in user experience - Some [well,

Re: [PATCH v2 net-next 10/10] net: hns3: Add mqprio support when interacting with network stack

2017-09-26 Thread Yunsheng Lin
Hi, Yuval On 2017/9/26 14:43, Yuval Mintz wrote: >> When using tc qdisc to configure DCB parameter, dcb_ops->setup_tc >> is used to tell hclge_dcb module to do the setup. > > While this might be a step in the right direction, this causes an > inconsistency > in user experience - Some [well,

Re: [PATCH v2 net-next 10/10] net: hns3: Add mqprio support when interacting with network stack

2017-09-26 Thread Yunsheng Lin
Hi, Yuval On 2017/9/26 14:43, Yuval Mintz wrote: >> When using tc qdisc to configure DCB parameter, dcb_ops->setup_tc >> is used to tell hclge_dcb module to do the setup. > > While this might be a step in the right direction, this causes an > inconsistency > in user experience - Some [well,

[PATCH v2 net-next 00/10] Add support for DCB feature in hns3 driver

2017-09-25 Thread Yunsheng Lin
(if schedule mode is ETS), prio_tc_map and PFC parameter. --- V2: Fix for not defining variables in local loop. V1: Initial Submit. Yunsheng Lin (10): net: hns3: Support for dynamically assigning tx buffer to TC net: hns3: Add support for dynamically buffer reallocation net: hns3: Add

[PATCH v2 net-next 03/10] net: hns3: Add support for PFC setting in TM module

2017-09-25 Thread Yunsheng Lin
This patch add a pfc_pause_en cmd, and use it to configure PFC option according to fc_mode in hdev->tm_info. Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 68 -- .../net/ethernet/hisilicon/hns3/hns3pf/h

[PATCH v2 net-next 06/10] net: hns3: Add some interface for the support of DCB feature

2017-09-25 Thread Yunsheng Lin
This patch add some interface and export some interface from hclge_tm and hclgc_main to support the upcoming DCB feature. Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 3 +- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h

[PATCH v2 net-next 04/10] net: hns3: Add support for port shaper setting in TM module

2017-09-25 Thread Yunsheng Lin
This patch add a tm_port_shaper cmd and set port shaper to HCLGE_ETHER_MAX_RATE on TM initialization process. Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 32 ++ .../net/ethernet/hisilicon/hns3/hns3pf/hclg

[PATCH v2 net-next 05/10] net: hns3: Add tc-based TM support for sriov enabled port

2017-09-25 Thread Yunsheng Lin
When sriov is enabled and TM is in tc-based mode, vf's TM parameters is not set in TM initialization process. This patch add the tc_based TM support for sriov enabled using the information in vport struct. Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- .../net/ethernet/hisilico

[PATCH v2 net-next 02/10] net: hns3: Add support for dynamically buffer reallocation

2017-09-25 Thread Yunsheng Lin
parameter, and priv_buf is only used at buffer allocation process, so it is ok to use a dynamic allocated temporary memory. Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 5 + .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c

[PATCH v2 net-next 01/10] net: hns3: Support for dynamically assigning tx buffer to TC

2017-09-25 Thread Yunsheng Lin
This patch add support of dynamically assigning tx buffer to TC when the TC is enabled. It will save buffer for rx direction to avoid packet loss. Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- V2: Fix for not defining variables in local loop. V1: Initial

[PATCH v2 net-next 07/10] net: hns3: Add hclge_dcb module for the support of DCB feature

2017-09-25 Thread Yunsheng Lin
The hclge_dcb module calls the interface from hclge_main/tm and provide interface for the dcb netlink interface. This patch also update Makefiles required to build the DCB supported code in HNS3 Ethernet driver and update the existing Kconfig file in the hisilicon folder. Signed-off-by: Yunsheng

[PATCH v2 net-next 10/10] net: hns3: Add mqprio support when interacting with network stack

2017-09-25 Thread Yunsheng Lin
ed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- .../net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 135 + 1 file changed, 111 insertions(+), 24 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c b/drivers/net/ethernet/hisilicon

[PATCH v2 net-next 09/10] net: hns3: Setting for fc_mode and dcb enable flag in TM module

2017-09-25 Thread Yunsheng Lin
After the DCB feature is supported, fc_mode and dcb enable flag must be set according to the DCB parameter. Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 34 +++--- 1 file changed, 30 insertions(+), 4 del

[PATCH v2 net-next 08/10] net: hns3: Add dcb netlink interface for the support of DCB feature

2017-09-25 Thread Yunsheng Lin
This patch add dcb netlink interface by calling the interface from hclge_dcb module. This patch also update Makefile in order to build hns3_dcbnl module. Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- .../net/ethernet/hisilicon/hns3/hns3pf/Makefile| 2 + .../ethernet/his

Re: [PATCH net-next 10/10] net: hns3: Add mqprio support when interacting with network stack

2017-09-25 Thread Yunsheng Lin
Hi, Jiri On 2017/9/25 14:57, Jiri Pirko wrote: > Mon, Sep 25, 2017 at 02:45:08AM CEST, linyunsh...@huawei.com wrote: >> Hi, Jiri >> >> On 2017/9/24 19:37, Jiri Pirko wrote: >>> Sat, Sep 23, 2017 at 02:47:20AM CEST, linyunsh...@huawei.com wrote: Hi, Jiri On 2017/9/23 0:03, Jiri

Re: [patch net-next v2 03/12] ipmr: Add FIB notification access functions

2017-09-25 Thread Yunsheng Lin
Hi, Yotam On 2017/9/25 13:38, Yotam Gigi wrote: > On 09/25/2017 04:19 AM, Yunsheng Lin wrote: >> Hi, Jiri >> >> On 2017/9/25 1:22, Jiri Pirko wrote: >>> From: Yotam Gigi <yot...@mellanox.com> >>> >>> Make the ipmr module register as a FIB noti

Re: [patch net-next v2 07/12] mlxsw: spectrum: Add the multicast routing offloading logic

2017-09-24 Thread Yunsheng Lin
Hi, Jiri On 2017/9/25 1:22, Jiri Pirko wrote: > From: Yotam Gigi > > Add the multicast router offloading logic, which is in charge of handling > the VIF and MFC notifications and translating it to the hardware logic API. > > The offloading logic has to overcome several

Re: [patch net-next v2 06/12] net: mroute: Check if rule is a default rule

2017-09-24 Thread Yunsheng Lin
Hi, Jiri On 2017/9/25 1:22, Jiri Pirko wrote: > From: Yotam Gigi > > When the ipmr starts, it adds one default FIB rule that matches all packets > and sends them to the DEFAULT (multicast) FIB table. A more complex rule > can be added by user to specify that for a specific

Re: [patch net-next v2 03/12] ipmr: Add FIB notification access functions

2017-09-24 Thread Yunsheng Lin
Hi, Jiri On 2017/9/25 1:22, Jiri Pirko wrote: > From: Yotam Gigi > > Make the ipmr module register as a FIB notifier. To do that, implement both > the ipmr_seq_read and ipmr_dump ops. > > The ipmr_seq_read op returns a sequence counter that is incremented on > every

Re: [PATCH net-next 10/10] net: hns3: Add mqprio support when interacting with network stack

2017-09-24 Thread Yunsheng Lin
Hi, Jiri On 2017/9/24 19:37, Jiri Pirko wrote: > Sat, Sep 23, 2017 at 02:47:20AM CEST, linyunsh...@huawei.com wrote: >> Hi, Jiri >> >> On 2017/9/23 0:03, Jiri Pirko wrote: >>> Fri, Sep 22, 2017 at 04:11:51PM CEST, linyunsh...@huawei.com wrote: Hi, Jiri >> - if (!tc) { >> + if

Re: [PATCH net-next 10/10] net: hns3: Add mqprio support when interacting with network stack

2017-09-22 Thread Yunsheng Lin
Hi, Jiri On 2017/9/23 0:03, Jiri Pirko wrote: > Fri, Sep 22, 2017 at 04:11:51PM CEST, linyunsh...@huawei.com wrote: >> Hi, Jiri >> - if (!tc) { + if (if_running) { + (void)hns3_nic_net_stop(netdev); + msleep(100); + } + + ret = (kinfo->dcb_ops &&

Re: [PATCH net-next 01/10] net: hns3: Support for dynamically assigning tx buffer to TC

2017-09-21 Thread Yunsheng Lin
Hi, David On 2017/9/22 9:41, David Miller wrote: > From: Yunsheng Lin <linyunsh...@huawei.com> > Date: Thu, 21 Sep 2017 19:21:44 +0800 > >> @@ -1324,23 +1324,28 @@ static int hclge_alloc_vport(struct hclge_dev *hdev) >> return 0; >> } >> >>

[PATCH net-next 00/10] Add support for DCB feature in hns3 driver

2017-09-21 Thread Yunsheng Lin
(if schedule mode is ETS), prio_tc_map and PFC parameter. Yunsheng Lin (10): net: hns3: Support for dynamically assigning tx buffer to TC net: hns3: Add support for dynamically buffer reallocation net: hns3: Add support for PFC setting in TM module net: hns3: Add support for port shaper

[PATCH net-next 03/10] net: hns3: Add support for PFC setting in TM module

2017-09-21 Thread Yunsheng Lin
This patch add a pfc_pause_en cmd, and use it to configure PFC option according to fc_mode in hdev->tm_info. Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 68 -- .../net/ethernet/hisilicon/hns3/hns3pf/h

[PATCH net-next 02/10] net: hns3: Add support for dynamically buffer reallocation

2017-09-21 Thread Yunsheng Lin
parameter, and priv_buf is only used at buffer allocation process, so it is ok to use a dynamic allocated temporary memory. Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 5 + .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c

[PATCH net-next 01/10] net: hns3: Support for dynamically assigning tx buffer to TC

2017-09-21 Thread Yunsheng Lin
This patch add support of dynamically assigning tx buffer to TC when the TC is enabled. It will save buffer for rx direction to avoid packet loss. Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 1 + .../ethernet/hisilico

[PATCH net-next 06/10] net: hns3: Add some interface for the support of DCB feature

2017-09-21 Thread Yunsheng Lin
This patch add some interface and export some interface from hclge_tm and hclgc_main to support the upcoming DCB feature. Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 3 +- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h

[PATCH net-next 07/10] net: hns3: Add hclge_dcb module for the support of DCB feature

2017-09-21 Thread Yunsheng Lin
The hclge_dcb module calls the interface from hclge_main/tm and provide interface for the dcb netlink interface. This patch also update Makefiles required to build the DCB supported code in HNS3 Ethernet driver and update the existing Kconfig file in the hisilicon folder. Signed-off-by: Yunsheng

[PATCH net-next 04/10] net: hns3: Add support for port shaper setting in TM module

2017-09-21 Thread Yunsheng Lin
This patch add a tm_port_shaper cmd and set port shaper to HCLGE_ETHER_MAX_RATE on TM initialization process. Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 33 ++ .../net/ethernet/hisilicon/hns3/hns3pf/hclg

[PATCH net-next 05/10] net: hns3: Add tc-based TM support for sriov enabled port

2017-09-21 Thread Yunsheng Lin
When sriov is enabled and TM is in tc-based mode, vf's TM parameters is not set in TM initialization process. This patch add the tc_based TM support for sriov enabled using the information in vport struct. Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- .../net/ethernet/hisilico

[PATCH net-next 09/10] net: hns3: Setting for fc_mode and dcb enable flag in TM module

2017-09-21 Thread Yunsheng Lin
After the DCB feature is supported, fc_mode and dcb enable flag must be set according to the DCB parameter. Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 34 +++--- 1 file changed, 30 insertions(+), 4 del

[PATCH net-next 10/10] net: hns3: Add mqprio support when interacting with network stack

2017-09-21 Thread Yunsheng Lin
ed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- .../net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 135 + 1 file changed, 111 insertions(+), 24 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c b/drivers/net/ethernet/hisilicon

[PATCH net-next 08/10] net: hns3: Add dcb netlink interface for the support of DCB feature

2017-09-21 Thread Yunsheng Lin
This patch add dcb netlink interface by calling the interface from hclge_dcb module. This patch also update Makefile in order to build hns3_dcbnl module. Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- .../net/ethernet/hisilicon/hns3/hns3pf/Makefile| 2 + .../ethernet/his

Re: [PATCH net 2/4] net:ethernet:aquantia: Fix Tx queue hangups

2017-09-21 Thread Yunsheng Lin
Hi, Igor On 2017/9/21 18:53, Igor Russkikh wrote: > Driver did a poor job in managing its Tx queues: Sometimes it could stop > tx queues due to link down condition in aq_nic_xmit - but never waked up > them. That led to Tx path total suspend. > This patch fixes this and improves generic queue

Re: [PATCH net-next 2/4] cxgb4: add basic tc flower offload support

2017-09-21 Thread Yunsheng Lin
Hi, Kumar On 2017/9/21 15:33, Rahul Lakkireddy wrote: > From: Kumar Sanghvi > > Add support to add/remove flows for offload. Following match > and action are supported for offloading a flow: > > Match: ether-protocol, IPv4/IPv6 addresses, L4 ports (TCP/UDP) > Action:

[PATCH net 1/9] net: hns3: Cleanup for ROCE capability flag in ae_dev

2017-09-20 Thread Yunsheng Lin
is not supported. Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 5 - .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 25 -- .../net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 16 +- 3 files chang

[PATCH net 2/9] net: hns3: Fix initialization when cmd is not supported

2017-09-20 Thread Yunsheng Lin
: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 7 ++ .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 26 +---

[PATCH net 7/9] net: hns3: Fix typo error for feild in hclge_tm

2017-09-20 Thread Yunsheng Lin
This patch fixes a typo error for feild, which should be field. Fixes: 848440544b41f ("net: hns3: Add support of TX Scheduler & Shaper to HNS3 driver") Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- .../net/ethernet/hisilicon/hns3/hns3p

[PATCH net 0/9] TM related bugfixes for the HNS3 Ethernet Driver

2017-09-20 Thread Yunsheng Lin
This patch set contains a few bugfixes related to hclge_tm module. Yunsheng Lin (9): net: hns3: Cleanup for ROCE capability flag in ae_dev net: hns3: Fix initialization when cmd is not supported net: hns3: Fix for DEFAULT_DV when dev doesn't support DCB net: hns3: Fix for not setting rx

[PATCH net 3/9] net: hns3: Fix for DEFAULT_DV when dev doesn't support DCB

2017-09-20 Thread Yunsheng Lin
When ae_dev doesn't support DCB, DEFAULT_DV must be set to a lower value, otherwise the buffer allocation process will fail. This patch fix it by setting it to 30K bytes. Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by

[PATCH net 8/9] net: hns3: Fix for setting rss_size incorrectly

2017-09-20 Thread Yunsheng Lin
correctly. For now, each TC has the same rss size. Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 76 ++--

[PATCH net 5/9] net: hns3: Fix for rx_priv_buf_alloc not setting rx shared buffer

2017-09-20 Thread Yunsheng Lin
of packet in SSU. Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 3 ++- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclg

[PATCH net 6/9] net: hns3: Fix for rx priv buf allocation when DCB is not supported

2017-09-20 Thread Yunsheng Lin
ation Engine & Compatibility Layer Support") Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/

[PATCH net 9/9] net: hns3: Fix for pri to tc mapping in TM

2017-09-20 Thread Yunsheng Lin
Current mapping between pri and tc is one to one, so user can't map multi priorities to the same tc. This patch changes the mapping to many to one. Fixes: 848440544b41f ("net: hns3: Add support of TX Scheduler & Shaper to HNS3 driver") Signed-off-by: Yunsheng Lin <linyu

[PATCH net 4/9] net: hns3: Fix for not setting rx private buffer size to zero

2017-09-20 Thread Yunsheng Lin
Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --

[PATCH net-next] net: hns: Fix for __udivdi3 compiler error

2017-08-04 Thread Yunsheng Lin
This patch fixes the __udivdi3 undefined error reported by test robot. Fixes: b8c17f708831 ("net: hns: Add self-adaptive interrupt coalesce support in hns driver") Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> --- drivers/net/ethernet/hisilicon/hns/hns_enet.c | 3 ++- 1

  1   2   >