[RFCv5 PATCH net-next 00/20] net: extend the type of netdev_features_t to bitmap
by Jian Shen
For the prototype of netdev_features_t is u64, and the number
of netdevice feature bits is 64 now. So there is no space to
introduce new feature bit.
This patchset try to solve it by change the prototype of
netdev_features_t from u64 to structure below:
typedef struct {
DECLARE_BITMAP(bits, NETDEV_FEATURE_COUNT);
} netdev_features_t;
With this change, it's necessary to introduce a set of bitmap
operation helpers for netdev features. As the nic drivers are
not supposed to modify netdev_features directly, it also
introduces wrappers helpers to this. [patch 20]
There are a set of helpes named as "netdev_features_xxx", and I
want to add similar helpers for netdev features members, named as
netdev_XXX_features_xxx.(xxx: and/or/xor.., XXX: hw/vlan/mpls...)
To make the helpers name differentiable, rename netdev->features
to netdev->active_features. [patch 2]
For example:
#define netdev_active_features_set_bit(ndev, nr) \
netdev_features_set_bit(nr, &ndev->active_features)
To avoid mistake using NETIF_F_XXX as NETIF_F_XXX_BIT as
input macroes for above helpers, remove all the macroes
of NETIF_F_XXX. [patch 20]
The features group macroes in netdev_features.h are replaced
by a set of const features defined in netdev_features.c. [patch 3-4]
For example:
macro NETIF_F_ALL_TSO is replaced by netdev_all_tso_features
There are some drivers(e.g. sfc) use netdev_features in global
structure initialization. Changed the its netdev_features_t memeber
to netdev_features_t *, and make it prefer to a netdev_features_t
global variables. [patch 5]
As suggestion from Andrew Lunn, I wrote some semantic patches to do the
work(replacing the netdev features operator by helpers). [patch 8-19]
To make the semantic patches simple, I split the complex opreation of
netdev_features to simple logical operation. [patch 6, 7]
With the prototype is no longer u64, the implementation of print interface
for netdev features(%pNF) is changed to bitmap. [patch 20]
The whole work is not complete yet. I just use these changes
on several files(hns3 driver, sfc drivers, net/ethtool, net/core/dev.c),
in order to show how these helpers will be used. I want to get more
suggestions for this scheme, any comments would be appreciated.
The former discussion please see [1][2][3].
[1]:https://www.spinics.net/lists/netdev/msg769952.html
[2]:https://www.spinics.net/lists/netdev/msg777764.html
[3]:https://lore.kernel.org/netdev/20211107101519.29264-1-shenjian15@huawe...
ChangeLog:
V4->V5:
adjust the patch structure, use semantic patch with coccinelle
V3->V4:
rename netdev->features to netdev->active_features
remove helpes for handle first 64 bits
remove __NETIF_F(name) macroes
replace features group macroes with const features
V2->V3:
use structure for bitmap, suggest by Edward Cree
V1->V2:
Extend the prototype from u64 to bitmap, suggest by Andrew Lunn
Jian Shen (20):
net: rename net_device->features to net_device->active_features
net: introduce operation helpers for netdev features
net: replace general features macroes with global netdev_features
variables
net: replace multiple feature bits with netdev features array
net: sfc: replace const features initialization with netdev features
array
net: simplify the netdev features expression
net: adjust variables definition for netdev_features_t
net: use netdev_features_set_bit helpers
net: use netdev_features_or helpers
net: use netdev_features_xor helpers
net: use netdev_features_clear_bit helpers
net: use netdev_features_andnot helpers
net: use netdev_features_test_bit helpers
net: use netdev_features_intersects helpers
net: use netdev_features_and helpers
net: use netdev_features_subset helpers
net: use netdev_features_equal helpers
net: use netdev_set_xxx_features helpers
net: use netdev_xxx_features helpers
net: redefine the prototype of netdev_features_t
.../net/ethernet/hisilicon/hns3/hns3_enet.c | 116 ++-
.../ethernet/hisilicon/hns3/hns3_ethtool.c | 4 +-
drivers/net/ethernet/sfc/ef10.c | 43 +-
drivers/net/ethernet/sfc/ef100_nic.c | 57 +-
drivers/net/ethernet/sfc/ef100_rx.c | 4 +-
drivers/net/ethernet/sfc/ef100_tx.c | 8 +-
drivers/net/ethernet/sfc/ef10_sriov.c | 6 +-
drivers/net/ethernet/sfc/efx.c | 96 ++-
drivers/net/ethernet/sfc/efx_common.c | 32 +-
drivers/net/ethernet/sfc/falcon/efx.c | 75 +-
drivers/net/ethernet/sfc/falcon/efx.h | 3 +
drivers/net/ethernet/sfc/falcon/falcon.c | 4 +-
drivers/net/ethernet/sfc/falcon/net_driver.h | 4 +-
drivers/net/ethernet/sfc/falcon/rx.c | 4 +-
drivers/net/ethernet/sfc/farch.c | 2 +-
drivers/net/ethernet/sfc/mcdi_filters.c | 13 +-
drivers/net/ethernet/sfc/mcdi_port_common.c | 2 +-
drivers/net/ethernet/sfc/net_driver.h | 4 +-
drivers/net/ethernet/sfc/rx.c | 2 +-
drivers/net/ethernet/sfc/rx_common.c | 5 +-
drivers/net/ethernet/sfc/rx_common.h | 4 +
drivers/net/ethernet/sfc/siena.c | 3 +-
include/linux/netdev_features.h | 189 ++---
include/linux/netdevice.h | 722 +++++++++++++++++-
lib/vsprintf.c | 11 +-
net/core/dev.c | 419 ++++++----
net/core/netdev_features.c | 276 +++++++
net/ethtool/features.c | 77 +-
net/ethtool/ioctl.c | 140 ++--
29 files changed, 1797 insertions(+), 528 deletions(-)
create mode 100644 net/core/netdev_features.c
--
2.33.0
9 months, 2 weeks
[PATCH 0/4] rasdaemon: Some little fixes and add some modules support
by Xiaofei Tan
Some little fixes and add some modules support for kunpeng series.
Xiaofei Tan (4):
rasdaemon: Fix the issue of sprintf data type mismatch in uuid_le()
rasdaemon: Fix the issue of command option -r for hip08
rasdaemon: Fix some print format issues for hisi common error section
rasdaemon: Add some modules supported by hisi common error section
non-standard-hisi_hip08.c | 6 +++---
non-standard-hisilicon.c | 32 +++++++++++++++++++++-----------
ras-extlog-handler.c | 2 +-
ras-non-standard-handler.c | 4 ++--
4 files changed, 27 insertions(+), 17 deletions(-)
--
2.33.0
10 months
information about Email Marketing - id= 202232875729
by ISA Email Marketing
Good morning
My name is Fabian Torre and I am an Email Marketing technician
I would like to know if you are interested in receiving information
about products and services for Email Marketing, and to what email
address I can send it.
Thanks a lot
Whatsapp: +55 719 9204-2292
Skype: chronskype
10 months
Koszty instalacji fotowoltaicznej
by "Arkadiusz Sokołowski"
Dzień dobry,
stworzyliśmy specjalną ofertę dla firm, na kompleksową obsługę inwestycji w fotowoltaikę.
Specjalizujemy się w zakresie doboru, montażu i serwisie instalacji fotowoltaicznych, dysponujemy najnowocześniejszymi rozwiązania, które zapewnią Państwu oczekiwane rezultaty.
Możemy przygotować dla Państwa wstępną kalkulację i przeanalizować efekty możliwe do osiągnięcia.
Czy są Państwo otwarci na wstępną rozmowę w tym temacie?
Pozdrawiam
Arkadiusz Sokołowski
10 months
[PATCH net-next v2 0/4] add frag page support in page pool
by Yunsheng Lin
This patchset adds frag page support in page pool and
enable skb's page frag recycling based on page pool in
hns3 drvier.
V2:
1. resend based on the latest net-next.
V1:
1. avoid atomic_long_read() in case of freeing or draining
page frag, and drop RFC tag.
RFC v6:
1. Disable frag page support in system 32-bit arch and
64-bit DMA.
RFC v5:
1. Rename dma_addr[0] to pp_frag_count and adjust codes
according to the rename.
RFC v4:
1. Use the dma_addr[1] to store bias.
2. Default to a pagecnt_bias of PAGE_SIZE - 1.
3. other minor comment suggested by Alexander.
RFC v3:
1. Implement the semantic of "page recycling only wait for the
page pool user instead of all user of a page"
2. Support the frag allocation of different sizes
3. Merge patch 4 & 5 to one patch as it does not make sense to
use page_pool_dev_alloc_pages() API directly with elevated
refcnt.
4. other minor comment suggested by Alexander.
RFC v2:
1. Split patch 1 to more reviewable one.
2. Repurpose the lower 12 bits of the dma address to store the
pagecnt_bias as suggested by Alexander.
3. support recycling to pool->alloc for elevated refcnt case
too.
Yunsheng Lin (4):
page_pool: keep pp info as long as page pool owns the page
page_pool: add interface to manipulate frag count in page pool
page_pool: add frag page recycling support in page pool
net: hns3: support skb's frag page recycling based on page pool
drivers/net/ethernet/hisilicon/Kconfig | 1 +
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 79 +++++++++++++++--
drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 3 +
drivers/net/ethernet/marvell/mvneta.c | 6 +-
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 +-
drivers/net/ethernet/ti/cpsw.c | 2 +-
drivers/net/ethernet/ti/cpsw_new.c | 2 +-
include/linux/mm_types.h | 18 ++--
include/linux/skbuff.h | 4 +-
include/net/page_pool.h | 68 +++++++++++---
net/core/page_pool.c | 112 +++++++++++++++++++++++-
11 files changed, 258 insertions(+), 39 deletions(-)
--
2.7.4
10 months, 1 week
Wycena paneli fotowoltaicznych
by Norbert Karecki
Dzień dobry,
dostrzegam możliwość współpracy z Państwa firmą.
Świadczymy kompleksową obsługę inwestycji w fotowoltaikę, która obniża koszty energii elektrycznej nawet o 90%.
Czy są Państwo zainteresowani weryfikacją wstępnych propozycji?
Pozdrawiam
Norbert Karecki
10 months, 2 weeks
Re: Mutual Investment Proposal
by Luis Fernandez
Good Day,
My name is Luis Fernandez, I am contacting you because we have
investors that have the capacity to invest in any massive project
in your country or invest in your existing project that requires
funding.Kindly get back to me for more details.
Regards
Luis Fernandez
10 months, 2 weeks
FROM MRS ROSE RAYA
by Mrs.Rose Raya
My name is Mrs.Rose Raya.from Indonesia,
I know that this message might come to you as a surprise because we
don't know each other nor have we ever met before but accept it with
an open and positive mind. I have a Very important request that made
me to contact you; I was diagnosed with ovarian cancer disease which
doctors have confirmed and announced to me that i have just few days
to leave, Now that I’m ending the race like this, without any family
members and no child, I just came across your email contact from my
personal search.
I’m a business woman from Indonesia dealing with gold exportation here
in the Republic of Burkina Faso. I have decided to hand over the sum
of ($10.5 Million Dollar) in my account to you for the help of
orphanage homes/the needy once in your location to fulfill my wish on
earth. But before handing over my data’s to you, kindly assure me that
you will take only 50% of the money and share the rest to orphanage
homes/the needy once in your country, Return to enable me forward to
you the bank contact details now that I have access to Internet in the
hospital to enable you contact the bank, always
check your email and reply in time for better communications.
PLEASE REPLY ME WITH THE ANSWERS TO THOSE QUESTIONS BELOW FOR MY
CONFIRMATION SO THAT I CAN GIVE YOU THE EMAIL ADDRESS OF THE BANK FOR YOU
TO CONTACT THEM.
1. FULL NAME:
2. YOUR AGE:
3. SEX:
4. NATIONALITY:
5. COUNTRY OF RESIDENCE:
6. TELEPHONE NUMBER:
7. YOUR MARITAL STATUS:
8. YOUR OCCUPATION:
9. SEND TO ME YOUR PICTURE:
10. YOU HAVE TO ASSURE ME YOU WILL ACT AS I HAVE INSTRUCTED YOU IF THE
MONEY GETS TO YOUR BANK ACCOUNT.
Your early response will be appreciated.
Yours Faithfully,
Mrs.Rose Raya.
10 months, 3 weeks
[PATCH v2] dma-mapping: benchmark: Extract a common header file for map_benchmark definition
by Tian Tao
kernel/dma/map_benchmark.c and selftests/dma/dma_map_benchmark.c
have duplicate map_benchmark definitions, which tends to lead to
inconsistent changes to map_benchmark on both sides, extract a
common header file to avoid this problem.
Signed-off-by: Tian Tao <tiantao6(a)hisilicon.com>
Acked-by: Barry Song <song.bao.hua(a)hisilicon.com>
Reviewed-by: Shuah Khan <skhan(a)linuxfoundation.org>
---
v2:
move map_benchmark.h in a more appropriate directory
---
include/linux/map_benchmark.h | 31 +++++++++++++++++++
kernel/dma/map_benchmark.c | 25 +--------------
.../testing/selftests/dma/dma_map_benchmark.c | 25 +--------------
3 files changed, 33 insertions(+), 48 deletions(-)
create mode 100644 include/linux/map_benchmark.h
diff --git a/include/linux/map_benchmark.h b/include/linux/map_benchmark.h
new file mode 100644
index 000000000000..62674c83bde4
--- /dev/null
+++ b/include/linux/map_benchmark.h
@@ -0,0 +1,31 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Copyright (C) 2022 HiSilicon Limited.
+ */
+
+#ifndef _KERNEL_DMA_BENCHMARK_H
+#define _KERNEL_DMA_BENCHMARK_H
+
+#define DMA_MAP_BENCHMARK _IOWR('d', 1, struct map_benchmark)
+#define DMA_MAP_MAX_THREADS 1024
+#define DMA_MAP_MAX_SECONDS 300
+#define DMA_MAP_MAX_TRANS_DELAY (10 * NSEC_PER_MSEC)
+
+#define DMA_MAP_BIDIRECTIONAL 0
+#define DMA_MAP_TO_DEVICE 1
+#define DMA_MAP_FROM_DEVICE 2
+
+struct map_benchmark {
+ __u64 avg_map_100ns; /* average map latency in 100ns */
+ __u64 map_stddev; /* standard deviation of map latency */
+ __u64 avg_unmap_100ns; /* as above */
+ __u64 unmap_stddev;
+ __u32 threads; /* how many threads will do map/unmap in parallel */
+ __u32 seconds; /* how long the test will last */
+ __s32 node; /* which numa node this benchmark will run on */
+ __u32 dma_bits; /* DMA addressing capability */
+ __u32 dma_dir; /* DMA data direction */
+ __u32 dma_trans_ns; /* time for DMA transmission in ns */
+ __u32 granule; /* how many PAGE_SIZE will do map/unmap once a time */
+};
+#endif /* _KERNEL_DMA_BENCHMARK_H */
diff --git a/kernel/dma/map_benchmark.c b/kernel/dma/map_benchmark.c
index 9b9af1bd6be3..0520a8f4fb1d 100644
--- a/kernel/dma/map_benchmark.c
+++ b/kernel/dma/map_benchmark.c
@@ -11,6 +11,7 @@
#include <linux/dma-mapping.h>
#include <linux/kernel.h>
#include <linux/kthread.h>
+#include <linux/map_benchmark.h>
#include <linux/math64.h>
#include <linux/module.h>
#include <linux/pci.h>
@@ -18,30 +19,6 @@
#include <linux/slab.h>
#include <linux/timekeeping.h>
-#define DMA_MAP_BENCHMARK _IOWR('d', 1, struct map_benchmark)
-#define DMA_MAP_MAX_THREADS 1024
-#define DMA_MAP_MAX_SECONDS 300
-#define DMA_MAP_MAX_TRANS_DELAY (10 * NSEC_PER_MSEC)
-
-#define DMA_MAP_BIDIRECTIONAL 0
-#define DMA_MAP_TO_DEVICE 1
-#define DMA_MAP_FROM_DEVICE 2
-
-struct map_benchmark {
- __u64 avg_map_100ns; /* average map latency in 100ns */
- __u64 map_stddev; /* standard deviation of map latency */
- __u64 avg_unmap_100ns; /* as above */
- __u64 unmap_stddev;
- __u32 threads; /* how many threads will do map/unmap in parallel */
- __u32 seconds; /* how long the test will last */
- __s32 node; /* which numa node this benchmark will run on */
- __u32 dma_bits; /* DMA addressing capability */
- __u32 dma_dir; /* DMA data direction */
- __u32 dma_trans_ns; /* time for DMA transmission in ns */
- __u32 granule; /* how many PAGE_SIZE will do map/unmap once a time */
- __u8 expansion[76]; /* For future use */
-};
-
struct map_benchmark_data {
struct map_benchmark bparam;
struct device *dev;
diff --git a/tools/testing/selftests/dma/dma_map_benchmark.c b/tools/testing/selftests/dma/dma_map_benchmark.c
index 485dff51bad2..c3b3c09e995e 100644
--- a/tools/testing/selftests/dma/dma_map_benchmark.c
+++ b/tools/testing/selftests/dma/dma_map_benchmark.c
@@ -10,40 +10,17 @@
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
+#include <linux/map_benchmark.h>
#include <linux/types.h>
#define NSEC_PER_MSEC 1000000L
-#define DMA_MAP_BENCHMARK _IOWR('d', 1, struct map_benchmark)
-#define DMA_MAP_MAX_THREADS 1024
-#define DMA_MAP_MAX_SECONDS 300
-#define DMA_MAP_MAX_TRANS_DELAY (10 * NSEC_PER_MSEC)
-
-#define DMA_MAP_BIDIRECTIONAL 0
-#define DMA_MAP_TO_DEVICE 1
-#define DMA_MAP_FROM_DEVICE 2
-
static char *directions[] = {
"BIDIRECTIONAL",
"TO_DEVICE",
"FROM_DEVICE",
};
-struct map_benchmark {
- __u64 avg_map_100ns; /* average map latency in 100ns */
- __u64 map_stddev; /* standard deviation of map latency */
- __u64 avg_unmap_100ns; /* as above */
- __u64 unmap_stddev;
- __u32 threads; /* how many threads will do map/unmap in parallel */
- __u32 seconds; /* how long the test will last */
- __s32 node; /* which numa node this benchmark will run on */
- __u32 dma_bits; /* DMA addressing capability */
- __u32 dma_dir; /* DMA data direction */
- __u32 dma_trans_ns; /* time for DMA transmission in ns */
- __u32 granule; /* how many PAGE_SIZE will do map/unmap once a time */
- __u8 expansion[76]; /* For future use */
-};
-
int main(int argc, char **argv)
{
struct map_benchmark map;
--
2.33.0
10 months, 3 weeks
【重要】えきねっとアカウントの自動退会処理について
by Ekinet
日頃より「えきねっと」をご利用いただきありがとうございます。
「えきねっと」のアカウントは制限されています。通常の使用に影響を与えないように、下のリンクをクリックして関連情報をできるだけ早く確認してください。12時間以内に申し込みが届かない場合、アカウントは常にご不便をおかけして申し訳ございません。
2年以上ログインしていないお客さまで、今後も「えきねっと」をご利用いただける場合 は、2022 年 3 月 10 日(木)よりも前に、一度ログイン操作をお願いいたします。
⇒ログインはこちら
※えきねっとトップページ右上のログインボタンよりログインしてください。
お問い合わせ先
えきねっとサポートセンター
TEL 050-2016-5000
受付時間 8時00分~22時00分
サイト運営・管理
JR東日本ネットステーション
--------------------
このメールは「えきねっと」より自動配信されています。
返信いただきましても対応致しかねますので、あらかじめご了承ください。
お心当たりのない方は、誠に恐れ入りますがこのメールの削除をお願いいたします。
ご不明な点のある方は、えきねっとサポートセンターまでご連絡ください。
Copyright © JR East Net Station Co.,Ltd. All Rights Reserved.
10 months, 3 weeks