RE: [PATCH RFC v2 15/33] ena: add XDP frame size to amazon NIC driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Acked-by: Sameeh Jubran <sameehj@xxxxxxxxxx>

> -----Original Message-----
> From: Jesper Dangaard Brouer <brouer@xxxxxxxxxx>
> Sent: Wednesday, April 8, 2020 2:52 PM
> To: Jubran, Samih <sameehj@xxxxxxxxxx>
> Cc: Kiyanovski, Arthur <akiyano@xxxxxxxxxx>; Jesper Dangaard Brouer
> <brouer@xxxxxxxxxx>; netdev@xxxxxxxxxxxxxxx; bpf@xxxxxxxxxxxxxxx;
> Machulsky, Zorik <zorik@xxxxxxxxxx>; Kiyanovski, Arthur
> <akiyano@xxxxxxxxxx>; Tzalik, Guy <gtzalik@xxxxxxxxxx>; Toke Høiland-
> Jørgensen <toke@xxxxxxxxxx>; Daniel Borkmann
> <borkmann@xxxxxxxxxxxxx>; Alexei Starovoitov
> <alexei.starovoitov@xxxxxxxxx>; John Fastabend
> <john.fastabend@xxxxxxxxx>; Alexander Duyck
> <alexander.duyck@xxxxxxxxx>; Jeff Kirsher <jeffrey.t.kirsher@xxxxxxxxx>;
> David Ahern <dsahern@xxxxxxxxx>; Willem de Bruijn
> <willemdebruijn.kernel@xxxxxxxxx>; Ilias Apalodimas
> <ilias.apalodimas@xxxxxxxxxx>; Lorenzo Bianconi <lorenzo@xxxxxxxxxx>;
> Saeed Mahameed <saeedm@xxxxxxxxxxxx>
> Subject: [EXTERNAL] [PATCH RFC v2 15/33] ena: add XDP frame size to
> amazon NIC driver
> 
> CAUTION: This email originated from outside of the organization. Do not click
> links or open attachments unless you can confirm the sender and know the
> content is safe.
> 
> 
> 
> Frame size ENA_PAGE_SIZE is limited to 16K on systems with larger
> PAGE_SIZE than 16K. Change ENA_XDP_MAX_MTU to also take into account
> the reserved tailroom.
> 
> Cc: Arthur Kiyanovski <akiyano@xxxxxxxxxx>
> Signed-off-by: Jesper Dangaard Brouer <brouer@xxxxxxxxxx>
> ---
>  drivers/net/ethernet/amazon/ena/ena_netdev.c |    1 +
>  drivers/net/ethernet/amazon/ena/ena_netdev.h |    5 +++--
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c
> b/drivers/net/ethernet/amazon/ena/ena_netdev.c
> index 2cc765df8da3..0fd7db1769f8 100644
> --- a/drivers/net/ethernet/amazon/ena/ena_netdev.c
> +++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c
> @@ -1606,6 +1606,7 @@ static int ena_clean_rx_irq(struct ena_ring
> *rx_ring, struct napi_struct *napi,
>                   "%s qid %d\n", __func__, rx_ring->qid);
>         res_budget = budget;
>         xdp.rxq = &rx_ring->xdp_rxq;
> +       xdp.frame_sz = ENA_PAGE_SIZE;
> 
>         do {
>                 xdp_verdict = XDP_PASS;
> diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.h
> b/drivers/net/ethernet/amazon/ena/ena_netdev.h
> index 97dfd0c67e84..dd00127dfe9f 100644
> --- a/drivers/net/ethernet/amazon/ena/ena_netdev.h
> +++ b/drivers/net/ethernet/amazon/ena/ena_netdev.h
> @@ -151,8 +151,9 @@
>   * The buffer size we share with the device is defined to be ENA_PAGE_SIZE
>   */
> 
> -#define ENA_XDP_MAX_MTU (ENA_PAGE_SIZE - ETH_HLEN - ETH_FCS_LEN
> - \
> -                               VLAN_HLEN - XDP_PACKET_HEADROOM)
> +#define ENA_XDP_MAX_MTU (ENA_PAGE_SIZE - ETH_HLEN -
> ETH_FCS_LEN -      \
> +                        VLAN_HLEN - XDP_PACKET_HEADROOM -              \
> +                        SKB_DATA_ALIGN(sizeof(struct skb_shared_info)))
> 
>  #define ENA_IS_XDP_INDEX(adapter, index) (((index) >= (adapter)-
> >xdp_first_ring) && \
>         ((index) < (adapter)->xdp_first_ring + (adapter)->xdp_num_queues))
> 





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux