~kamalmostafa/ubuntu/+source/linux/+git/focal:ena-update

Last commit made on 2021-01-05
Get this branch:
git clone -b ena-update https://git.launchpad.net/~kamalmostafa/ubuntu/+source/linux/+git/focal
Only Kamal Mostafa can upload to this branch. If you are Kamal Mostafa please log in for upload directions.

Branch merges

Branch information

Recent commits

4f2d664... by Shay Agroskin <email address hidden>

net: ena: fix packet's addresses for rx_offset feature

BugLink: https://bugs.launchpad.net/bugs/1910291

This patch fixes two lines in which the rx_offset received by the device
wasn't taken into account:

- prefetch function:
 In our driver the copied data would reside in
 rx_info->page + rx_headroom + rx_offset

 so the prefetch function is changed accordingly.

- setting page_offset to zero for descriptors > 1:
 for every descriptor but the first, the rx_offset is zero. Hence
 the page_offset value should be set to rx_headroom.

 The previous implementation changed the value of rx_info after
 the descriptor was added to the SKB (essentially providing wrong
 page offset).

Fixes: 68f236df93a9 ("net: ena: add support for the rx offset feature")
Signed-off-by: Shay Agroskin <email address hidden>
Signed-off-by: Jakub Kicinski <email address hidden>
(cherry picked from commit 1396d3148bd250db880573f9ed0abe5d6fba1fce)
Signed-off-by: Kamal Mostafa <email address hidden>

266dde1... by Shay Agroskin <email address hidden>

net: ena: handle bad request id in ena_netdev

BugLink: https://bugs.launchpad.net/bugs/1910291

After request id is checked in validate_rx_req_id() its value is still
used in the line
 rx_ring->free_ids[next_to_clean] =
     rx_ring->ena_bufs[i].req_id;
even if it was found to be out-of-bound for the array free_ids.

The patch moves the request 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 <email address hidden>
Signed-off-by: Shay Agroskin <email address hidden>
Signed-off-by: Jakub Kicinski <email address hidden>
(cherry picked from commit 5b7022cf1dc0d721bd4b5f3bada05bd8ced82fe0)
Signed-off-by: Kamal Mostafa <email address hidden>

f9f6739... by Jesse Brandeburg

drivers/net/ethernet: remove incorrectly formatted doc

BugLink: https://bugs.launchpad.net/bugs/1910291

As part of the W=1 series for ethernet, these drivers were
discovered to be using kdoc style comments but were not actually
doing kdoc. The kernel uses kdoc style when documenting code, not
doxygen or other styles.

Fixed Warnings:
drivers/net/ethernet/amazon/ena/ena_com.c:613: warning: Function parameter or member 'ena_dev' not described in 'ena_com_set_llq'
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c:1540: warning: Cannot understand * @brief Set VLAN filter table
drivers/net/ethernet/xilinx/ll_temac_main.c:114: warning: Function parameter or member 'lp' not described in 'temac_indirect_busywait'
drivers/net/ethernet/xilinx/ll_temac_main.c:129: warning: Function parameter or member 'lp' not described in 'temac_indirect_in32'
drivers/net/ethernet/xilinx/ll_temac_main.c:129: warning: Function parameter or member 'reg' not described in 'temac_indirect_in32'
drivers/net/ethernet/xilinx/ll_temac_main.c:147: warning: Function parameter or member 'lp' not described in 'temac_indirect_in32_locked'
drivers/net/ethernet/xilinx/ll_temac_main.c:147: warning: Function parameter or member 'reg' not described in 'temac_indirect_in32_locked'
drivers/net/ethernet/xilinx/ll_temac_main.c:172: warning: Function parameter or member 'lp' not described in 'temac_indirect_out32'
drivers/net/ethernet/xilinx/ll_temac_main.c:172: warning: Function parameter or member 'reg' not described in 'temac_indirect_out32'
drivers/net/ethernet/xilinx/ll_temac_main.c:172: warning: Function parameter or member 'value' not described in 'temac_indirect_out32'
drivers/net/ethernet/xilinx/ll_temac_main.c:188: warning: Function parameter or member 'lp' not described in 'temac_indirect_out32_locked'
drivers/net/ethernet/xilinx/ll_temac_main.c:188: warning: Function parameter or member 'reg' not described in 'temac_indirect_out32_locked'
drivers/net/ethernet/xilinx/ll_temac_main.c:188: warning: Function parameter or member 'value' not described in 'temac_indirect_out32_locked'
drivers/net/ethernet/xilinx/ll_temac_main.c:212: warning: Function parameter or member 'lp' not described in 'temac_dma_in32_be'
drivers/net/ethernet/xilinx/ll_temac_main.c:212: warning: Function parameter or member 'reg' not described in 'temac_dma_in32_be'
drivers/net/ethernet/xilinx/ll_temac_main.c:228: warning: Function parameter or member 'lp' not described in 'temac_dma_out32_be'
drivers/net/ethernet/xilinx/ll_temac_main.c:228: warning: Function parameter or member 'reg' not described in 'temac_dma_out32_be'
drivers/net/ethernet/xilinx/ll_temac_main.c:228: warning: Function parameter or member 'value' not described in 'temac_dma_out32_be'
drivers/net/ethernet/xilinx/ll_temac_main.c:247: warning: Function parameter or member 'lp' not described in 'temac_dma_dcr_in'
drivers/net/ethernet/xilinx/ll_temac_main.c:247: warning: Function parameter or member 'reg' not described in 'temac_dma_dcr_in'
drivers/net/ethernet/xilinx/ll_temac_main.c:255: warning: Function parameter or member 'lp' not described in 'temac_dma_dcr_out'
drivers/net/ethernet/xilinx/ll_temac_main.c:255: warning: Function parameter or member 'reg' not described in 'temac_dma_dcr_out'
drivers/net/ethernet/xilinx/ll_temac_main.c:255: warning: Function parameter or member 'value' not described in 'temac_dma_dcr_out'
drivers/net/ethernet/xilinx/ll_temac_main.c:265: warning: Function parameter or member 'lp' not described in 'temac_dcr_setup'
drivers/net/ethernet/xilinx/ll_temac_main.c:265: warning: Function parameter or member 'op' not described in 'temac_dcr_setup'
drivers/net/ethernet/xilinx/ll_temac_main.c:265: warning: Function parameter or member 'np' not described in 'temac_dcr_setup'
drivers/net/ethernet/xilinx/ll_temac_main.c:300: warning: Function parameter or member 'ndev' not described in 'temac_dma_bd_release'
drivers/net/ethernet/xilinx/ll_temac_main.c:330: warning: Function parameter or member 'ndev' not described in 'temac_dma_bd_init'
drivers/net/ethernet/xilinx/ll_temac_main.c:600: warning: Function parameter or member 'ndev' not described in 'temac_setoptions'
drivers/net/ethernet/xilinx/ll_temac_main.c:600: warning: Function parameter or member 'options' not described in 'temac_setoptions'

