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

2020-12-04 Thread akiyano
From: Arthur Kiyanovski This patch implements the ndo_xdp_xmit() net_device function which is called when a packet is redirected to this driver using an XDP_REDIRECT directive. The function receives an array of xdp frames that it needs to xmit. The TX queues that are used to xmit these frames ar

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

2020-12-04 Thread akiyano
From: Arthur Kiyanovski This patch adds a partial support for the XDP_REDIRECT directive which instructs the driver to pass the packet to an interface specified by the program. The directive is passed to the driver by calling bpf_redirect() or bpf_redirect_map() functions from the eBPF program.

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

2020-12-04 Thread akiyano
From: Arthur Kiyanovski 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 Signed-off-by: Arth

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

2020-12-04 Thread akiyano
From: Arthur Kiyanovski XDP subsystem has a function to free XDP frames and their associated pages. Using this function would help the driver's XDP implementation to adjust to new changes in the XDP subsystem in the kernel (e.g. introduction of XDP MB). Also, remove 'xdp_rx_page' field from ena_

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

2020-12-04 Thread akiyano
From: Arthur Kiyanovski ENA logs are adjusted to display the full ENA representation to distinct each ENA device in case of multiple interfaces. Using netdev_err/warn and dev_info functions for logging provides uniform printing with clear distinction of the device and interface. This patch chang

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

2020-12-04 Thread akiyano
From: Arthur Kiyanovski This patch adds explicit casting to some implicit conversions in the ena driver. The implicit conversions fail some of our static checkers that search for accidental conversions in our driver. Adding this cast won't affect the end results, and would sooth the checkers. Si

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

2020-12-04 Thread akiyano
From: Arthur Kiyanovski This commit fixes two nits, but it does not generate any change to binary because of the optimization of gcc. - use `count` instead of `channels->combined_count` - change return type from `int` to `bool` Also add spaces and change macro order in OR assignment to make

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

2020-12-04 Thread akiyano
From: Arthur Kiyanovski Introduce ena_increase_stat() function to increase statistics by a certain number. The function includes the - lock aquire (on 32bit machines) - stat increase - lock release (on 32bit machines) line sequence that is ubiquitous across the driver. The function

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

2020-12-04 Thread akiyano
From: Arthur Kiyanovski The patch changes the maximum number of RX/TX queues it advertises to the kernel (via alloc_etherdev_mq()) from a value received from the device to a constant value which is the minimum between 128 and the number of CPUs in the system. By allocating the net_device struct

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

2020-12-04 Thread akiyano
From: Arthur Kiyanovski V4 Changes: --- Added an explanation to the decision of using netdev_* prints in functions that are also called before netdev is registered. V3 Changes: --- 1. Removed RFC, the commits that this patchset relies on where merged from net already so no more

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

2020-12-02 Thread akiyano
From: Arthur Kiyanovski This patch implements the ndo_xdp_xmit() net_device function which is called when a packet is redirected to this driver using an XDP_REDIRECT directive. The function receives an array of xdp frames that it needs to xmit. The TX queues that are used to xmit these frames ar

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

2020-12-02 Thread akiyano
From: Arthur Kiyanovski The patch changes the maximum number of RX/TX queues it advertises to the kernel (via alloc_etherdev_mq()) from a value received from the device to a constant value which is the minimum between 128 and the number of CPUs in the system. By allocating the net_device struct

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

2020-12-02 Thread akiyano
From: Arthur Kiyanovski This commit fixes two nits, but it does not generate any change to binary because of the optimization of gcc. - use `count` instead of `channels->combined_count` - change return type from `int` to `bool` Also add spaces and change macro order in OR assignment to make

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

2020-12-02 Thread akiyano
From: Arthur Kiyanovski V3 Changes: --- 1. Removed RFC, the commits that this patchset relies on where merged from net already so no more conflicts are expected. 2. Fixed checkpatch errors. V2 Changes: --- 1. Changed this to RFC, since we are waiting for the recently merge

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

2020-12-02 Thread akiyano
From: Arthur Kiyanovski ENA logs are adjusted to display the full ENA representation to distinct each ENA device in case of multiple interfaces. Using netdev_err/warn and dev_info functions for logging provides uniform printing with clear distinction of the device and interface. This patch chang

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

2020-12-02 Thread akiyano
From: Arthur Kiyanovski This patch adds a partial support for the XDP_REDIRECT directive which instructs the driver to pass the packet to an interface specified by the program. The directive is passed to the driver by calling bpf_redirect() or bpf_redirect_map() functions from the eBPF program.

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

