Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/xen drop the disabled M_EXT_ROMAP mbuf code, conver...



details:   https://anonhg.NetBSD.org/src/rev/83fcd9e36056
branches:  trunk
changeset: 849864:83fcd9e36056
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Mon Mar 16 20:51:36 2020 +0000

description:
drop the disabled M_EXT_ROMAP mbuf code, convert xennet_checksum_fill()
to use in_undefer_cksum() instead of custom code to compute the checksum
for Rx packets, and set csum_data appropriately for eventual hw offloading

make it possible to skip the sw checksum computation by appropriate Rx
flag similarily as we do for Tx

XXX for now, the Rx flag is mostly for testing as it only works for
dom0<->domu, need some further network stack changes to arrange for
the checksum to be eventually computed when packets goes outside xen

diffstat:

 sys/arch/xen/include/xennet_checksum.h |  5 +++--
 sys/arch/xen/xen/if_xennet_xenbus.c    |  4 ++--
 sys/arch/xen/xen/xennet_checksum.c     |  4 ++--
 sys/arch/xen/xen/xennetback_xenbus.c   |  4 ++--
 4 files changed, 9 insertions(+), 8 deletions(-)

diffs (74 lines):

diff -r 27135300cb0f -r 83fcd9e36056 sys/arch/xen/include/xennet_checksum.h
--- a/sys/arch/xen/include/xennet_checksum.h    Mon Mar 16 20:49:22 2020 +0000
+++ b/sys/arch/xen/include/xennet_checksum.h    Mon Mar 16 20:51:36 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xennet_checksum.h,v 1.1 2006/07/12 15:02:15 yamt Exp $ */
+/*     $NetBSD: xennet_checksum.h,v 1.2 2020/03/16 20:51:36 jdolecek Exp $     */
 
 /*-
  * Copyright (c)2006 YAMAMOTO Takashi,
@@ -29,8 +29,9 @@
 #ifndef _XEN_XENNET_CHECKSUM_H_
 #define        _XEN_XENNET_CHECKSUM_H_
 
+struct ifnet;
 struct mbuf;
 
-int xennet_checksum_fill(struct mbuf **);
+int xennet_checksum_fill(struct ifnet *, struct mbuf *);
 
 #endif /* !_XEN_XENNET_CHECKSUM_H_ */
diff -r 27135300cb0f -r 83fcd9e36056 sys/arch/xen/xen/if_xennet_xenbus.c
--- a/sys/arch/xen/xen/if_xennet_xenbus.c       Mon Mar 16 20:49:22 2020 +0000
+++ b/sys/arch/xen/xen/if_xennet_xenbus.c       Mon Mar 16 20:51:36 2020 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: if_xennet_xenbus.c,v 1.89 2020/03/16 20:49:22 jdolecek Exp $      */
+/*      $NetBSD: if_xennet_xenbus.c,v 1.90 2020/03/16 20:51:36 jdolecek Exp $      */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -84,7 +84,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_xennet_xenbus.c,v 1.89 2020/03/16 20:49:22 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_xennet_xenbus.c,v 1.90 2020/03/16 20:51:36 jdolecek Exp $");
 
 #include "opt_xen.h"
 #include "opt_nfs_boot.h"
diff -r 27135300cb0f -r 83fcd9e36056 sys/arch/xen/xen/xennet_checksum.c
--- a/sys/arch/xen/xen/xennet_checksum.c        Mon Mar 16 20:49:22 2020 +0000
+++ b/sys/arch/xen/xen/xennet_checksum.c        Mon Mar 16 20:51:36 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xennet_checksum.c,v 1.5 2020/03/16 20:49:22 jdolecek Exp $     */
+/*     $NetBSD: xennet_checksum.c,v 1.6 2020/03/16 20:51:36 jdolecek Exp $     */
 
 /*-
  * Copyright (c)2006 YAMAMOTO Takashi,
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xennet_checksum.c,v 1.5 2020/03/16 20:49:22 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xennet_checksum.c,v 1.6 2020/03/16 20:51:36 jdolecek Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
diff -r 27135300cb0f -r 83fcd9e36056 sys/arch/xen/xen/xennetback_xenbus.c
--- a/sys/arch/xen/xen/xennetback_xenbus.c      Mon Mar 16 20:49:22 2020 +0000
+++ b/sys/arch/xen/xen/xennetback_xenbus.c      Mon Mar 16 20:51:36 2020 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: xennetback_xenbus.c,v 1.77 2020/03/16 20:49:22 jdolecek Exp $      */
+/*      $NetBSD: xennetback_xenbus.c,v 1.78 2020/03/16 20:51:36 jdolecek Exp $      */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xennetback_xenbus.c,v 1.77 2020/03/16 20:49:22 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xennetback_xenbus.c,v 1.78 2020/03/16 20:51:36 jdolecek Exp $");
 
 #include "opt_xen.h"
 



Home | Main Index | Thread Index | Old Index