Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f9cbe9a5 authored by Antoine Tenart's avatar Antoine Tenart Committed by David S. Miller
Browse files

net: define the TSO header size in net/tso.h



The TSO header size was defined in many drivers. Factorize the code and
define its size in net/tso.h.

Signed-off-by: default avatarAntoine Tenart <antoine.tenart@free-electrons.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5f9ae3d9
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -277,7 +277,6 @@ struct snd_queue {
	u16		xdp_free_cnt;
	bool		is_xdp;

#define	TSO_HEADER_SIZE	128
	/* For TSO segment's header */
	char		*tso_hdrs;
	dma_addr_t	tso_hdrs_phys;
+0 −1
Original line number Diff line number Diff line
@@ -226,7 +226,6 @@ MODULE_PARM_DESC(macaddr, "FEC Ethernet MAC address");

#define COPYBREAK_DEFAULT	256

#define TSO_HEADER_SIZE		128
/* Max number of allowed TCP segments for software TSO */
#define FEC_MAX_TSO_SEGS	100
#define FEC_MAX_SKB_DESCS	(FEC_MAX_TSO_SEGS * 2 + MAX_SKB_FRAGS)
+0 −2
Original line number Diff line number Diff line
@@ -183,8 +183,6 @@ static char mv643xx_eth_driver_version[] = "1.4";
#define DEFAULT_TX_QUEUE_SIZE	512
#define SKB_DMA_REALIGN		((PAGE_SIZE - NET_SKB_PAD) % SMP_CACHE_BYTES)

#define TSO_HEADER_SIZE		128

/* Max number of allowed TCP segments for software TSO */
#define MV643XX_MAX_TSO_SEGS 100
#define MV643XX_MAX_SKB_DESCS (MV643XX_MAX_TSO_SEGS * 2 + MAX_SKB_FRAGS)
+0 −3
Original line number Diff line number Diff line
@@ -281,9 +281,6 @@
 */
#define MVNETA_RSS_LU_TABLE_SIZE	1

/* TSO header size */
#define TSO_HEADER_SIZE 128

/* Max number of Rx descriptors */
#define MVNETA_MAX_RXD 128

+2 −0
Original line number Diff line number Diff line
@@ -3,6 +3,8 @@

#include <net/ip.h>

#define TSO_HEADER_SIZE		128

struct tso_t {
	int next_frag_idx;
	void *data;