2020-12-02 Thread akiyano
From: Arthur Kiyanovski This patch adds explicit casting to some implicit conversions in the ena driver. The implicit conversions fail some of our static checkers that search for accidental conversions in our driver. Adding this cast won't affect the end results, and would sooth the checkers. Si

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

2020-12-02 Thread akiyano
From: Arthur Kiyanovski 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 Signed-off-by: Arth

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

2020-12-02 Thread akiyano
From: Arthur Kiyanovski XDP subsystem has a function to free XDP frames and their associated pages. Using this function would help the driver's XDP implementation to adjust to new changes in the XDP subsystem in the kernel (e.g. introduction of XDP MB). Also, remove 'xdp_rx_page' field from ena_

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

2020-12-02 Thread akiyano
From: Arthur Kiyanovski Introduce ena_increase_stat() function to increase statistics by a certain number. The function includes the - lock aquire (on 32bit machines) - stat increase - lock release (on 32bit machines) line sequence that is ubiquitous across the driver. The function

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

2020-11-26 Thread akiyano
From: Arthur Kiyanovski This commit fixes two nits, but it does not generate any change to binary because of the optimization of gcc. - use `count` instead of `channels->combined_count` - change return type from `int` to `bool` Also add spaces and change macro order in OR assignment to make

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

2020-11-26 Thread akiyano
From: Arthur Kiyanovski This patch implements the ndo_xdp_xmit() net_device function which is called when a packet is redirected to this driver using an XDP_REDIRECT directive. The function receives an array of xdp frames that it needs to xmit. The TX queues that are used to xmit these frames ar

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

2020-11-26 Thread akiyano
From: Arthur Kiyanovski This patch adds a partial support for the XDP_REDIRECT directive which instructs the driver to pass the packet to an interface specified by the program. The directive is passed to the driver by calling bpf_redirect() or bpf_redirect_map() functions from the eBPF program.

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

2020-11-26 Thread akiyano
From: Arthur Kiyanovski 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 Signed-off-by: Arth

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

2020-11-26 Thread akiyano
From: Arthur Kiyanovski Introduce ena_increase_stat() function to increase statistics by a certain number. The function includes the - lock aquire (on 32bit machines) - stat increase - lock release (on 32bit machines) line sequence that is ubiquitous across the driver. The function

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

2020-11-26 Thread akiyano
From: Arthur Kiyanovski XDP subsystem has a function to free XDP frames and their associated pages. Using this function would help the driver's XDP implementation to adjust to new changes in the XDP subsystem in the kernel (e.g. introduction of XDP MB). Also, remove 'xdp_rx_page' field from ena_

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

2020-11-26 Thread akiyano
From: Arthur Kiyanovski This patch adds explicit casting to some implicit conversions in the ena driver. The implicit conversions fail some of our static checkers that search for accidental conversions in our driver. Adding this cast won't affect the end results, and would sooth the checkers. Si

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

2020-11-26 Thread akiyano
From: Arthur Kiyanovski ENA logs are adjusted to display the full ENA representation to distinct each ENA device in case of multiple interfaces. Using netdev_err/warn and dev_info functions for logging provides uniform printing with clear distinction of the device and interface. This patch chang

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

2020-11-26 Thread akiyano
From: Arthur Kiyanovski The patch changes the maximum number of RX/TX queues it advertises to the kernel (via alloc_etherdev_mq()) from a value received from the device to a constant value which is the minimum between 128 and the number of CPUs in the system. By allocating the net_device struct

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

2020-11-26 Thread akiyano
From: Arthur Kiyanovski V2 Changes: --- 1. Changed this to RFC, since we are waiting for the recently merged net patches to be merged so there will be no merge conflicts. But still would like to get review comments beforehand. 2. Removed the word "atomic" from the name of ena_increas

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

2020-11-25 Thread akiyano
From: Arthur Kiyanovski This patch implements the ndo_xdp_xmit() net_device function which is called when a packet is redirected to this driver using an XDP_REDIRECT directive. The function receives an array of xdp frames that it needs to xmit. The TX queues that are used to xmit these frames ar

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

2020-11-25 Thread akiyano
From: Arthur Kiyanovski XDP subsystem has a function to free XDP frames and their associated pages. Using this function would help the driver's XDP implementation to adjust to new changes in the XDP subsystem in the kernel (e.g. introduction of XDP MB). Also, remove 'xdp_rx_page' field from ena_

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

