mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 10:11:26 +03:00
nvethernet: Support of NVGRO for NVUSO segments
Algorithm: - There is one master queue and one final queue to maintain the packets. - Final queue will start when a packet received with TTL=1 - TTL = 2 and 3 packets will be queued into final if those are in sequence else those will be queued to master queue. - When packet received with TTL = 2 then only merge process will start - For every valid final queue merge starts by looking at the IPID in master queue in increment order. This loop continues until TTL = 2 found in master queue. - Once TTL = 2 found then entire final queue will be given GRO layer in sequential order. Bug 3106903 Change-Id: I6cc08f3faae67a04813d32d59f7cce02f06dccbf Signed-off-by: Bhadram Varka <vbhadram@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2554423 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com> Reviewed-by: Narayan Reddy <narayanr@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Revanth Kumar Uppala
parent
583db7360a
commit
41429e6df9
@@ -65,6 +65,12 @@
|
||||
#ifdef MACSEC_SUPPORT
|
||||
#include "macsec.h"
|
||||
#endif
|
||||
#ifdef ETHER_NVGRO
|
||||
#include <net/inet_common.h>
|
||||
#include <uapi/linux/ip.h>
|
||||
#include <net/udp.h>
|
||||
#endif /* ETHER_NVGRO */
|
||||
|
||||
/**
|
||||
* @brief Max number of Ethernet IRQs supported in HW
|
||||
*/
|
||||
@@ -201,6 +207,14 @@
|
||||
#define ETHER_ADDRESS_MAC 1
|
||||
#define ETHER_ADDRESS_BC 0
|
||||
|
||||
#ifdef ETHER_NVGRO
|
||||
/* NVGRO packets purge threshold in msec */
|
||||
#define NVGRO_AGE_THRESHOLD 500
|
||||
#define NVGRO_PURGE_TIMER_THRESHOLD 5000
|
||||
#define NVGRO_RX_RUNNING OSI_BIT(0)
|
||||
#define NVGRO_PURGE_TIMER_RUNNING OSI_BIT(1)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Check if Tx data buffer length is within bounds.
|
||||
*
|
||||
@@ -525,6 +539,26 @@ struct ether_priv_data {
|
||||
int phy_reset_post_delay;
|
||||
/** PHY reset duration delay */
|
||||
int phy_reset_duration;
|
||||
#ifdef ETHER_NVGRO
|
||||
/** Master queue */
|
||||
struct sk_buff_head mq;
|
||||
/** Master queue */
|
||||
struct sk_buff_head fq;
|
||||
/** expected IP ID */
|
||||
u16 expected_ip_id;
|
||||
/** Timer for purginging the packets in FQ and MQ based on threshold */
|
||||
struct timer_list nvgro_timer;
|
||||
/** Rx processing state for NVGRO */
|
||||
atomic_t rx_state;
|
||||
/** Purge timer state for NVGRO */
|
||||
atomic_t timer_state;
|
||||
/** NVGRO packet age threshold in milseconds */
|
||||
u32 pkt_age_msec;
|
||||
/** NVGRO purge timer interval */
|
||||
u32 nvgro_timer_intrvl;
|
||||
/** NVGRO packet dropped count */
|
||||
u64 nvgro_dropped;
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -681,4 +715,7 @@ void ether_set_rx_mode(struct net_device *dev);
|
||||
int ether_tc_setup_taprio(struct ether_priv_data *pdata,
|
||||
struct tc_taprio_qopt_offload *qopt);
|
||||
#endif
|
||||
#ifdef ETHER_NVGRO
|
||||
void ether_nvgro_purge_timer(struct timer_list *t);
|
||||
#endif /* ETHER_NVGRO */
|
||||
#endif /* ETHER_LINUX_H */
|
||||
|
||||
Reference in New Issue
Block a user