History log of /src/sys/netinet6/in6_offload.c |
Revision | | Date | Author | Comments |
1.13 |
| 05-Jul-2024 |
rin | sys: Drop redundant NULL check before m_freem(9)
m_freem(9) safely has accepted NULL argument at least since 4.2BSD: https://www.tuhs.org/cgi-bin/utree.pl?file=4.2BSD/usr/src/sys/sys/uipc_mbuf.c
Compile-tested on amd64/ALL.
Suggested by knakahara@
|
1.12 |
| 12-Dec-2018 |
rin | branches: 1.12.36; PR kern/53562
Add ether_sw_offload_[tr]x: handle TX/RX offload options in software. Since this violates separation b/w L2 and L3/L4, new files are added rather than having the routines in sys/net/if_ethersubr.c.
OK msaitoh thorpej
|
1.11 |
| 19-Sep-2018 |
rin | Fix in_undefer_cksum() and in6_undefer_cksum().
The 4th argument for in[46]_cksum() should be length of L4 header + L4 payload. The previous revisions are wrong
- for IPv4 when hdrlen != 0 - for IPv6 always
These functions are used only in net/if_loop.c and arch/powerpc/booke/dev/pq3etsec.c under some special circumferences. This should be why the bugs have not been found until today.
OK maxv
|
1.10 |
| 10-Aug-2018 |
maxv | Remove the callback and localify. Same as IPv4.
|
1.9 |
| 10-Aug-2018 |
maxv | Rename
ip6_undefer_csum -> in6_undefer_cksum in6_delayed_cksum -> in6_undefer_cksum_tcpudp
The two previous names were inconsistent and misleading.
Put the two functions into in6_offload.c. Add comments to explain what we're doing.
Same as IPv4.
|
1.8 |
| 01-Jun-2018 |
maxv | branches: 1.8.2; Rename
M_CSUM_DATA_IPv6_HL -> M_CSUM_DATA_IPv6_IPHL M_CSUM_DATA_IPv6_HL_SET -> M_CSUM_DATA_IPv6_SET
Reduces the diff against IPv4. Also, clarify the definitions.
|
1.7 |
| 14-Feb-2017 |
ozaki-r | branches: 1.7.12; Do ND in L2_output in the same manner as arpresolve
The benefits of this change are: - The flow is consistent with IPv4 (and FreeBSD and OpenBSD) - old: ip6_output => nd6_output (do ND if needed) => L2_output (lookup a stored cache) - new: ip6_output => L2_output (lookup a cache. Do ND if cache not found) - We can remove some workarounds in nd6_output - We can move L2 specific operations to their own place - The performance slightly improves because one cache lookup is reduced
|
1.6 |
| 25-Apr-2011 |
yamt | branches: 1.6.14; 1.6.32; 1.6.36; 1.6.40; ip6_undefer_csum: - don't forget ntohs - KNF
|
1.5 |
| 11-Dec-2010 |
matt | branches: 1.5.2; Add routines to calculate a checkesum if the driver concludes that the h/w can't do it.
|
1.4 |
| 02-May-2007 |
dyoung | branches: 1.4.56; 1.4.60; Eliminate address family-specific route caches (struct route, struct route_in6, struct route_iso), replacing all caches with a struct route.
The principle benefit of this change is that all of the protocol families can benefit from route cache-invalidation, which is necessary for correct routing. Route-cache invalidation fixes an ancient PR, kern/3508, at long last; it fixes various other PRs, also.
Discussions with and ideas from Joerg Sonnenberger influenced this work tremendously. Of course, all design oversights and bugs are mine.
DETAILS
1 I added to each address family a pool of sockaddrs. I have introduced routines for allocating, copying, and duplicating, and freeing sockaddrs:
struct sockaddr *sockaddr_alloc(sa_family_t af, int flags); struct sockaddr *sockaddr_copy(struct sockaddr *dst, const struct sockaddr *src); struct sockaddr *sockaddr_dup(const struct sockaddr *src, int flags); void sockaddr_free(struct sockaddr *sa);
sockaddr_alloc() returns either a sockaddr from the pool belonging to the specified family, or NULL if the pool is exhausted. The returned sockaddr has the right size for that family; sa_family and sa_len fields are initialized to the family and sockaddr length---e.g., sa_family = AF_INET and sa_len = sizeof(struct sockaddr_in). sockaddr_free() puts the given sockaddr back into its family's pool.
sockaddr_dup() and sockaddr_copy() work analogously to strdup() and strcpy(), respectively. sockaddr_copy() KASSERTs that the family of the destination and source sockaddrs are alike.
The 'flags' argumet for sockaddr_alloc() and sockaddr_dup() is passed directly to pool_get(9).
2 I added routines for initializing sockaddrs in each address family, sockaddr_in_init(), sockaddr_in6_init(), sockaddr_iso_init(), etc. They are fairly self-explanatory.
3 structs route_in6 and route_iso are no more. All protocol families use struct route. I have changed the route cache, 'struct route', so that it does not contain storage space for a sockaddr. Instead, struct route points to a sockaddr coming from the pool the sockaddr belongs to. I added a new method to struct route, rtcache_setdst(), for setting the cache destination:
int rtcache_setdst(struct route *, const struct sockaddr *);
rtcache_setdst() returns 0 on success, or ENOMEM if no memory is available to create the sockaddr storage.
It is now possible for rtcache_getdst() to return NULL if, say, rtcache_setdst() failed. I check the return value for NULL everywhere in the kernel.
4 Each routing domain (struct domain) has a list of live route caches, dom_rtcache. rtflushall(sa_family_t af) looks up the domain indicated by 'af', walks the domain's list of route caches and invalidates each one.
|
1.3 |
| 25-Apr-2007 |
dyoung | Back out last. To compile, it depends on changes that I am not ready to commit, yet.
|
1.2 |
| 25-Apr-2007 |
dyoung | Constify.
|
1.1 |
| 25-Nov-2006 |
yamt | branches: 1.1.4; 1.1.6; 1.1.8; 1.1.10; 1.1.14; 1.1.16; move tso-by-software code to their own files. no functional changes.
|
1.1.16.1 |
| 11-Jul-2007 |
mjf | Sync with head.
|
1.1.14.1 |
| 08-Jun-2007 |
ad | Sync with head.
|
1.1.10.1 |
| 07-May-2007 |
yamt | sync with head.
|
1.1.8.2 |
| 12-Jan-2007 |
ad | Sync with head.
|
1.1.8.1 |
| 25-Nov-2006 |
ad | file in6_offload.c was added on branch newlock2 on 2007-01-12 01:04:15 +0000
|
1.1.6.3 |
| 03-Sep-2007 |
yamt | sync with head.
|
1.1.6.2 |
| 30-Dec-2006 |
yamt | sync with head.
|
1.1.6.1 |
| 25-Nov-2006 |
yamt | file in6_offload.c was added on branch yamt-lazymbuf on 2006-12-30 20:50:38 +0000
|
1.1.4.2 |
| 10-Dec-2006 |
yamt | sync with head.
|
1.1.4.1 |
| 25-Nov-2006 |
yamt | file in6_offload.c was added on branch yamt-splraiseipl on 2006-12-10 07:19:15 +0000
|
1.4.60.1 |
| 07-Jan-2011 |
matt | If using hardware checksum offload and the packet can't be h/w checksumed (for whatever reason, some hardware is stupid) allow the driver to calculate the checksum instead.
|
1.4.56.2 |
| 31-May-2011 |
rmind | sync with head
|
1.4.56.1 |
| 05-Mar-2011 |
rmind | sync with head
|
1.5.2.1 |
| 06-Jun-2011 |
jruoho | Sync with HEAD.
|
1.6.40.1 |
| 21-Apr-2017 |
bouyer | Sync with HEAD
|
1.6.36.1 |
| 20-Mar-2017 |
pgoyette | Sync with HEAD
|
1.6.32.1 |
| 28-Aug-2017 |
skrll | Sync with HEAD
|
1.6.14.1 |
| 03-Dec-2017 |
jdolecek | update from HEAD
|
1.7.12.4 |
| 26-Dec-2018 |
pgoyette | Sync with HEAD, resolve a few conflicts
|
1.7.12.3 |
| 30-Sep-2018 |
pgoyette | Ssync with HEAD
|
1.7.12.2 |
| 06-Sep-2018 |
pgoyette | Sync with HEAD
Resolve a couple of conflicts (result of the uimin/uimax changes)
|
1.7.12.1 |
| 25-Jun-2018 |
pgoyette | Sync with HEAD
|
1.8.2.1 |
| 10-Jun-2019 |
christos | Sync with HEAD
|
1.12.36.1 |
| 02-Aug-2025 |
perseant | Sync with HEAD
|