2020-11-25 Thread akiyano
From: Arthur Kiyanovski Introduce ena_increase_stat_atomic() function to increase statistics by certain number. The function includes the - lock aquire - stat increase - lock release line sequence that is ubiquitous across the driver. The function increases a single stat at a time.

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

2020-11-25 Thread akiyano
From: Arthur Kiyanovski ENA logs are adjusted to display the full ENA representation to distinct each ENA device in case of multiple interfaces. Using netdev_err/warn and dev_info functions for logging provides uniform printing with clear distinction of the device and interface. This patch chang

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

2020-11-25 Thread akiyano
From: Arthur Kiyanovski 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 Signed-off-by: Arth

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

2020-11-25 Thread akiyano
From: Arthur Kiyanovski This patch adds a partial support for the XDP_REDIRECT directive which instructs the driver to pass the packet to an interface specified by the program. The directive is passed to the driver by calling bpf_redirect() or bpf_redirect_map() functions from the eBPF program.

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

2020-11-25 Thread akiyano
From: Arthur Kiyanovski This commit fixes two nits, but it does not generate any change to binary because of the optimization of gcc. - use `count` instead of `channels->combined_count` - change return type from `int` to `bool` Also add spaces and change macro order in OR assignment to make

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

2020-11-25 Thread akiyano
From: Arthur Kiyanovski This patch adds explicit casting to some implicit conversions in the ena driver. The implicit conversions fail some of our static checkers that search for accidental conversions in our driver. Adding this cast won't affect the end results, and would sooth the checkers. Si

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

2020-11-25 Thread akiyano
From: Arthur Kiyanovski Hi all, ENA is adding XDP Redirect support for its driver and some other small tweaks. This series adds the following: - Make log messages in the driver have a uniform format using netdev_* function - Improve code readability and add explicit masking - Add support for XD

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

2020-11-25 Thread akiyano
From: Arthur Kiyanovski The patch changes the maximum number of RX/TX queues it advertises to the kernel (via alloc_etherdev_mq()) from a value received from the device to a constant value which is the minimum between 128 and the number of CPUs in the system. By allocating the net_device struct

[PATCH V3 net-next 5/8] net: ena: add support for traffic mirroring

2020-07-21 Thread akiyano
From: Arthur Kiyanovski Add support for traffic mirroring, where the hardware reads the buffer from the instance memory directly. Traffic Mirroring needs access to the rx buffers in the instance. To have this access, this patch: 1. Changes the code to map and unmap the rx buffers bidirectionally

[PATCH V3 net-next 2/8] net: ena: add reserved PCI device ID

2020-07-21 Thread akiyano
From: Arthur Kiyanovski Add a reserved PCI device ID to the driver's table Used for internal testing purposes. Signed-off-by: Arthur Kiyanovski --- drivers/net/ethernet/amazon/ena/ena_pci_id_tbl.h | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/ethernet/amazon/ena/ena_pci_

[PATCH V3 net-next 6/8] net: ena: enable support of rss hash key and function changes

2020-07-21 Thread akiyano
From: Arthur Kiyanovski Add the rss_configurable_function_key bit to driver_supported_feature. This bit tells the device that the driver in question supports the retrieving and updating of RSS function and hash key, and therefore the device should allow RSS function and key manipulation. This c

[PATCH V3 net-next 8/8] net: ena: support new LLQ acceleration mode

2020-07-21 Thread akiyano
From: Arthur Kiyanovski New devices add a new hardware acceleration engine, which adds some restrictions to the driver. Metadata descriptor must be present for each packet and the maximum burst size between two doorbells is now limited to a number advertised by the device. This patch adds: 1. A

[PATCH V3 net-next 3/8] net: ena: cosmetic: satisfy gcc warning

2020-07-21 Thread akiyano
From: Arthur Kiyanovski gcc 4.8 reports a warning when initializing with = {0}. Dropping the "0" from the braces fixes the issue. This fix is not ANSI compatible but is allowed by gcc. Signed-off-by: Sameeh Jubran Signed-off-by: Arthur Kiyanovski --- drivers/net/ethernet/amazon/ena/ena_netdev

[PATCH V3 net-next 4/8] net: ena: cosmetic: change ena_com_stats_admin stats to u64

2020-07-21 Thread akiyano
From: Arthur Kiyanovski The size of the admin statistics in ena_com_stats_admin is changed from 32bit to 64bit so to align with the sizes of the other statistics in the driver (i.e. rx_stats, tx_stats and ena_stats_dev). This is done as part of an effort to create a unified API to read statistic

[PATCH V3 net-next 7/8] net: ena: move llq configuration from ena_probe to ena_device_init()

2020-07-21 Thread akiyano
From: Arthur Kiyanovski When the ENA device resets to recover from some error state, all LLQ configuration values are reset to their defaults, because LLQ is initialized only once during ena_probe(). Changes in this commit: 1. Move the LLQ configuration process into ena_init_device() which is ca

[PATCH V3 net-next 0/8] ENA driver new features

2020-07-21 Thread akiyano
From: Arthur Kiyanovski V4 changes: --- Add smp_rmb() to "net: ena: avoid unnecessary rearming of interrupt vector when busy-polling" to adhere to the linux kernel memory model, and update the commit message accordingly. V3 changes: --- 1. Add "net: ena: enable support of rss has

[PATCH V3 net-next 1/8] net: ena: avoid unnecessary rearming of interrupt vector when busy-polling

2020-07-21 Thread akiyano
From: Arthur Kiyanovski For an overview of the race created by this patch goto synchronization label. In napi busy-poll mode, the kernel invokes the napi handler of the device repeatedly to poll the NIC's receive queues. This process repeats until a timeout, specific for each connection, is up.

[PATCH V3 net-next 6/8] net: ena: enable support of rss hash key and function changes

2020-07-16 Thread akiyano
From: Arthur Kiyanovski Add the rss_configurable_function_key bit to driver_supported_feature. This bit tells the device that the driver in question supports the retrieving and updating of RSS function and hash key, and therefore the device should allow RSS function and key manipulation. This c

[PATCH V3 net-next 7/8] net: ena: move llq configuration from ena_probe to ena_device_init()

2020-07-16 Thread akiyano
From: Arthur Kiyanovski When the ENA device resets to recover from some error state, all LLQ configuration values are reset to their defaults, because LLQ is initialized only once during ena_probe(). Changes in this commit: 1. Move the LLQ configuration process into ena_init_device() which is ca

[PATCH V3 net-next 8/8] net: ena: support new LLQ acceleration mode

2020-07-16 Thread akiyano
From: Arthur Kiyanovski New devices add a new hardware acceleration engine, which adds some restrictions to the driver. Metadata descriptor must be present for each packet and the maximum burst size between two doorbells is now limited to a number advertised by the device. This patch adds: 1. A

[PATCH V3 net-next 5/8] net: ena: add support for traffic mirroring

2020-07-16 Thread akiyano
From: Arthur Kiyanovski Add support for traffic mirroring, where the hardware reads the buffer from the instance memory directly. Traffic Mirroring needs access to the rx buffers in the instance. To have this access, this patch: 1. Changes the code to map and unmap the rx buffers bidirectionally

[PATCH V3 net-next 1/8] net: ena: avoid unnecessary rearming of interrupt vector when busy-polling

2020-07-16 Thread akiyano
From: Arthur Kiyanovski For an overview of the race created by this patch goto synchronization label. In napi busy-poll mode, the kernel invokes the napi handler of the device repeatedly to poll the NIC's receive queues. This process repeats until a timeout, specific for each connection, is up.

[PATCH V3 net-next 0/8] ENA driver new features

2020-07-16 Thread akiyano
From: EC2 Default User V3 changes: --- 1. Add "net: ena: enable support of rss hash key and function changes" patch again, with more explanations why it should be in net-next in commit message. 2. Add synchronization considerations to "net: ena: avoid unnecessary rearming of int

[PATCH V3 net-next 4/8] net: ena: cosmetic: change ena_com_stats_admin stats to u64

2020-07-16 Thread akiyano
From: Arthur Kiyanovski The size of the admin statistics in ena_com_stats_admin is changed from 32bit to 64bit so to align with the sizes of the other statistics in the driver (i.e. rx_stats, tx_stats and ena_stats_dev). This is done as part of an effort to create a unified API to read statistic

[PATCH V3 net-next 2/8] net: ena: add reserved PCI device ID

2020-07-16 Thread akiyano
From: Arthur Kiyanovski Add a reserved PCI device ID to the driver's table Used for internal testing purposes. Signed-off-by: Arthur Kiyanovski --- drivers/net/ethernet/amazon/ena/ena_pci_id_tbl.h | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/ethernet/amazon/ena/ena_pci_

[PATCH V3 net-next 3/8] net: ena: cosmetic: satisfy gcc warning

2020-07-16 Thread akiyano
From: Arthur Kiyanovski gcc 4.8 reports a warning when initializing with = {0}. Dropping the "0" from the braces fixes the issue. This fix is not ANSI compatible but is allowed by gcc. Signed-off-by: Sameeh Jubran Signed-off-by: Arthur Kiyanovski --- drivers/net/ethernet/amazon/ena/ena_netdev

