Re: [RFC Patch v1 1/3] net: ena: implement local page cache (LPC) system

2021-03-16 Thread Shay Agroskin
Eric Dumazet writes: On 3/9/21 6:10 PM, Shay Agroskin wrote: The page cache holds pages we allocated in the past during napi cycle, and tracks their availability status using page ref count. The cache can hold up to 2048 pages. Upon allocating a page, we check whether the next entry in

Re: [RFC Patch v1 1/3] net: ena: implement local page cache (LPC) system

2021-03-16 Thread Shay Agroskin
Saeed Mahameed writes: On Wed, 2021-03-10 at 03:04 +0100, Andrew Lunn wrote: On Tue, Mar 09, 2021 at 06:57:06PM +0100, Eric Dumazet wrote: > > > On 3/9/21 6:10 PM, Shay Agroskin wrote: > > The page cache holds pages we allocated in the past during > > napi >

Re: [PATCH net] docs: net: ena: Fix ena_start_xmit() function name typo

2021-03-16 Thread Shay Agroskin
ush buffer (if the driver and device are Acked-by: Shay Agroskin Thanks for this fix

Re: [PATCH] ethernet: amazon: ena: A typo fix in the file ena_com.h

2021-03-15 Thread Shay Agroskin
idx of the current packet */ + /* save the first cdesc idx of the current packet */ u16 cur_rx_pkt_cdesc_start_idx; u16 q_depth; Acked-by: Shay Agroskin Thanks for your patch

Re: [PATCH 2/5] mm/page_alloc: Add a bulk page allocator

2021-03-10 Thread Shay Agroskin
Mel Gorman writes: diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 8572a1474e16..4903d1cc48dc 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h @@ -515,6 +515,10 @@ static inline int arch_make_page_accessible(struct page *page) } #endif +int __alloc_pages_bulk_nod

[RFC Patch v1 3/3] net: ena: support ethtool priv-flags and LPC state change

2021-03-09 Thread Shay Agroskin
r LPC it the README.rst file. Signed-off-by: Shay Agroskin --- .../device_drivers/ethernet/amazon/ena.rst| 3 ++ drivers/net/ethernet/amazon/ena/ena_ethtool.c | 53 --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 32 +++ drivers/net/ethernet/amazon/ena/ena_net

[RFC Patch v1 2/3] net: ena: update README file with a description about LPC

2021-03-09 Thread Shay Agroskin
Add a description for local page cache system to the ENA driver readme file. Signed-off-by: Shay Agroskin --- .../device_drivers/ethernet/amazon/ena.rst| 25 +++ 1 file changed, 25 insertions(+) diff --git a/Documentation/networking/device_drivers/ethernet/amazon/ena.rst b

[RFC Patch v1 1/3] net: ena: implement local page cache (LPC) system

2021-03-09 Thread Shay Agroskin
would be either from the cache, or from the Linux memory system. In case the system is out-of-memory the cache returns NULL. This scenario doesn't break the cache's correctness. The page cache is disabled when having less than 16 queues or when XDP is used. Signed-off-by: Shay Agroskin --

[RFC Patch v1 0/3] Introduce ENA local page cache

2021-03-09 Thread Shay Agroskin
| before | after | | ++ | | bandwidth (Gbps)| 260| 330 | | CPU utilization (%) | 100| 56| Shay Agroskin (3): net: ena: implement local page cache (LPC) system net: ena: update README file with a description about LPC net: ena: support ethtool priv-flags

[RFC Patch v1 2/3] net: ena: update README file with a description about LPC

2021-03-09 Thread Shay Agroskin
Add a description for local page cache system to the ENA driver readme file. Signed-off-by: Shay Agroskin --- .../device_drivers/ethernet/amazon/ena.rst| 25 +++ 1 file changed, 25 insertions(+) diff --git a/Documentation/networking/device_drivers/ethernet/amazon/ena.rst b

[RFC Patch v1 1/3] net: ena: implement local page cache (LPC) system

2021-03-09 Thread Shay Agroskin
would be either from the cache, or from the Linux memory system. In case the system is out-of-memory the cache returns NULL. This scenario doesn't break the cache's correctness. The page cache is disabled when having less than 16 queues or when XDP is used. Signed-off-by: Shay Agroskin --

[RFC Patch v1 0/3] Introduce ENA local page cache

2021-03-09 Thread Shay Agroskin
| before | after | | ++ | | bandwidth (Gbps)| 260| 330 | | CPU utilization (%) | 100| 56| Shay Agroskin (3): net: ena: implement local page cache (LPC) system net: ena: update README file with a description about LPC net: ena: support ethtool priv-flags

Re: [PATCH v3 bpf-next] bpf: devmap: move drop error path to devmap for XDP_REDIRECT

2021-03-08 Thread Shay Agroskin
index 102f2c91fdb8..5c062c51b4cb 100644 --- a/drivers/net/ethernet/amazon/ena/ena_netdev.c +++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c @@ -300,7 +300,7 @@ static int ena_xdp_xmit_frame(struct ena_ring *xdp_ring, Acked-by: Shay Agroskin for ena-drivers. Also reviewed all non-driver specific code,

Re: [PATCH v2 bpf-next] bpf: devmap: move drop error path to devmap for XDP_REDIRECT

2021-03-03 Thread Shay Agroskin
Jesper Dangaard Brouer writes: On Mon, 1 Mar 2021 13:23:06 +0200 Shay Agroskin wrote: Jesper Dangaard Brouer writes: > On Sun, 28 Feb 2021 23:27:25 +0100 > Lorenzo Bianconi wrote: > >> > > drops = bq->count - sent; >> > > -out: >> > &

Re: [PATCH v2 bpf-next] bpf: devmap: move drop error path to devmap for XDP_REDIRECT

2021-03-01 Thread Shay Agroskin
Jesper Dangaard Brouer writes: On Sun, 28 Feb 2021 23:27:25 +0100 Lorenzo Bianconi wrote: > > drops = bq->count - sent; > > -out: > > - bq->count = 0; > > + if (unlikely(drops > 0)) { > > + /* If not all frames have been > > transmitted, it is our > > + * resp

Re: [PATCH v2 bpf-next] bpf: devmap: move drop error path to devmap for XDP_REDIRECT

2021-02-28 Thread Shay Agroskin
Lorenzo Bianconi writes: ... diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c index 102f2c91fdb8..7ad0557dedbd 100644 --- a/drivers/net/ethernet/amazon/ena/ena_netdev.c +++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c ... @@ -339,8

[PATCH net V1 1/1] net: ena: Update XDP verdict upon failure

2021-02-05 Thread Shay Agroskin
quot;) Signed-off-by: Shay Agroskin --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c index 06596fa1f..a0596c073 100644 --- a/drivers

[PATCH net V1 0/1] Fix XDP bug in ENA driver

2021-02-05 Thread Shay Agroskin
Hi all, This single patch fixes a bug spotted in previous XDP Redirect implementation in ENA. Shay Agroskin (1): net: ena: Update XDP verdict upon failure drivers/net/ethernet/amazon/ena/ena_netdev.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) -- 2.17.1

Re: [PATCH net-next 2/2] virtio_net: Implement XDP_FLAGS_NO_TX support

2021-01-11 Thread Shay Agroskin
Charlie Somerville writes: On Mon, Jan 11, 2021, at 04:31, Shay Agroskin wrote: Is this addition needed ? Seems like we don't set VIRTIO_XDP_TX bit in case of virtnet_xdp_xmit() failure, so the surrounding 'if' won't be taken. Good catch, it looks like you're r

Re: [PATCH net-next 2/2] virtio_net: Implement XDP_FLAGS_NO_TX support

2021-01-10 Thread Shay Agroskin
Charlie Somerville writes: No send queues will be allocated for XDP filters. Attempts to transmit packets when no XDP send queues exist will fail with EOPNOTSUPP. Signed-off-by: Charlie Somerville --- drivers/net/virtio_net.c | 17 + 1 file changed, 13 insertions(+), 4 del

Re: [PATCH v5 bpf-next 03/14] xdp: add xdp_shared_info data structure

2020-12-21 Thread Shay Agroskin
Lorenzo Bianconi writes: Lorenzo Bianconi writes: >> On Mon, 2020-12-07 at 17:32 +0100, Lorenzo Bianconi wrote: >> > Introduce xdp_shared_info data structure to contain info >> > about >> > "non-linear" xdp frame. xdp_shared_info will alias >> > skb_shared_info >> > allowing to keep most

Re: [PATCH v4 bpf-next 0/2] introduce xdp_init_buff/xdp_prepare_buff

2020-12-20 Thread Shay Agroskin
rivers/net/ethernet/amazon/ena/ena_netdev.c | 10 -- For changes in ena driver Acked-by: Shay Agroskin Also, wouldn't xdp_init_buff() change once the xdp_mb series is merged to take care of xdp.mb = 0 part ? Maybe this series should wait until the other one is merged ? drive

Re: [PATCH v5 bpf-next 11/14] bpf: cpumap: introduce xdp multi-buff support

2020-12-19 Thread Shay Agroskin
Lorenzo Bianconi writes: Introduce __xdp_build_skb_from_frame and xdp_build_skb_from_frame utility routines to build the skb from xdp_frame. Add xdp multi-buff support to cpumap Signed-off-by: Lorenzo Bianconi --- include/net/xdp.h | 5 kernel/bpf/cpumap.c | 45 +--

Re: [PATCH v5 bpf-next 06/14] net: mvneta: add multi buffer support to XDP_TX

2020-12-19 Thread Shay Agroskin
Lorenzo Bianconi writes: Introduce the capability to map non-linear xdp buffer running mvneta_xdp_submit_frame() for XDP_TX and XDP_REDIRECT Signed-off-by: Lorenzo Bianconi --- drivers/net/ethernet/marvell/mvneta.c | 94 --- 1 file changed, 56 insertions(+), 38 d

Re: [PATCH v5 bpf-next 03/14] xdp: add xdp_shared_info data structure

2020-12-19 Thread Shay Agroskin
Lorenzo Bianconi writes: On Mon, 2020-12-07 at 17:32 +0100, Lorenzo Bianconi wrote: > Introduce xdp_shared_info data structure to contain info > about > "non-linear" xdp frame. xdp_shared_info will alias > skb_shared_info > allowing to keep most of the frags in the same cache-line. [...]

Re: [PATCH V4 net-next 3/9] net: ena: add explicit casting to variables

2020-12-08 Thread Shay Agroskin
. Adding this cast won't affect the end results, and would sooth the checkers. Signed-off-by: Ido Segev Signed-off-by: Igor Chauskin Signed-off-by: Shay Agroskin Signed-off-by: Arthur Kiyanovski --- ... @@ -2712,7 +2712,7 @@ int ena_com_indirect_table_get(struct ena_com_dev *ena_dev, u32 *in

[PATCH net-next v5 4/9] net: ena: fix coding style nits

2020-12-08 Thread Shay Agroskin
ead. Signed-off-by: Sameeh Jubran Signed-off-by: Kuniyuki Iwashima Signed-off-by: Shay Agroskin --- drivers/net/ethernet/amazon/ena/ena_eth_com.c | 5 +++-- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 2 +- drivers/net/ethernet/amazon/ena/ena_netdev.h | 4 ++-- 3 files changed, 6 inserti

[PATCH net-next v5 9/9] net: ena: introduce ndo_xdp_xmit() function for XDP_REDIRECT

2020-12-08 Thread Shay Agroskin
the XDP_TX flow. Therefore a lock is added to synchronize both flows (XDP_TX and XDP_REDIRECT). Signed-off-by: Shay Agroskin --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 83 +--- drivers/net/ethernet/amazon/ena/ena_netdev.h | 1 + 2 files changed, 72 insertions(+), 12

[PATCH net-next v5 7/9] net: ena: introduce XDP redirect implementation

2020-12-08 Thread Shay Agroskin
missing .ndo_xdp_xmit function implementation, which allows to redirect packet to an ENA interface, which would be added in a later patch. Signed-off-by: Shay Agroskin --- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 1 + drivers/net/ethernet/amazon/ena/ena_netdev.c | 83

[PATCH net-next v5 8/9] net: ena: use xdp_return_frame() to free xdp frames

2020-12-08 Thread Shay Agroskin
struct since it is no longer used. Signed-off-by: Shay Agroskin --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 3 +-- drivers/net/ethernet/amazon/ena/ena_netdev.h | 6 -- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drive

[PATCH net-next v5 6/9] net: ena: use xdp_frame in XDP TX flow

2020-12-08 Thread Shay Agroskin
Rename the ena_xdp_xmit_buff() function to ena_xdp_xmit_frame() and pass it an xdp_frame struct instead of xdp_buff. This change lays the ground for XDP redirect implementation which uses xdp_frames when 'xmit'ing packets. Signed-off-by: Shay Agroskin --- drivers/net/ethernet/

[PATCH net-next v5 1/9] net: ena: use constant value for net_device allocation

2020-12-08 Thread Shay Agroskin
obe() form other parts of the driver. See discussion about this decision in [1]. [1] http://www.mail-archive.com/netdev@vger.kernel.org/msg353590.html Signed-off-by: Shay Agroskin --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 46 ++-- 1 file changed, 23 insertions(+), 23

[PATCH net-next v5 5/9] net: ena: aggregate stats increase into a function

2020-12-08 Thread Shay Agroskin
at a time and several stats which are increased together weren't put into a function to avoid calling the function several times for each stat which looks bad and might decrease performance. Signed-off-by: Shay Agroskin --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 167 -

[PATCH net-next v5 3/9] net: ena: store values in their appropriate variables types

2020-12-08 Thread Shay Agroskin
This patch changes some of the variables types to match the values they hold. These wrong types fail some of our static checkers that search for accidental conversions in our driver. Signed-off-by: Ido Segev Signed-off-by: Igor Chauskin Signed-off-by: Shay Agroskin --- drivers/net/ethernet

[PATCH net-next v5 2/9] net: ena: add device distinct log prefix to files

2020-12-08 Thread Shay Agroskin
er to the net_device was added to ena_com_dev struct. The patch also adds some log messages to make driver debugging easier. Signed-off-by: Amit Bernstein Signed-off-by: Shay Agroskin --- drivers/net/ethernet/amazon/ena/ena_com.c | 384 +++--- drivers/net/ethernet/amazon/ena/ena_

[PATCH net-next v5 0/9] XDP Redirect implementation for ENA driver

2020-12-08 Thread Shay Agroskin
ck for xdp_do_redirect() and xdp_convert_buff_to_frame(). Also replace the variable casting in patch 3 with something more readable. Shay Agroskin (9): net: ena: use constant value for net_device allocation net: ena: add device distinct log prefix to files net: ena: store value

Re: [PATCH V4 net-next 3/9] net: ena: add explicit casting to variables

2020-12-07 Thread Shay Agroskin
. Adding this cast won't affect the end results, and would sooth the checkers. Signed-off-by: Ido Segev Signed-off-by: Igor Chauskin Signed-off-by: Shay Agroskin Signed-off-by: Arthur Kiyanovski --- drivers/net/ethernet/amazon/ena/ena_com.c | 10 +- 1 file changed, 5 insertions(

Re: [PATCH V4 net-next 9/9] net: ena: introduce ndo_xdp_xmit() function for XDP_REDIRECT

2020-12-07 Thread Shay Agroskin
receives an array of xdp frames that it needs to xmit. The TX queues that are used to xmit these frames are the XDP queues used by the XDP_TX flow. Therefore a lock is added to synchronize both flows (XDP_TX and XDP_REDIRECT). Signed-off-by: Shay Agroskin Signed-off-by: Arthur Kiyanovski

Re: [PATCH V4 net-next 7/9] net: ena: introduce XDP redirect implementation

2020-12-07 Thread Shay Agroskin
Jakub Kicinski writes: On Fri, 4 Dec 2020 14:11:13 +0200 akiy...@amazon.com wrote: + case XDP_REDIRECT: + xdp_do_redirect(rx_ring->netdev, xdp, xdp_prog); + xdp_stat = &rx_ring->rx_stats.xdp_redirect; + break; Don't you have to check if xdp_d

Re: [PATCH V4 net-next 6/9] net: ena: use xdp_frame in XDP TX flow

2020-12-07 Thread Shay Agroskin
implementation which uses xdp_frames when 'xmit'ing packets. Signed-off-by: Shay Agroskin Signed-off-by: Arthur Kiyanovski --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 46 ++-- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/drivers/net/ethernet/

[PATCH V3 net 0/3] Fixes for ENA driver

2020-11-23 Thread Shay Agroskin
ion in second patch v2->v3: Removed fourth patch from series (would be sent in future series) Shay Agroskin (3): net: ena: handle bad request id in ena_netdev net: ena: set initial DMA width to avoid intel iommu issue net: ena: fix packet's addresses for rx_offset featur

[PATCH V3 net 1/3] net: ena: handle bad request id in ena_netdev

2020-11-23 Thread Shay Agroskin
id to an earlier stage in the napi routine and makes sure its value isn't used if it's found out-of-bounds. Fixes: 30623e1ed116 ("net: ena: avoid memory access violation by validating req_id properly") Signed-off-by: Ido Segev Signed-off-by: Shay Agroskin --- drive

[PATCH V3 net 3/3] net: ena: fix packet's addresses for rx_offset feature

2020-11-23 Thread Shay Agroskin
essentially providing wrong page offset). Fixes: 68f236df93a9 ("net: ena: add support for the rx offset feature") Signed-off-by: Shay Agroskin --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a

[PATCH V3 net 2/3] net: ena: set initial DMA width to avoid intel iommu issue

2020-11-23 Thread Shay Agroskin
Adapters (ENA)") Signed-off-by: Mike Cui Signed-off-by: Arthur Kiyanovski Signed-off-by: Shay Agroskin --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/dr

Re: [PATCH V2 net 4/4] net: ena: return error code from ena_xdp_xmit_buff

2020-11-21 Thread Shay Agroskin
Jakub Kicinski writes: On Thu, 19 Nov 2020 22:28:51 +0200 Shay Agroskin wrote: The function mistakenly returns NETDEV_TX_OK regardless of the transmission success. This patch fixes this behavior by returning the error code from the function. Fixes: 548c4940b9f1 ("net: ena: Implement X

[PATCH V2 net 4/4] net: ena: return error code from ena_xdp_xmit_buff

2020-11-19 Thread Shay Agroskin
The function mistakenly returns NETDEV_TX_OK regardless of the transmission success. This patch fixes this behavior by returning the error code from the function. Fixes: 548c4940b9f1 ("net: ena: Implement XDP_TX action") Signed-off-by: Shay Agroskin --- drivers/net/ethernet/

[PATCH V2 net 3/4] net: ena: fix packet's addresses for rx_offset feature

2020-11-19 Thread Shay Agroskin
essentially providing wrong page offset). Fixes: 68f236df93a9 ("net: ena: add support for the rx offset feature") Signed-off-by: Shay Agroskin --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a

[PATCH V2 net 2/4] net: ena: set initial DMA width to avoid intel iommu issue

2020-11-19 Thread Shay Agroskin
Adapters (ENA)") Signed-off-by: Mike Cui Signed-off-by: Arthur Kiyanovski Signed-off-by: Shay Agroskin --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/dr

[PATCH V2 net 1/4] net: ena: handle bad request id in ena_netdev

2020-11-19 Thread Shay Agroskin
id to an earlier stage in the napi routine and makes sure its value isn't used if it's found out-of-bounds. Fixes: 30623e1ed116 ("net: ena: avoid memory access violation by validating req_id properly") Signed-off-by: Ido Segev Signed-off-by: Shay Agroskin --- drive

[PATCH V2 net 0/4] Fixes for ENA driver

2020-11-19 Thread Shay Agroskin
ing dma_set_mask_and_coherent() function in second patch Shay Agroskin (4): net: ena: handle bad request id in ena_netdev net: ena: set initial DMA width to avoid intel iommu issue net: ena: fix packet's addresses for rx_offset feature net: ena: return error c

Re: [PATCH V1 net 2/4] net: ena: set initial DMA width to avoid intel iommu issue

2020-11-19 Thread Shay Agroskin
Heiner Kallweit writes: Am 18.11.2020 um 23:35 schrieb Heiner Kallweit: Am 18.11.2020 um 22:59 schrieb Shay Agroskin: The ENA driver uses the readless mechanism, which uses DMA, to find out what the DMA mask is supposed to be. If DMA is used without setting the dma_mask first, it causes

[PATCH V1 net 4/4] net: ena: return error code from ena_xdp_xmit_buff

2020-11-18 Thread Shay Agroskin
The function mistakenly returns NETDEV_TX_OK regardless of the transmission success. This patch fixes this behavior by returning the error code from the function. Fixes: 548c4940b9f1 ("net: ena: Implement XDP_TX action") Signed-off-by: Shay Agroskin --- drivers/net/ethernet/

[PATCH V1 net 3/4] net: ena: fix packet's addresses for rx_offset feature

2020-11-18 Thread Shay Agroskin
essentially providing wrong page offset). Fixes: 68f236df93a9 ("net: ena: add support for the rx offset feature") Signed-off-by: Shay Agroskin --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a

[PATCH V1 net 1/4] net: ena: handle bad request id in ena_netdev

2020-11-18 Thread Shay Agroskin
id to an earlier stage in the napi routine and makes sure its value isn't used if it's found out-of-bounds. Fixes: 30623e1ed116 ("net: ena: avoid memory access violation by validating req_id properly") Signed-off-by: Ido Segev Signed-off-by: Shay Agroskin --- drive

[PATCH V1 net 2/4] net: ena: set initial DMA width to avoid intel iommu issue

2020-11-18 Thread Shay Agroskin
readless is initialized. Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") Signed-off-by: Mike Cui Signed-off-by: Arthur Kiyanovski Signed-off-by: Shay Agroskin --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 13 + 1 file chan

[PATCH V1 net 0/4] Fixes for ENA driver

2020-11-18 Thread Shay Agroskin
Hi all, This series fixes some issues in the ENA driver: - fix wrong data offset on machines that support rx offset - work-around Intel iommu issue - fix out of bound access when request id is wrong - return error code if XDP TX xmit fails Shay Agroskin (4): net: ena: handle bad request id in

Re: [PATCH net-next 4/4] net: mlx5: add xdp tx return bulking support

2020-10-29 Thread Shay Agroskin
Lorenzo Bianconi writes: Convert mlx5 driver to xdp_return_frame_bulk APIs. XDP_REDIRECT (upstream codepath): 8.5Mpps XDP_REDIRECT (upstream codepath + bulking APIs): 10.1Mpps Signed-off-by: Lorenzo Bianconi --- drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c | 5 - 1 file changed, 4

Re: [PATCH v4 bpf-next 09/13] bpf: introduce multibuff support to bpf_prog_test_run_xdp()

2020-10-08 Thread Shay Agroskin
Lorenzo Bianconi writes: Introduce the capability to allocate a xdp multi-buff in bpf_prog_test_run_xdp routine. This is a preliminary patch to introduce the selftests for new xdp multi-buff ebpf helpers Signed-off-by: Lorenzo Bianconi --- net/bpf/test_run.c | 51 ++

[PATCH V2 net-next 6/7] net: ena: Fix all static chekers' warnings

2020-09-21 Thread Shay Agroskin
making our driver free (for now) of Sparse errors/warnings. To make a more complete work, this patch also fixes all static warnings that were found using an internal static checker. Signed-off-by: Ido Segev Signed-off-by: Shay Agroskin --- drivers/net/ethernet/amazon/ena/ena_com.c | 2

[PATCH V2 net-next 4/7] net: ena: Remove redundant print of placement policy

2020-09-21 Thread Shay Agroskin
The placement policy is printed in the process of queue creation in ena_up(). No need to print it in ena_probe(). Signed-off-by: Arthur Kiyanovski Signed-off-by: Shay Agroskin --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions

[PATCH V2 net-next 5/7] net: ena: Change RSS related macros and variables names

2020-09-21 Thread Shay Agroskin
sh-to-CPU table instead of CPU/Queue itself. This patch renames the variable keys_num, which describes the number of words in the RSS hash key, to key_parts which makes its purpose clearer in RSS context. Signed-off-by: Amit Bernstein Signed-off-by: Shay Agroskin --- .../device_drivers/e

[PATCH V2 net-next 7/7] net: ena: update ena documentation

2020-09-21 Thread Shay Agroskin
ded. Also, LLQ can support various entry sizes, so the documentation is updated to reflect that. Interrupt moderation description is also updated to be more accurate. Signed-off-by: Shay Agroskin --- .../device_drivers/ethernet/amazon/ena.rst| 23 ++- 1 file changed, 2 inserti

[PATCH V2 net-next 3/7] net: ena: Capitalize all log strings and improve code readability

2020-09-21 Thread Shay Agroskin
functions to make it easier to understand the purpose of these lines. Signed-off-by: Amit Bernstein Signed-off-by: Shay Agroskin --- .../net/ethernet/amazon/ena/ena_admin_defs.h | 53 +++--- drivers/net/ethernet/amazon/ena/ena_com.c | 171 ++ drivers/net/ethernet/amazon

[PATCH V2 net-next 0/7] Update license and polish ENA driver code

2020-09-21 Thread Shay Agroskin
m previous version: v1->v2: dropped patch that transforms pr_* log prints into dev_* prints Shay Agroskin (7): net: ena: Change license into format to SPDX in all files net: ena: Change log message to netif/dev function net: ena: Capitalize all log strings and improve code readability net

[PATCH V2 net-next 1/7] net: ena: Change license into format to SPDX in all files

2020-09-21 Thread Shay Agroskin
All ena files should now use SPDX format in their license string. This doesn't change the license of the files, but rather states the same license in fewer words. Also update the license years in some of the files. Signed-off-by: Shay Agroskin --- .../net/ethernet/amazon/ena/ena_admin_d

[PATCH V2 net-next 2/7] net: ena: Change log message to netif/dev function

2020-09-21 Thread Shay Agroskin
h for ena_com files). This commit leaves some corner cases which would be changed in a future patch. Signed-off-by: Amit Bernstein Signed-off-by: Shay Agroskin --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 42 +++- 1 file changed, 23 insertions(+), 19 deletions(-) diff --

Re: [PATCH V1 net-next 2/8] net: ena: Add device distinct log prefix to files

2020-09-17 Thread Shay Agroskin
David Miller writes: From: Saeed Mahameed Date: Thu, 17 Sep 2020 12:38:28 -0700 allocated but unregistered netdevices also do not help much as the name of the netdev is not assigned yet. why don't use dev_info(pci_dev) macors for low level functions when netdev is not available or not

Re: [PATCH V1 net-next 2/8] net: ena: Add device distinct log prefix to files

2020-09-17 Thread Shay Agroskin
David Miller writes: From: Shay Agroskin Date: Sun, 13 Sep 2020 11:16:34 +0300 ENA logs are adjusted to display the full ENA representation to distinct each ENA device in case of multiple interfaces. Using dev_err/warn/info function family for logging provides uniform printing with

Re: [PATCH V1 net-next 2/8] net: ena: Add device distinct log prefix to files

2020-09-14 Thread Shay Agroskin
David Miller writes: From: Shay Agroskin Date: Sun, 13 Sep 2020 11:16:34 +0300 ENA logs are adjusted to display the full ENA representation to distinct each ENA device in case of multiple interfaces. Using dev_err/warn/info function family for logging provides uniform printing with

Re: [PATCH V1 net-next 5/8] net: ena: Remove redundant print of placement policy

2020-09-13 Thread Shay Agroskin
Shay Agroskin writes: The placement policy is printed in the process of queue creation in ena_up(). No need to print it in ena_probe(). Signed-off-by: Arthur Kiyanovski Signed-off-by: Shay Agroskin --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 10 ++ 1 file changed, 2

[PATCH V1 net-next 8/8] net: ena: update ena documentation

2020-09-13 Thread Shay Agroskin
ded. Also, LLQ can support various entry sizes, so the documentation is updated to reflect that. Interrupt moderation description is also updated to be more accurate. Signed-off-by: Shay Agroskin --- .../device_drivers/ethernet/amazon/ena.rst| 23 ++- 1 file changed, 2 inserti

[PATCH V1 net-next 7/8] net: ena: Fix all static chekers' warnings

2020-09-13 Thread Shay Agroskin
making our driver free (for now) of Sparse errors/warnings. To make a more complete work, this patch also fixes all static warnings that were found using an internal static checker. Signed-off-by: Ido Segev Signed-off-by: Shay Agroskin --- drivers/net/ethernet/amazon/ena/ena_com.c | 2

[PATCH V1 net-next 6/8] net: ena: Change RSS related macros and variables names

2020-09-13 Thread Shay Agroskin
sh-to-CPU table instead of CPU/Queue itself. This patch renames the variable keys_num, which describes the number of words in the RSS hash key, to key_parts which makes its purpose clearer in RSS context. Signed-off-by: Amit Bernstein Signed-off-by: Shay Agroskin --- .../device_drivers/e

[PATCH V1 net-next 5/8] net: ena: Remove redundant print of placement policy

2020-09-13 Thread Shay Agroskin
The placement policy is printed in the process of queue creation in ena_up(). No need to print it in ena_probe(). Signed-off-by: Arthur Kiyanovski Signed-off-by: Shay Agroskin --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions

[PATCH V1 net-next 4/8] net: ena: Capitalize all log strings and improve code readability

2020-09-13 Thread Shay Agroskin
functions to make it easier to understand the purpose of these lines. Signed-off-by: Amit Bernstein Signed-off-by: Shay Agroskin --- .../net/ethernet/amazon/ena/ena_admin_defs.h | 53 +++--- drivers/net/ethernet/amazon/ena/ena_com.c | 176 ++ drivers/net/ethernet/amazon

[PATCH V1 net-next 3/8] net: ena: Change log message to netif/dev function

2020-09-13 Thread Shay Agroskin
tions are used (similar to the patch for ena_com files). This commit leaves some corner cases which would be changes in a future patch. Signed-off-by: Amit Bernstein Signed-off-by: Shay Agroskin --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 42 +++- 1 file changed, 23 inser

[PATCH V1 net-next 2/8] net: ena: Add device distinct log prefix to files

2020-09-13 Thread Shay Agroskin
to use dev_* logging messages. It also adds some log messages to make driver debugging easier. Signed-off-by: Amit Bernstein Signed-off-by: Shay Agroskin --- drivers/net/ethernet/amazon/ena/ena_com.c | 369 +++--- drivers/net/ethernet/amazon/ena/ena_com.h | 20 + drivers/net

[PATCH V1 net-next 1/8] net: ena: Change license into format to SPDX in all files

2020-09-13 Thread Shay Agroskin
All ena files should now use SPDX format in their license string. This doesn't change the license of the files, but rather states the same license in fewer words. Also update the license years in some of the files. Signed-off-by: Shay Agroskin --- .../net/ethernet/amazon/ena/ena_admin_d

[PATCH V1 net-next 0/8] Update license and polish ENA driver code

2020-09-13 Thread Shay Agroskin
Hi all, This series adds the following: - Change driver's license into SPDX format - Make log messages in the driver have a uniform format - Fix issues raised by static checkers - Improve code readability by adding functions, fix spelling mistakes etc. - Update driver's documenta

Re: [PATCH v2 net-next 3/9] net: mvneta: update mb bit before passing the xdp buffer to eBPF layer

2020-09-06 Thread Shay Agroskin
Lorenzo Bianconi writes: Update multi-buffer bit (mb) in xdp_buff to notify XDP/eBPF layer and XDP remote drivers if this is a "non-linear" XDP buffer. Access skb_shared_info only if xdp_buff mb is set Signed-off-by: Lorenzo Bianconi --- drivers/net/ethernet/marvell/mvneta.c | 37 ++

Re: [PATCH v2 net-next 5/9] net: mvneta: add multi buffer support to XDP_TX

2020-09-06 Thread Shay Agroskin
Lorenzo Bianconi writes: Introduce the capability to map non-linear xdp buffer running mvneta_xdp_submit_frame() for XDP_TX and XDP_REDIRECT Signed-off-by: Lorenzo Bianconi --- drivers/net/ethernet/marvell/mvneta.c | 79 +-- 1 file changed, 49 insertions(+), 30 d

Re: [PATCH net-next 1/6] xdp: introduce mb in xdp_buff/xdp_frame

2020-08-26 Thread Shay Agroskin
Jesper Dangaard Brouer writes: On Sun, 23 Aug 2020 17:08:30 +0300 Shay Agroskin wrote: > diff --git a/include/net/xdp.h b/include/net/xdp.h > index 3814fb631d52..42f439f9fcda 100644 > --- a/include/net/xdp.h > +++ b/include/net/xdp.h > @@ -72,7 +72,8 @@ struct xdp_b

Re: [PATCH net-next 1/6] xdp: introduce mb in xdp_buff/xdp_frame

2020-08-23 Thread Shay Agroskin
Lorenzo Bianconi writes: Introduce multi-buffer bit (mb) in xdp_frame/xdp_buffer to specify if shared_info area has been properly initialized for non-linear xdp buffers Signed-off-by: Lorenzo Bianconi --- include/net/xdp.h | 8 ++-- net/core/xdp.c| 1 + 2 files changed, 7 insertio

[PATCH V3 net 1/3] net: ena: Prevent reset after device destruction

2020-08-19 Thread Shay Agroskin
_device(). This is to avoid a case in which the reset routine is scheduled after free_netdev() in __ena_shutoff(), which would create an access to freed memory in adapter->flags. Fixes: 8c5c7abdeb2d ("net: ena: add power management ops to the ENA driver") Signed-off-by: Shay Agroskin --

[PATCH V3 net 3/3] net: ena: Make missed_tx stat incremental

2020-08-19 Thread Shay Agroskin
ps to make it clearer how these counters are calculated. Fixes: 11095fdb712b ("net: ena: add statistics for missed tx packets") Signed-off-by: Shay Agroskin --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drive

[PATCH V3 net 2/3] net: ena: Change WARN_ON expression in ena_del_napi_in_range()

2020-08-19 Thread Shay Agroskin
Implement XDP_TX action") Signed-off-by: Shay Agroskin --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c index 44aeace196

[PATCH V3 net 0/3] Bug fixes for ENA ethernet driver

2020-08-19 Thread Shay Agroskin
- fix wrong hash in 'Fixes' tag Shay Agroskin (3): net: ena: Prevent reset after device destruction net: ena: Change WARN_ON expression in ena_del_napi_in_range() net: ena: Make missed_tx stat incremental drivers/net/ethernet/amazon/ena/ena_netdev.c | 35 ++-- 1

Re: [PATCH V2 net 1/3] net: ena: Prevent reset after device destruction

2020-08-19 Thread Shay Agroskin
Jakub Kicinski writes: On Wed, 19 Aug 2020 12:04:41 +0300 Shay Agroskin wrote: Fixes: 84a629e ("[New feature] ena_netdev: Add hibernation support") Fixes tag: Fixes: 84a629e ("[New feature] ena_netdev: Add hibernation support") Has these problem(s): - Target

[PATCH V2 net 1/3] net: ena: Prevent reset after device destruction

2020-08-19 Thread Shay Agroskin
_device(). This is to avoid a case in which the reset routine is scheduled after free_netdev() in __ena_shutoff(), which would create an access to freed memory in adapter->flags. Fixes: 84a629e ("[New feature] ena_netdev: Add hibernation support") Signed-off-by: Shay Agroskin --

[PATCH V2 net 2/3] net: ena: Change WARN_ON expression in ena_del_napi_in_range()

2020-08-19 Thread Shay Agroskin
Implement XDP_TX action") Signed-off-by: Shay Agroskin --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c index 44aeace196

[PATCH V2 net 3/3] net: ena: Make missed_tx stat incremental

2020-08-19 Thread Shay Agroskin
ps to make it clearer how these counters are calculated. Fixes: 11095fdb712b ("net: ena: add statistics for missed tx packets") Signed-off-by: Shay Agroskin --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drive

[PATCH V2 net 0/3] Bug fixes for ENA ethernet driver

2020-08-19 Thread Shay Agroskin
This series adds the following: - Fix undesired call to ena_restore after returning from suspend - Fix condition inside a WARN_ON - Fix overriding previous value when updating missed_tx statistic v1->v2: - fix bug when calling reset routine after device resources are freed (Jakub) Shay Agros

Re: [PATCH V1 net 1/3] net: ena: Prevent reset after device destruction

2020-08-16 Thread Shay Agroskin
Jakub Kicinski writes: On Thu, 13 Aug 2020 15:51:46 +0300 Shay Agroskin wrote: Long answer: The ena_destroy_device() function is called with rtnl_lock() held, so it cannot run in parallel with the reset function. Also the destroy function clears the bit ENA_FLAG_TRIGGER_RESET without

Re: [PATCH V1 net 1/3] net: ena: Prevent reset after device destruction

2020-08-13 Thread Shay Agroskin
Jakub Kicinski writes: On Wed, 12 Aug 2020 13:10:57 +0300 Shay Agroskin wrote: This patch also removes the destruction of the timer and reset services from ena_remove() since the timer is destroyed by the destruction routine and the reset work is handled by this patch. You'd still

[PATCH V1 net 3/3] net: ena: Make missed_tx stat incremental

2020-08-12 Thread Shay Agroskin
ps to make it clearer how these counters are calculated. Fixes: 11095fdb712b ("net: ena: add statistics for missed tx packets") Signed-off-by: Shay Agroskin --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drive

[PATCH V1 net 2/3] net: ena: Change WARN_ON expression in ena_del_napi_in_range()

2020-08-12 Thread Shay Agroskin
x/latest/source/arch/parisc/include/asm/bug.h#L79 Fixes: 8c5c7abdeb2d ("net: ena: add power management ops to the ENA driver") Signed-off-by: Shay Agroskin --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --

[PATCH V1 net 0/3] Bug fixes for ENA ethernet driver

2020-08-12 Thread Shay Agroskin
This series adds the following: - Fix possible NULL dereference after returning from suspend - Fix condition inside a WARN_ON - Fix overriding previous value when updating missed_tx statistic Shay Agroskin (3): net: ena: Prevent reset after device destruction net: ena: Change WARN_ON

[PATCH V1 net 1/3] net: ena: Prevent reset after device destruction

2020-08-12 Thread Shay Agroskin
om ena_remove() since the timer is destroyed by the destruction routine and the reset work is handled by this patch. Fixes: 8c5c7abdeb2d ("net: ena: add power management ops to the ENA driver") Signed-off-by: Shay Agroskin --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 17 +

Re: [PATCH net-next v3] net: ena: Fix using plain integer as NULL pointer in ena_init_napi_in_range

2020-07-20 Thread Shay Agroskin
Wang Hai writes: Fix sparse build warning: drivers/net/ethernet/amazon/ena/ena_netdev.c:2193:34: warning: Using plain integer as NULL pointer Reported-by: Hulk Robot Signed-off-by: Wang Hai Suggested-by: Joe Perches Acked-by: Shay Agroskin --- v1->v2: Improve code readability ba

Re: [PATCH net-next v2] net: ena: Fix using plain integer as NULL pointer in ena_init_napi_in_range

2020-07-19 Thread Shay Agroskin
Joe Perches writes: On Mon, 2020-07-20 at 10:53 +0800, Wang Hai wrote: Fix sparse build warning: drivers/net/ethernet/amazon/ena/ena_netdev.c:2193:34: warning: Using plain integer as NULL pointer [] diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/e

  1   2   >