Signed-off-by: Jesse Brandeburg <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
(cherry picked from commit 81929a4a8792e8fcbbbaa9952fae0b2f773683ea)
Signed-off-by: Kamal Mostafa <email address hidden>

481f6c0... by Shay Agroskin <email address hidden>

net: ena: Fix all static chekers' warnings

BugLink: https://bugs.launchpad.net/bugs/1910291

After running Sparse checker on the driver using
    make C=1 M=drivers/net/ethernet/amazon/ena

the only error that is thrown is:
    sparse: sparse: Using plain integer as NULL pointer
about the line
    struct ena_calc_queue_size_ctx calc_queue_ctx = { 0 };

This patch fixes this warning, thus 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 <email address hidden>
Signed-off-by: Shay Agroskin <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
(cherry picked from commit f49ed500d60e6c86c27f0c8eb90df50b6489ccba)
Signed-off-by: Kamal Mostafa <email address hidden>

3f0bd9a... by Shay Agroskin <email address hidden>

net: ena: Change RSS related macros and variables names

BugLink: https://bugs.launchpad.net/bugs/1910291

The formal name changes to "ENA_ADMIN_RSS_INDIRECTION_TABLE_CONFIG".
Indirection is the ability to reference "something" using "something else"
instead of the value itself.
Indirection table, as the name implies, is the ability to reference
CPU/Queue value using hash-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 <email address hidden>
Signed-off-by: Shay Agroskin <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
(backported from commit 0deca83ff1118f305fc7fb11e5a4b13e876201e8)
Signed-off-by: Kamal Mostafa <email address hidden>

8a2d670... by Shay Agroskin <email address hidden>

net: ena: Remove redundant print of placement policy

BugLink: https://bugs.launchpad.net/bugs/1910291

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 <email address hidden>
Signed-off-by: Shay Agroskin <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
(cherry picked from commit a8aea84981ad1b0074670a284b13d416d2881f32)
Signed-off-by: Kamal Mostafa <email address hidden>

165b750... by Shay Agroskin <email address hidden>

net: ena: Capitalize all log strings and improve code readability

BugLink: https://bugs.launchpad.net/bugs/1910291

Capitalize all log strings printed by the ena driver to make their
format uniform across it.

Also fix indentation, spelling mistakes and comments to improve code
readability. This also includes adding comments to macros/enums whose
purpose might be difficult to understand.
Separate some code into functions to make it easier to understand the
purpose of these lines.

Signed-off-by: Amit Bernstein <email address hidden>
Signed-off-by: Shay Agroskin <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
(cherry picked from commit bf2746e849c951a7338abeab591cbef5c78555d7)
Signed-off-by: Kamal Mostafa <email address hidden>

b30c427... by Shay Agroskin <email address hidden>

net: ena: Change log message to netif/dev function

BugLink: https://bugs.launchpad.net/bugs/1910291

Make log prints in ena_netdev use the same log functions as the rest of
the driver.

For the sake of consistency, all prints in ena_netdev file were
converted into netif_* format except where netdev struct isn't yet
defined. For these places, dev_* log functions are used (similar to
the patch for ena_com files).

This commit leaves some corner cases which would be changed in a
future patch.

Signed-off-by: Amit Bernstein <email address hidden>
Signed-off-by: Shay Agroskin <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
(cherry picked from commit f0525298f3cce9c572f3fe2782d8070ef40884fa)
Signed-off-by: Kamal Mostafa <email address hidden>

6fa91fe... by Shay Agroskin <email address hidden>

net: ena: Change license into format to SPDX in all files

BugLink: https://bugs.launchpad.net/bugs/1910291

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 <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
(cherry picked from commit 2246cbc2c298ff923896284f301ecc3b6566df8a)
Signed-off-by: Kamal Mostafa <email address hidden>

31c0c6f... by Sameeh Jubran

net: ena: xdp: add queue counters for xdp actions

BugLink: https://bugs.launchpad.net/bugs/1910291

When using XDP every ingress packet is passed to an eBPF (xdp) program
which returns an action for this packet.

This patch adds counters for the number of times each such action was
received. It also counts all the invalid actions received from the eBPF
program.

Signed-off-by: Shay Agroskin <email address hidden>
Signed-off-by: Sameeh Jubran <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
(cherry picked from commit 4cd28b214d561e9882923919bfd4a73afb980ec9)
Signed-off-by: Kamal Mostafa <email address hidden>