On Tue, Mar 10, 2026 at 09:09:56AM -0700, Stephen Hemminger wrote:
> The driver has constant RTE_ETH_PCAP_SNAPSHOT_LEN with is set
> to the largest value the pcap library will return, so that should
> also be the largest receive buffer.
> 
> Signed-off-by: Stephen Hemminger <[email protected]>
> ---
Acked-by: Bruce Richardson <[email protected]>

>  drivers/net/pcap/pcap_ethdev.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/pcap/pcap_ethdev.c b/drivers/net/pcap/pcap_ethdev.c
> index 20e4b8e6aa..2ffbce2448 100644
> --- a/drivers/net/pcap/pcap_ethdev.c
> +++ b/drivers/net/pcap/pcap_ethdev.c
> @@ -884,10 +884,11 @@ eth_dev_info(struct rte_eth_dev *dev,
>  
>       dev_info->if_index = internals->if_index;
>       dev_info->max_mac_addrs = 1;
> -     dev_info->max_rx_pktlen = (uint32_t) -1;
> +     dev_info->max_rx_pktlen = RTE_ETH_PCAP_SNAPSHOT_LEN;
>       dev_info->max_rx_queues = dev->data->nb_rx_queues;
>       dev_info->max_tx_queues = dev->data->nb_tx_queues;
>       dev_info->min_rx_bufsize = 0;
> +     dev_info->max_mtu = RTE_ETH_PCAP_SNAPSHOT_LEN - RTE_ETHER_HDR_LEN;
>       dev_info->tx_offload_capa = RTE_ETH_TX_OFFLOAD_MULTI_SEGS |
>               RTE_ETH_TX_OFFLOAD_VLAN_INSERT;
>       dev_info->rx_offload_capa = RTE_ETH_RX_OFFLOAD_VLAN_STRIP |
> -- 
> 2.51.0
> 

Reply via email to