<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/net/ethernet/hisilicon, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/net/ethernet/hisilicon?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/net/ethernet/hisilicon?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-11-04T10:06:52Z</updated>
<entry>
<title>net: hns3: fix get wrong value of function hclge_get_dscp_prio()</title>
<updated>2022-11-04T10:06:52Z</updated>
<author>
<name>Guangbin Huang</name>
<email>huangguangbin2@huawei.com</email>
</author>
<published>2022-11-01T07:48:38Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=cfdcb075048c1e886c45a9c9e681ed222f74ecb9'/>
<id>urn:sha1:cfdcb075048c1e886c45a9c9e681ed222f74ecb9</id>
<content type='text'>
As the argument struct hnae3_handle *h of function hclge_get_dscp_prio()
can be other client registered in hnae3 layer, we need to transform it
into hnae3_handle of local nic client to get right dscp settings for
other clients.

Fixes: dfea275e06c2 ("net: hns3: optimize converting dscp to priority process of hns3_nic_select_queue()")
Signed-off-by: Guangbin Huang &lt;huangguangbin2@huawei.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: hns: fix possible memory leak in hnae_ae_register()</title>
<updated>2022-10-20T00:28:52Z</updated>
<author>
<name>Yang Yingliang</name>
<email>yangyingliang@huawei.com</email>
</author>
<published>2022-10-18T12:24:51Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=ff2f5ec5d009844ec28f171123f9e58750cef4bf'/>
<id>urn:sha1:ff2f5ec5d009844ec28f171123f9e58750cef4bf</id>
<content type='text'>
Inject fault while probing module, if device_register() fails,
but the refcount of kobject is not decreased to 0, the name
allocated in dev_set_name() is leaked. Fix this by calling
put_device(), so that name can be freed in callback function
kobject_cleanup().

unreferenced object 0xffff00c01aba2100 (size 128):
  comm "systemd-udevd", pid 1259, jiffies 4294903284 (age 294.152s)
  hex dump (first 32 bytes):
    68 6e 61 65 30 00 00 00 18 21 ba 1a c0 00 ff ff  hnae0....!......
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [&lt;0000000034783f26&gt;] slab_post_alloc_hook+0xa0/0x3e0
    [&lt;00000000748188f2&gt;] __kmem_cache_alloc_node+0x164/0x2b0
    [&lt;00000000ab0743e8&gt;] __kmalloc_node_track_caller+0x6c/0x390
    [&lt;000000006c0ffb13&gt;] kvasprintf+0x8c/0x118
    [&lt;00000000fa27bfe1&gt;] kvasprintf_const+0x60/0xc8
    [&lt;0000000083e10ed7&gt;] kobject_set_name_vargs+0x3c/0xc0
    [&lt;000000000b87affc&gt;] dev_set_name+0x7c/0xa0
    [&lt;000000003fd8fe26&gt;] hnae_ae_register+0xcc/0x190 [hnae]
    [&lt;00000000fe97edc9&gt;] hns_dsaf_ae_init+0x9c/0x108 [hns_dsaf]
    [&lt;00000000c36ff1eb&gt;] hns_dsaf_probe+0x548/0x748 [hns_dsaf]

Fixes: 6fe6611ff275 ("net: add Hisilicon Network Subsystem hnae framework support")
Signed-off-by: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
Reviewed-by: Leon Romanovsky &lt;leonro@nvidia.com&gt;
Link: https://lore.kernel.org/r/20221018122451.1749171-1-yangyingliang@huawei.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: drop the weight argument from netif_napi_add</title>
<updated>2022-09-29T01:57:14Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2022-09-27T13:27:53Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=b48b89f9c189d24eb5e2b4a0ac067da5a24ee86d'/>
<id>urn:sha1:b48b89f9c189d24eb5e2b4a0ac067da5a24ee86d</id>
<content type='text'>
We tell driver developers to always pass NAPI_POLL_WEIGHT
as the weight to netif_napi_add(). This may be confusing
to newcomers, drop the weight argument, those who really
need to tweak the weight can use netif_napi_add_weight().

Acked-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt; # for CAN
Link: https://lore.kernel.org/r/20220927132753.750069-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: hns3: add __init/__exit annotations to module init/exit funcs</title>
<updated>2022-09-22T01:22:18Z</updated>
<author>
<name>Xiu Jianfeng</name>
<email>xiujianfeng@huawei.com</email>
</author>
<published>2022-09-17T08:21:18Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=134a4647922290159ade41c61a6277b37b6b1f4f'/>
<id>urn:sha1:134a4647922290159ade41c61a6277b37b6b1f4f</id>
<content type='text'>
Add missing __init/__exit annotations to module init/exit funcs.

Signed-off-by: Xiu Jianfeng &lt;xiujianfeng@huawei.com&gt;
Link: https://lore.kernel.org/r/20220917082118.7971-1-xiujianfeng@huawei.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: hns3: add judge fd ability for sync and clear process of flow director</title>
<updated>2022-09-21T21:32:21Z</updated>
<author>
<name>Guangbin Huang</name>
<email>huangguangbin2@huawei.com</email>
</author>
<published>2022-09-16T02:38:03Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=236b8f5dc75d59ce970d1c1368f2935bcc6ca224'/>
<id>urn:sha1:236b8f5dc75d59ce970d1c1368f2935bcc6ca224</id>
<content type='text'>
Currently, driver will always clear user defined field of flow director
in uninit process and sync flow director table in periodic task. However,
if hardware does not support flow director driver should not do those
processes, so add fd ability judgement.

The fd ability judgement in function hclge_clear_fd_rules_in_list() is
redundant, so delete it.

Signed-off-by: Guangbin Huang &lt;huangguangbin2@huawei.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: hns3: refactor function hclge_mbx_handler()</title>
<updated>2022-09-21T21:32:21Z</updated>
<author>
<name>Hao Lan</name>
<email>lanhao@huawei.com</email>
</author>
<published>2022-09-16T02:38:02Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=09431ed8de874881e2d5d430042d718ae074d371'/>
<id>urn:sha1:09431ed8de874881e2d5d430042d718ae074d371</id>
<content type='text'>
Currently, the function hclge_mbx_handler() has too many switch-case
statements, it makes this function too long. To improve code readability,
refactor this function and use lookup table instead.

Signed-off-by: Hao Lan &lt;lanhao@huawei.com&gt;
Signed-off-by: Guangbin Huang &lt;huangguangbin2@huawei.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: hns3: optimize converting dscp to priority process of hns3_nic_select_queue()</title>
<updated>2022-09-21T21:32:21Z</updated>
<author>
<name>Guangbin Huang</name>
<email>huangguangbin2@huawei.com</email>
</author>
<published>2022-09-16T02:38:01Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=dfea275e06c26690b1ef27399fd84ce50372b85c'/>
<id>urn:sha1:dfea275e06c26690b1ef27399fd84ce50372b85c</id>
<content type='text'>
Currently, when function hns3_nic_select_queue() converts dscp to priority,
it calls an indirect callback ae_algo-&gt;ops-&gt;get_dscp_prio to get priority.

However as function hns3_nic_select_queue() is in fast path, the indirect
call may cause degradation of performance. For optimization, this patch
moves dscp_app_cnt and dscp_prio from struct hclge_tm_info to struct
hnae3_knic_private_info, so they can be used in both hclge and hns3 layers.

Signed-off-by: Guangbin Huang &lt;huangguangbin2@huawei.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: hns3: add support for external loopback test</title>
<updated>2022-09-21T21:32:20Z</updated>
<author>
<name>Yonglong Liu</name>
<email>liuyonglong@huawei.com</email>
</author>
<published>2022-09-16T02:38:00Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=04b6ba143521f4485b7f2c36c655b262a79dae97'/>
<id>urn:sha1:04b6ba143521f4485b7f2c36c655b262a79dae97</id>
<content type='text'>
This patch add support for external loopback test.
The successful test need the link is up with duplex full. The
driver do external loopback first, and then the whole offline
test.

Signed-off-by: Yonglong Liu &lt;liuyonglong@huawei.com&gt;
Signed-off-by: Guangbin Huang &lt;huangguangbin2@huawei.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: hns3: add support to query and set lane number by ethtool</title>
<updated>2022-09-07T15:20:15Z</updated>
<author>
<name>Hao Chen</name>
<email>chenhao418@huawei.com</email>
</author>
<published>2022-09-06T09:12:23Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=0f032f93c4ee9ff667b493db7b21c94cff31edc6'/>
<id>urn:sha1:0f032f93c4ee9ff667b493db7b21c94cff31edc6</id>
<content type='text'>
When serdes lane support setting 25Gb/s or 50Gb/s speed and user wants to
set port speed as 50Gb/s, it can be setted as one 50Gb/s serdes lane or
two 25Gb/s serdes lanes.

So, this patch adds support to query and set lane number by ethtool
to satisfy this scenario.

Signed-off-by: Hao Chen &lt;chenhao418@huawei.com&gt;
Signed-off-by: Guangbin Huang &lt;huangguangbin2@huawei.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: hns3: add querying fec statistics</title>
<updated>2022-09-07T15:20:15Z</updated>
<author>
<name>Hao Lan</name>
<email>lanhao@huawei.com</email>
</author>
<published>2022-09-06T09:12:22Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=2cb343b9d3e59db0836045ff1dd67dfd15066697'/>
<id>urn:sha1:2cb343b9d3e59db0836045ff1dd67dfd15066697</id>
<content type='text'>
FEC statistics can be used to check the transmission quality of links.
This patch implements the get_fec_stats callback of ethtool_ops to support
querying FEC statistics by command "ethtool -I --show-fec eth0".

Signed-off-by: Hao Lan &lt;lanhao@huawei.com&gt;
Signed-off-by: Guangbin Huang &lt;huangguangbin2@huawei.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