[PATCH V2 net-next 7/7] net: ena: support new LLQ acceleration mode

2020-07-12 Thread akiyano
From: Arthur Kiyanovski New devices add a new hardware acceleration engine, which adds some restrictions to the driver. Metadata descriptor must be present for each packet and the maximum burst size between two doorbells is now limited to a number advertised by the device. This patch adds: 1. A

[PATCH V2 net-next 6/7] net: ena: move llq configuration from ena_probe to ena_device_init()

2020-07-12 Thread akiyano
From: Arthur Kiyanovski When the ENA device resets to recover from some error state, all LLQ configuration values are reset to their defaults, because LLQ is initialized only once during ena_probe(). Changes in this commit: 1. Move the LLQ configuration process into ena_init_device() which is ca

[PATCH V2 net-next 0/7] ENA driver new features

2020-07-12 Thread akiyano
From: Arthur Kiyanovski V2 changes: --- 1. Update commit messages of 2 patches to be more verbose. 2. Remove "net: ena: enable support of rss hash key and function changes" patch. Will be resubmitted net. V1 cover letter: This patchset contains performance improveme

[PATCH V2 net-next 3/7] net: ena: cosmetic: satisfy gcc warning

2020-07-12 Thread akiyano
From: Arthur Kiyanovski gcc 4.8 reports a warning when initializing with = {0}. Dropping the "0" from the braces fixes the issue. This fix is not ANSI compatible but is allowed by gcc. Signed-off-by: Sameeh Jubran Signed-off-by: Arthur Kiyanovski --- drivers/net/ethernet/amazon/ena/ena_netdev

[PATCH V2 net-next 4/7] net: ena: cosmetic: change ena_com_stats_admin stats to u64

2020-07-12 Thread akiyano
From: Arthur Kiyanovski The size of the admin statistics in ena_com_stats_admin is changed from 32bit to 64bit so to align with the sizes of the other statistics in the driver (i.e. rx_stats, tx_stats and ena_stats_dev). This is done as part of an effort to create a unified API to read statistic

[PATCH V2 net-next 5/7] net: ena: add support for traffic mirroring

2020-07-12 Thread akiyano
From: Arthur Kiyanovski Add support for traffic mirroring, where the hardware reads the buffer from the instance memory directly. Traffic Mirroring needs access to the rx buffers in the instance. To have this access, this patch: 1. Changes the code to map and unmap the rx buffers bidirectionally

[PATCH V2 net-next 2/7] net: ena: add reserved PCI device ID

2020-07-12 Thread akiyano
From: Arthur Kiyanovski Add a reserved PCI device ID to the driver's table. Used for internal testing purposes. Signed-off-by: Arthur Kiyanovski --- drivers/net/ethernet/amazon/ena/ena_pci_id_tbl.h | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/ethernet/amazon/ena/ena_pci

[PATCH V2 net-next 1/7] net: ena: avoid unnecessary rearming of interrupt vector when busy-polling

2020-07-12 Thread akiyano
From: Arthur Kiyanovski In napi busy-poll mode, the kernel invokes the napi handler of the device repeatedly to poll the NIC's receive queues. This process repeats until a timeout, specific for each connection, is up. By polling packets in busy-poll mode the user may gain lower latency and higher

[PATCH V1 net-next 2/8] net: ena: add reserved PCI device ID

2020-07-09 Thread akiyano
From: Arthur Kiyanovski Add a reserved PCI device ID to the driver's table Signed-off-by: Arthur Kiyanovski --- drivers/net/ethernet/amazon/ena/ena_pci_id_tbl.h | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/ethernet/amazon/ena/ena_pci_id_tbl.h b/drivers/net/ethernet/ama

[PATCH V1 net-next 6/8] net: ena: enable support of rss hash key and function changes

2020-07-09 Thread akiyano
From: Arthur Kiyanovski Add the rss_configurable_function_key bit to driver_supported_feature. This bit tells the device that the driver in question supports the retrieving and updating of RSS function and hash key, and therefore the device should allow RSS function and key manipulation. Signed

[PATCH V1 net-next 8/8] net: ena: support new LLQ acceleration mode

2020-07-09 Thread akiyano
From: Arthur Kiyanovski New devices add a new hardware acceleration engine, which adds some restrictions to the driver. Metadata descriptor must be present for each packet and the maximum burst size between two doorbells is now limited to a number advertised by the device. This patch adds: 1. A

[PATCH V1 net-next 7/8] net: ena: move llq configuration from ena_probe to ena_device_init()

2020-07-09 Thread akiyano
From: Arthur Kiyanovski When the ENA device resets to recover from some error state, all LLQ configuration values are reset to their defaults, because LLQ is initialized only once during ena_probe(). Changes in this commit: 1. Move the LLQ configuration process into ena_init_device() which is ca

[PATCH V1 net-next 4/8] net: ena: cosmetic: change ena_com_stats_admin stats to u64

2020-07-09 Thread akiyano
From: Arthur Kiyanovski The size of the admin statistics in ena_com_stats_admin is changed from 32bit to 64bit so to align with the sizes of the other statistics in the driver (i.e. rx_stats, tx_stats and ena_stats_dev). This is done as part of an effort to create a unified API to read statistic

[PATCH V1 net-next 5/8] net: ena: add support for traffic mirroring

2020-07-09 Thread akiyano
From: Arthur Kiyanovski Add support for traffic mirroring, where the hardware reads the buffer from the instance memory directly. Traffic Mirroring needs access to the rx buffers in the instance. To have this access, this patch: 1. Changes the code to map and unmap the rx buffers bidirectionally

[PATCH V1 net-next 3/8] net: ena: cosmetic: satisfy gcc warning

2020-07-09 Thread akiyano
From: Arthur Kiyanovski gcc 4.8 reports a warning when initializing with = {0}. Dropping the "0" from the braces fixes the issue. This fix is not ANSI compatible but is allowed by gcc. Signed-off-by: Sameeh Jubran Signed-off-by: Arthur Kiyanovski --- drivers/net/ethernet/amazon/ena/ena_netdev

[PATCH V1 net-next 1/8] net: ena: avoid unnecessary rearming of interrupt vector when busy-polling

2020-07-09 Thread akiyano
From: Arthur Kiyanovski In napi busy-poll mode, the kernel invokes the napi handler of the device repeatedly to poll the NIC's receive queues. This process repeats until a timeout, specific for each connection, is up. By polling packets in busy-poll mode the user may gain lower latency and higher

[PATCH V1 net-next 0/8] ENA driver new features

2020-07-09 Thread akiyano
From: Arthur Kiyanovski This patchset contains performance improvements, support for new devices and functionality: 1. Support for upcoming ENA devices 2. Avoid unnecessary IRQ unmasking in busy poll to reduce interrupt rate 3. Enabling device support for RSS function and key manipulation 4. Sup

[PATCH V2 net-next 14/14] net: ena: reduce driver load time

2020-05-22 Thread akiyano
From: Arthur Kiyanovski This commit reduces the driver load time by using usec resolution instead of msec when polling for hardware state change. Also add back-off mechanism to handle cases where minimal sleep time is not enough. Signed-off-by: Josh Triplett Signed-off-by: Sameeh Jubran Signe

[PATCH V2 net-next 12/14] net: ena: cosmetic: fix spacing issues

2020-05-22 Thread akiyano
From: Arthur Kiyanovski 1. Add leading and trailing spaces to several comments for better readability 2. Make tabs and spaces uniform in enum defines in ena_admin_defs.h Signed-off-by: Arthur Kiyanovski --- drivers/net/ethernet/amazon/ena/ena_admin_defs.h | 6 +++--- drivers/net/ethernet/a

[PATCH V2 net-next 13/14] net: ena: cosmetic: minor code changes

2020-05-22 Thread akiyano
From: Arthur Kiyanovski 1. Use BIT macro instead of shift operator for code clarity 2. Replace multiple flag assignments to a single assignment of multiple flags in ena_com_add_single_rx_desc() 3. Move ENA_HASH_KEY_SIZE from ena_netdev.h to ena_com.h Signed-off-by: Arthur Kiyanovski --- dri

[PATCH V2 net-next 10/14] net: ena: cosmetic: remove unnecessary code

2020-05-22 Thread akiyano
From: Arthur Kiyanovski 1. Remove unused definition of DRV_MODULE_VERSION 2. Remove {} from single line-of-code ifs 3. Remove unnecessary comments from ena_get/set_coalesce() 4. Remove unnecessary extra spaces and newlines Signed-off-by: Arthur Kiyanovski --- drivers/net/ethernet/amazon/ena/en

[PATCH V2 net-next 01/14] net: ena: add support for the rx offset feature

2020-05-22 Thread akiyano
From: Arthur Kiyanovski Newer ENA devices can write data to rx buffers with an offset from the beginning of the buffer. This commit adds support for this feature in the driver. Signed-off-by: Sameeh Jubran Signed-off-by: Arthur Kiyanovski --- .../net/ethernet/amazon/ena/ena_admin_defs.h |

[PATCH V2 net-next 07/14] net: ena: cosmetic: set queue sizes to u32 for consistency

2020-05-22 Thread akiyano
From: Arthur Kiyanovski Make all types of variables that convey the number and sizeof queues to be u32, for consistency with the API between the driver and device via ena_admin_defs.h:ena_admin_get_feat_resp.max_queue_ext fields. Current code sometimes uses int and there are multiple assignments

[PATCH V2 net-next 08/14] net: ena: cosmetic: fix spelling and grammar mistakes in comments

2020-05-22 Thread akiyano
From: Arthur Kiyanovski fix spelling and grammar mistakes in comments in ena_com.h, ena_com.c and ena_netdev.c Signed-off-by: Arthur Kiyanovski --- drivers/net/ethernet/amazon/ena/ena_com.c| 2 +- drivers/net/ethernet/amazon/ena/ena_com.h| 30 ++-- drivers/net/ethernet

[PATCH V2 net-next 04/14] net: ena: fix ena_com_comp_status_to_errno() return value

2020-05-22 Thread akiyano
From: Arthur Kiyanovski Default return value should be -EINVAL since the input in this case was unexpected. Also remove the now redundant check in the beginning of the function. Signed-off-by: Sameeh Jubran Signed-off-by: Arthur Kiyanovski --- drivers/net/ethernet/amazon/ena/ena_com.c | 5 +--

[PATCH V2 net-next 03/14] net: ena: use explicit variable size for clarity

2020-05-22 Thread akiyano
From: Arthur Kiyanovski Use u64 instead of unsigned long long for clarity Signed-off-by: Shai Brandes Signed-off-by: Arthur Kiyanovski --- drivers/net/ethernet/amazon/ena/ena_com.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_c

[PATCH V2 net-next 09/14] net: ena: cosmetic: fix line break issues

2020-05-22 Thread akiyano
From: Arthur Kiyanovski 1. Join unnecessarily broken short lines in ena_com.c ena_netdev.c 2. Fix Indentations of broken lines Signed-off-by: Arthur Kiyanovski --- drivers/net/ethernet/amazon/ena/ena_com.c| 8 +++- drivers/net/ethernet/amazon/ena/ena_netdev.c | 13 ++--- 2 fil

[PATCH V2 net-next 11/14] net: ena: cosmetic: code reorderings

2020-05-22 Thread akiyano
From: Arthur Kiyanovski 1. Reorder sanity checks in get_comp_ctxt() to make more sense 2. Reorder variables in ena_com_fill_hash_function() and ena_calc_io_queue_size() in reverse christmas tree. 3. Move around member initializations. Signed-off-by: Arthur Kiyanovski --- drivers/net/etherne

[PATCH V2 net-next 05/14] net: ena: simplify ena_com_update_intr_delay_resolution()

2020-05-22 Thread akiyano
From: Arthur Kiyanovski Initialize prev_intr_delay_resolution with ena_dev->intr_delay_resolution unconditionally, since it is initialized with ENA_DEFAULT_INTR_DELAY_RESOLUTION in ena_probe(). This approach makes much more sense than handling errors of not initializing it. Also added unlikely t

[PATCH V2 net-next 06/14] net: ena: cosmetic: rename ena_update_tx/rx_rings_intr_moderation()

2020-05-22 Thread akiyano
From: Arthur Kiyanovski Rename ena_update_tx/rx_rings_intr_moderation() to ena_update_tx/rx_rings_nonadaptive_intr_moderation() to distinguish between adaptive and non adaptive interrupt moderaion. Signed-off-by: Arthur Kiyanovski --- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 8

[PATCH V2 net-next 02/14] net: ena: rename ena_com_free_desc to make API more uniform

2020-05-22 Thread akiyano
From: Arthur Kiyanovski Rename ena_com_free_desc to ena_com_free_q_entries to match the LLQ mode. In non-LLQ mode, an entry in an IO ring corresponds to a a descriptor. In LLQ mode an entry may correspond to several descriptors (per LLQ definition). Signed-off-by: Igor Chauskin Signed-off-by:

[PATCH V2 net-next 00/14] ENA features and cosmetic changes

2020-05-22 Thread akiyano
From: Arthur Kiyanovski Diff from V1 of this patchset: Removed error prints patch This patchset includes: 1. new rx offset feature 2. reduction of the driver load time 3. multiple cosmetic changes to the code Arthur Kiyanovski (14): net: ena: add support for the rx offset feature net: ena:

[PATCH V1 net-next 12/15] net: ena: cosmetic: code reorderings

2020-05-21 Thread akiyano
From: Arthur Kiyanovski 1. Reorder sanity checks in get_comp_ctxt() to make more sense 2. Reorder variables in ena_com_fill_hash_function() and ena_calc_io_queue_size() in reverse christmas tree. 3. Move around member initializations. Signed-off-by: Arthur Kiyanovski --- drivers/net/etherne

[PATCH V1 net-next 15/15] net: ena: reduce driver load time

2020-05-21 Thread akiyano
From: Arthur Kiyanovski This commit reduces the driver load time by using usec resolution instead of msec when polling for hardware state change. Also add back-off mechanism to handle cases where minimal sleep time is not enough. Signed-off-by: Josh Triplett Signed-off-by: Sameeh Jubran Signe

[PATCH V1 net-next 14/15] net: ena: cosmetic: minor code changes

2020-05-21 Thread akiyano
From: Arthur Kiyanovski 1. Use BIT macro instead of shift operator for code clarity 2. Replace multiple flag assignments to a single assignment of multiple flags in ena_com_add_single_rx_desc() 3. Move ENA_HASH_KEY_SIZE from ena_netdev.h to ena_com.h Signed-off-by: Arthur Kiyanovski --- dri

[PATCH V1 net-next 04/15] net: ena: fix ena_com_comp_status_to_errno() return value

2020-05-21 Thread akiyano
From: Arthur Kiyanovski Default return value should be -EINVAL since the input in this case was unexpected. Also remove the now redundant check in the beginning of the function. Signed-off-by: Sameeh Jubran Signed-off-by: Arthur Kiyanovski --- drivers/net/ethernet/amazon/ena/ena_com.c | 5 +--

[PATCH V1 net-next 08/15] net: ena: cosmetic: set queue sizes to u32 for consistency

2020-05-21 Thread akiyano
From: Arthur Kiyanovski Make all types of variables that convey the number and sizeof queues to be u32, for consistency with the API between the driver and device via ena_admin_defs.h:ena_admin_get_feat_resp.max_queue_ext fields. Current code sometimes uses int and there are multiple assignments

[PATCH V1 net-next 09/15] net: ena: cosmetic: fix spelling and grammar mistakes in comments

2020-05-21 Thread akiyano
From: Arthur Kiyanovski fix spelling and grammar mistakes in comments in ena_com.h, ena_com.c and ena_netdev.c Signed-off-by: Arthur Kiyanovski --- drivers/net/ethernet/amazon/ena/ena_com.c| 2 +- drivers/net/ethernet/amazon/ena/ena_com.h| 30 ++-- drivers/net/ethernet

[PATCH V1 net-next 07/15] net: ena: cosmetic: rename ena_update_tx/rx_rings_intr_moderation()

2020-05-21 Thread akiyano
From: Arthur Kiyanovski Rename ena_update_tx/rx_rings_intr_moderation() to ena_update_tx/rx_rings_nonadaptive_intr_moderation() to distinguish between adaptive and non adaptive interrupt moderaion. Signed-off-by: Arthur Kiyanovski --- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 8

[PATCH V1 net-next 13/15] net: ena: cosmetic: fix spacing issues

2020-05-21 Thread akiyano
From: Arthur Kiyanovski 1. Add leading and trailing spaces to several comments for better readability 2. Make tabs and spaces uniform in enum defines in ena_admin_defs.h Signed-off-by: Arthur Kiyanovski --- drivers/net/ethernet/amazon/ena/ena_admin_defs.h | 6 +++--- drivers/net/ethernet/a

[PATCH V1 net-next 11/15] net: ena: cosmetic: remove unnecessary code

2020-05-21 Thread akiyano
From: Arthur Kiyanovski 1. Remove unused definition of DRV_MODULE_VERSION 2. Remove {} from single line-of-code ifs 3. Remove unnecessary comments from ena_get/set_coalesce() 4. Remove unnecessary extra spaces and newlines Signed-off-by: Arthur Kiyanovski --- drivers/net/ethernet/amazon/ena/en

[PATCH V1 net-next 03/15] net: ena: use explicit variable size for clarity

2020-05-21 Thread akiyano
From: Arthur Kiyanovski Use u64 instead of unsigned long long for clarity Signed-off-by: Shai Brandes Signed-off-by: Arthur Kiyanovski --- drivers/net/ethernet/amazon/ena/ena_com.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_c

  1   2   >