* [PATCHv4 net-next-2.6] ethtool: Added support for FW dump
From: Anirban Chakraborty @ 2011-05-12 22:48 UTC (permalink / raw)
To: netdev; +Cc: Ben Hutchings, David Miller, Anirban Chakraborty
In-Reply-To: <1305240515-29237-1-git-send-email-anirban.chakraborty@qlogic.com>
Added code to take FW dump via ethtool. Dump level can be controlled via setting the
dump flag. A get function is provided to query the current setting of the dump flag.
Dump data is obtained from the driver via a separate get function.
Changes from v3:
Fixed buffer length issue in ethtool_get_dump_data function.
Updated kernel doc for ethtool_dump struct and get_dump_flag function.
Changes from v2:
Provided separate commands for get flag and data.
Check for minimum of the two buffer length obtained via ethtool and driver and
use that for dump buffer
Pass up the driver return error codes up to the caller.
Added kernel doc comments.
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
---
include/linux/ethtool.h | 31 ++++++++++++++++
net/core/ethtool.c | 90 +++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 121 insertions(+), 0 deletions(-)
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index bd0b50b..4cbf274 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -601,6 +601,26 @@ struct ethtool_flash {
char data[ETHTOOL_FLASH_MAX_FILENAME];
};
+/**
+ * struct ethtool_dump - used for retrieving, setting device dump
+ * @cmd: Command number - %ETHTOOL_GET_DUMP_FLAG, %ETHTOOL_GET_DUMP_DATA, or
+ * %ETHTOOL_SET_DUMP
+ * @version: FW version of the dump, filled in by driver
+ * @flag: driver dependent flag for dump setting, filled in by driver during
+ * get and filled in by ethtool for set operation
+ * @len: length of dump data, used as the length of the user buffer on entry to
+ * %ETHTOOL_GET_DUMP_DATA and this is returned as dump length by driver
+ * for %ETHTOOL_GET_DUMP_FLAG command
+ * @data: data collected for get dump data operation
+ */
+struct ethtool_dump {
+ __u32 cmd;
+ __u32 version;
+ __u32 flag;
+ __u32 len;
+ u8 data[0];
+};
+
/* for returning and changing feature sets */
/**
@@ -853,6 +873,10 @@ bool ethtool_invalid_flags(struct net_device *dev, u32 data, u32 supported);
* @get_channels: Get number of channels.
* @set_channels: Set number of channels. Returns a negative error code or
* zero.
+ * @get_dump_flag: Get dump flag indicating current dump length, version,
+ * and flag of the device.
+ * @get_dump_data: Get dump data.
+ * @set_dump: Set dump specific flags to the device.
*
* All operations are optional (i.e. the function pointer may be set
* to %NULL) and callers must take this into account. Callers must
@@ -927,6 +951,10 @@ struct ethtool_ops {
const struct ethtool_rxfh_indir *);
void (*get_channels)(struct net_device *, struct ethtool_channels *);
int (*set_channels)(struct net_device *, struct ethtool_channels *);
+ int (*get_dump_flag)(struct net_device *, struct ethtool_dump *);
+ int (*get_dump_data)(struct net_device *,
+ struct ethtool_dump *, void *);
+ int (*set_dump)(struct net_device *, struct ethtool_dump *);
};
#endif /* __KERNEL__ */
@@ -998,6 +1026,9 @@ struct ethtool_ops {
#define ETHTOOL_SFEATURES 0x0000003b /* Change device offload settings */
#define ETHTOOL_GCHANNELS 0x0000003c /* Get no of channels */
#define ETHTOOL_SCHANNELS 0x0000003d /* Set no of channels */
+#define ETHTOOL_SET_DUMP 0x0000003e /* Set dump settings */
+#define ETHTOOL_GET_DUMP_FLAG 0x0000003f /* Get dump settings */
+#define ETHTOOL_GET_DUMP_DATA 0x00000040 /* Get dump data */
/* compatibility with older code */
#define SPARC_ETH_GSET ETHTOOL_GSET
diff --git a/net/core/ethtool.c b/net/core/ethtool.c
index b6f4058..0b92e2f 100644
--- a/net/core/ethtool.c
+++ b/net/core/ethtool.c
@@ -1823,6 +1823,87 @@ static noinline_for_stack int ethtool_flash_device(struct net_device *dev,
return dev->ethtool_ops->flash_device(dev, &efl);
}
+static int ethtool_set_dump(struct net_device *dev,
+ void __user *useraddr)
+{
+ struct ethtool_dump dump;
+
+ if (!dev->ethtool_ops->set_dump)
+ return -EOPNOTSUPP;
+
+ if (copy_from_user(&dump, useraddr, sizeof(dump)))
+ return -EFAULT;
+
+ return dev->ethtool_ops->set_dump(dev, &dump);
+}
+
+static int ethtool_get_dump_flag(struct net_device *dev,
+ void __user *useraddr)
+{
+ int ret;
+ struct ethtool_dump dump;
+ const struct ethtool_ops *ops = dev->ethtool_ops;
+
+ if (!dev->ethtool_ops->get_dump_flag)
+ return -EOPNOTSUPP;
+
+ if (copy_from_user(&dump, useraddr, sizeof(dump)))
+ return -EFAULT;
+
+ ret = ops->get_dump_flag(dev, &dump);
+ if (ret)
+ return ret;
+
+ if (copy_to_user(useraddr, &dump, sizeof(dump)))
+ return -EFAULT;
+ return 0;
+}
+
+static int ethtool_get_dump_data(struct net_device *dev,
+ void __user *useraddr)
+{
+ int ret;
+ __u32 len;
+ struct ethtool_dump dump, tmp;
+ const struct ethtool_ops *ops = dev->ethtool_ops;
+ void *data = NULL;
+
+ if (!dev->ethtool_ops->get_dump_data ||
+ !dev->ethtool_ops->get_dump_flag)
+ return -EOPNOTSUPP;
+
+ if (copy_from_user(&dump, useraddr, sizeof(dump)))
+ return -EFAULT;
+
+ memset(&tmp, 0, sizeof(tmp));
+ tmp.cmd = ETHTOOL_GET_DUMP_FLAG;
+ ret = ops->get_dump_flag(dev, &tmp);
+ if (ret)
+ return ret;
+
+ len = (tmp.len > dump.len) ? dump.len : tmp.len;
+ if (!len)
+ return -EFAULT;
+
+ data = vzalloc(tmp.len);
+ if (!data)
+ return -ENOMEM;
+ ret = ops->get_dump_data(dev, &dump, data);
+ if (ret)
+ goto out;
+
+ if (copy_to_user(useraddr, &dump, sizeof(dump))) {
+ ret = -EFAULT;
+ goto out;
+ }
+ useraddr += offsetof(struct ethtool_dump, data);
+ if (copy_to_user(useraddr, data, len))
+ ret = -EFAULT;
+out:
+ vfree(data);
+ return ret;
+}
+
/* The main entry point in this file. Called from net/core/dev.c */
int dev_ethtool(struct net *net, struct ifreq *ifr)
@@ -2039,6 +2120,15 @@ int dev_ethtool(struct net *net, struct ifreq *ifr)
case ETHTOOL_SCHANNELS:
rc = ethtool_set_channels(dev, useraddr);
break;
+ case ETHTOOL_SET_DUMP:
+ rc = ethtool_set_dump(dev, useraddr);
+ break;
+ case ETHTOOL_GET_DUMP_FLAG:
+ rc = ethtool_get_dump_flag(dev, useraddr);
+ break;
+ case ETHTOOL_GET_DUMP_DATA:
+ rc = ethtool_get_dump_data(dev, useraddr);
+ break;
default:
rc = -EOPNOTSUPP;
}
--
1.7.4.1
^ permalink raw reply related
* [PATCHv4] ethtool: Added FW dump support
From: Anirban Chakraborty @ 2011-05-12 22:48 UTC (permalink / raw)
To: netdev; +Cc: Ben Hutchings, David Miller, Anirban Chakraborty
Added support to take FW dump via ethtool.
Changes since v3:
Updated documentation for ethtool_dump data structure
Changes from v2:
Folded get dump flag and data into one option
Added man page support
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
---
ethtool-copy.h | 24 +++++++++++-
ethtool.8.in | 23 +++++++++++
ethtool.c | 112 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-
3 files changed, 156 insertions(+), 3 deletions(-)
diff --git a/ethtool-copy.h b/ethtool-copy.h
index 22215e9..02e3961 100644
--- a/ethtool-copy.h
+++ b/ethtool-copy.h
@@ -76,6 +76,26 @@ struct ethtool_drvinfo {
__u32 regdump_len; /* Size of data from ETHTOOL_GREGS (bytes) */
};
+/**
+ * struct ethtool_dump - used for retrieving, setting device dump
+ * @cmd: Command number - %ETHTOOL_GET_DUMP_FLAG, %ETHTOOL_GET_DUMP_DATA, or
+ * %ETHTOOL_SET_DUMP
+ * @version: FW version of the dump, filled in by driver
+ * @flag: driver dependent flag for dump setting, filled in by driver during
+ * get and filled in by ethtool for set operation
+ * @len: length of dump data, used as the length of the user buffer on entry to
+ * %ETHTOOL_GET_DUMP_DATA and it is returned by driver for command
+ * %ETHTOOL_GET_DUMP_FLAG
+ * @data: data collected for get dump data operation
+ */
+struct ethtool_dump {
+ __u32 cmd;
+ __u32 version;
+ __u32 flag;
+ __u32 len;
+ __u8 data[0];
+};
+
#define SOPASS_MAX 6
/* wake-on-lan settings */
struct ethtool_wolinfo {
@@ -654,7 +674,6 @@ enum ethtool_sfeatures_retval_bits {
#define ETHTOOL_F_WISH (1 << ETHTOOL_F_WISH__BIT)
#define ETHTOOL_F_COMPAT (1 << ETHTOOL_F_COMPAT__BIT)
-
/* CMDs currently supported */
#define ETHTOOL_GSET 0x00000001 /* Get settings. */
#define ETHTOOL_SSET 0x00000002 /* Set settings. */
@@ -722,6 +741,9 @@ enum ethtool_sfeatures_retval_bits {
#define ETHTOOL_SFEATURES 0x0000003b /* Change device offload settings */
#define ETHTOOL_GCHANNELS 0x0000003c /* Get no of channels */
#define ETHTOOL_SCHANNELS 0x0000003d /* Set no of channels */
+#define ETHTOOL_SET_DUMP 0x0000003e /* Set dump settings */
+#define ETHTOOL_GET_DUMP_FLAG 0x0000003f /* Get dump settings */
+#define ETHTOOL_GET_DUMP_DATA 0x00000040 /* Get dump data */
/* compatibility with older code */
#define SPARC_ETH_GSET ETHTOOL_GSET
diff --git a/ethtool.8.in b/ethtool.8.in
index 9f484fb..3042e7c 100644
--- a/ethtool.8.in
+++ b/ethtool.8.in
@@ -301,6 +301,17 @@ ethtool \- query or control network driver and hardware settings
.RB [ user\-def\-mask
.IR mask ]]
.RI action \ N
+.br
+.HP
+.B ethtool \-w|\-\-get\-dump
+.I ethX
+.RB [ data
+.IR filename ]
+.HP
+.B ethtool\ \-W|\-\-set\-dump
+.I ethX
+.BI \ N
+.HP
.
.\" Adjust lines (i.e. full justification) and hyphenate.
.ad
@@ -711,6 +722,18 @@ lB l.
-1 Drop the matched flow
0 or higher Rx queue to route the flow
.TE
+.TP
+.B \-w \-\-get\-dump
+Retrieves and prints firmware dump for the specified network device.
+By default, it prints out the dump flag, version and length of the dump data.
+When
+.I data
+is indicated, then ethtool fetches the dump data and directs it to a
+.I file.
+.TP
+.B \-W \-\-set\-dump
+Sets the dump flag for the device.
+.TP
.SH BUGS
Not supported (in part or whole) on all network drivers.
.SH AUTHOR
diff --git a/ethtool.c b/ethtool.c
index cfdac65..9dc9f3a 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -28,6 +28,7 @@
#include <sys/types.h>
#include <string.h>
#include <stdlib.h>
+#include <stddef.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
@@ -110,6 +111,8 @@ static int do_srxntuple(int fd, struct ifreq *ifr);
static int do_grxntuple(int fd, struct ifreq *ifr);
static int do_flash(int fd, struct ifreq *ifr);
static int do_permaddr(int fd, struct ifreq *ifr);
+static int do_getfwdump(int fd, struct ifreq *ifr);
+static int do_setfwdump(int fd, struct ifreq *ifr);
static int send_ioctl(int fd, struct ifreq *ifr);
@@ -142,6 +145,8 @@ static enum {
MODE_GNTUPLE,
MODE_FLASHDEV,
MODE_PERMADDR,
+ MODE_SET_DUMP,
+ MODE_GET_DUMP,
} mode = MODE_GSET;
static struct option {
@@ -263,6 +268,12 @@ static struct option {
"Get Rx ntuple filters and actions\n" },
{ "-P", "--show-permaddr", MODE_PERMADDR,
"Show permanent hardware address" },
+ { "-w", "--get-dump", MODE_GET_DUMP,
+ "Get dump flag, data",
+ " [ data FILENAME ]\n" },
+ { "-W", "--set-dump", MODE_SET_DUMP,
+ "Set dump flag of the device",
+ " N\n"},
{ "-h", "--help", MODE_HELP, "Show this help" },
{ NULL, "--version", MODE_VERSION, "Show version number" },
{}
@@ -413,6 +424,8 @@ static int flash_region = -1;
static int msglvl_changed;
static u32 msglvl_wanted = 0;
static u32 msglvl_mask = 0;
+static u32 dump_flag;
+static char *dump_file = NULL;
static enum {
ONLINE=0,
@@ -852,7 +865,9 @@ static void parse_cmdline(int argc, char **argp)
(mode == MODE_GNTUPLE) ||
(mode == MODE_PHYS_ID) ||
(mode == MODE_FLASHDEV) ||
- (mode == MODE_PERMADDR)) {
+ (mode == MODE_PERMADDR) ||
+ (mode == MODE_SET_DUMP) ||
+ (mode == MODE_GET_DUMP)) {
devname = argp[i];
break;
}
@@ -874,6 +889,9 @@ static void parse_cmdline(int argc, char **argp)
flash_file = argp[i];
flash = 1;
break;
+ } else if (mode == MODE_SET_DUMP) {
+ dump_flag = get_u32(argp[i], 0);
+ break;
}
/* fallthrough */
default:
@@ -1020,6 +1038,21 @@ static void parse_cmdline(int argc, char **argp)
}
break;
}
+ if (mode == MODE_GET_DUMP) {
+ if (argc != i + 2) {
+ exit_bad_args();
+ break;
+ }
+ if (!strcmp(argp[i++], "data"))
+ dump_flag = ETHTOOL_GET_DUMP_DATA;
+ else {
+ exit_bad_args();
+ break;
+ }
+ dump_file = argp[i];
+ i = argc;
+ break;
+ }
if (mode != MODE_SSET)
exit_bad_args();
if (!strcmp(argp[i], "speed")) {
@@ -2042,6 +2075,10 @@ static int doit(void)
return do_flash(fd, &ifr);
} else if (mode == MODE_PERMADDR) {
return do_permaddr(fd, &ifr);
+ } else if (mode == MODE_GET_DUMP) {
+ return do_getfwdump(fd, &ifr);
+ } else if (mode == MODE_SET_DUMP) {
+ return do_setfwdump(fd, &ifr);
}
return 69;
@@ -2679,7 +2716,6 @@ static int do_gregs(int fd, struct ifreq *ifr)
perror("Cannot get driver information");
return 72;
}
-
regs = calloc(1, sizeof(*regs)+drvinfo.regdump_len);
if (!regs) {
perror("Cannot allocate memory for register dump");
@@ -3241,6 +3277,78 @@ static int do_grxntuple(int fd, struct ifreq *ifr)
return 0;
}
+static void do_writefwdump(struct ethtool_dump *dump)
+{
+ FILE *f;
+ size_t bytes;
+
+ f = fopen(dump_file, "wb+");
+
+ if (!f) {
+ fprintf(stderr, "Can't open file %s: %s\n",
+ dump_file, strerror(errno));
+ return;
+ }
+ bytes = fwrite(dump->data, 1, dump->len, f);
+ if (fclose(f))
+ fprintf(stderr, "Can't close file %s: %s\n",
+ dump_file, strerror(errno));
+}
+
+static int do_getfwdump(int fd, struct ifreq *ifr)
+{
+ int err;
+ struct ethtool_dump edata;
+ struct ethtool_dump *data;
+
+ edata.cmd = ETHTOOL_GET_DUMP_FLAG;
+
+ ifr->ifr_data = (caddr_t) &edata;
+ err = send_ioctl(fd, ifr);
+ if (err < 0) {
+ perror("Can not get dump level");
+ return 74;
+ }
+ if (dump_flag != ETHTOOL_GET_DUMP_DATA) {
+ fprintf(stdout, "flag: %u, version: %u, length: %u\n",
+ edata.flag, edata.version, edata.len);
+ return 0;
+ }
+ data = calloc(1, offsetof(struct ethtool_dump, data) + edata.len);
+ if (!data) {
+ perror("Can not allocate enough memory");
+ return 0;
+ }
+ data->cmd = ETHTOOL_GET_DUMP_DATA;
+ data->len = edata.len;
+ ifr->ifr_data = (caddr_t) data;
+ err = send_ioctl(fd, ifr);
+ if (err < 0) {
+ perror("Can not get dump data\n");
+ goto free;
+ }
+ do_writefwdump(data);
+free:
+ free(data);
+ return 0;
+}
+
+static int do_setfwdump(int fd, struct ifreq *ifr)
+{
+ int err;
+ struct ethtool_dump dump;
+
+ dump.cmd = ETHTOOL_SET_DUMP;
+ dump.flag = dump_flag;
+ ifr->ifr_data = (caddr_t)&dump;
+ err = send_ioctl(fd, ifr);
+ if (err < 0) {
+ perror("Can not set dump level");
+ return 74;
+ }
+ return 0;
+}
+
static int send_ioctl(int fd, struct ifreq *ifr)
{
return ioctl(fd, SIOCETHTOOL, ifr);
--
1.7.4.1
^ permalink raw reply related
* [PATCHv3 net-next-2.6 2/3] qlcnic: Take FW dump via ethtool
From: Anirban Chakraborty @ 2011-05-12 22:48 UTC (permalink / raw)
To: netdev; +Cc: Ben Hutchings, David Miller, Anirban Chakraborty
In-Reply-To: <1305240515-29237-1-git-send-email-anirban.chakraborty@qlogic.com>
Driver checks if the previous dump has been cleared before taking the dump.
It doesn't take the dump if it is not cleared.
Changes from v2:
Added lock to protect dump data structures from being mangled while
dumping or setting them via ethtool.
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
---
drivers/net/qlcnic/qlcnic_ethtool.c | 81 +++++++++++++++++++++++++++++++++++
1 files changed, 81 insertions(+), 0 deletions(-)
diff --git a/drivers/net/qlcnic/qlcnic_ethtool.c b/drivers/net/qlcnic/qlcnic_ethtool.c
index c541461..9efc690 100644
--- a/drivers/net/qlcnic/qlcnic_ethtool.c
+++ b/drivers/net/qlcnic/qlcnic_ethtool.c
@@ -965,6 +965,84 @@ static void qlcnic_set_msglevel(struct net_device *netdev, u32 msglvl)
adapter->msg_enable = msglvl;
}
+static int
+qlcnic_get_dump_flag(struct net_device *netdev, struct ethtool_dump *dump)
+{
+ struct qlcnic_adapter *adapter = netdev_priv(netdev);
+ struct qlcnic_fw_dump *fw_dump = &adapter->ahw->fw_dump;
+
+ dump->len = fw_dump->tmpl_hdr->size + fw_dump->size;
+ dump->flag = fw_dump->tmpl_hdr->drv_cap_mask;
+ dump->version = adapter->fw_version;
+ return 0;
+}
+
+static int
+qlcnic_get_dump_data(struct net_device *netdev, struct ethtool_dump *dump,
+ void *buffer)
+{
+ int i, copy_sz;
+ u32 *hdr_ptr, *data;
+ struct qlcnic_adapter *adapter = netdev_priv(netdev);
+ struct qlcnic_fw_dump *fw_dump = &adapter->ahw->fw_dump;
+
+ if (qlcnic_api_lock(adapter))
+ return -EIO;
+ if (!fw_dump->clr) {
+ netdev_info(netdev, "Dump not available\n");
+ qlcnic_api_unlock(adapter);
+ return -EINVAL;
+ }
+ /* Copy template header first */
+ copy_sz = fw_dump->tmpl_hdr->size;
+ hdr_ptr = (u32 *) fw_dump->tmpl_hdr;
+ data = (u32 *) buffer;
+ for (i = 0; i < copy_sz/sizeof(u32); i++)
+ *data++ = cpu_to_le32(*hdr_ptr++);
+
+ /* Copy captured dump data */
+ memcpy(buffer + copy_sz, fw_dump->data, fw_dump->size);
+ dump->len = copy_sz + fw_dump->size;
+ dump->flag = fw_dump->tmpl_hdr->drv_cap_mask;
+
+ /* Free dump area once data has been captured */
+ vfree(fw_dump->data);
+ fw_dump->data = NULL;
+ fw_dump->clr = 0;
+ qlcnic_api_unlock(adapter);
+
+ return 0;
+}
+
+static int
+qlcnic_set_dump(struct net_device *netdev, struct ethtool_dump *val)
+{
+ int ret = 0;
+ struct qlcnic_adapter *adapter = netdev_priv(netdev);
+ struct qlcnic_fw_dump *fw_dump = &adapter->ahw->fw_dump;
+
+ if (val->flag == QLCNIC_FORCE_FW_DUMP_KEY) {
+ netdev_info(netdev, "Forcing a FW dump\n");
+ qlcnic_dev_request_reset(adapter);
+ } else {
+ if (val->flag > QLCNIC_DUMP_MASK_MAX ||
+ val->flag < QLCNIC_DUMP_MASK_MIN) {
+ netdev_info(netdev,
+ "Invalid dump level: 0x%x\n", val->flag);
+ ret = -EINVAL;
+ goto out;
+ }
+ if (qlcnic_api_lock(adapter))
+ return -EIO;
+ fw_dump->tmpl_hdr->drv_cap_mask = val->flag & 0xff;
+ qlcnic_api_unlock(adapter);
+ netdev_info(netdev, "Driver mask changed to: 0x%x\n",
+ fw_dump->tmpl_hdr->drv_cap_mask);
+ }
+out:
+ return ret;
+}
+
const struct ethtool_ops qlcnic_ethtool_ops = {
.get_settings = qlcnic_get_settings,
.set_settings = qlcnic_set_settings,
@@ -991,4 +1069,7 @@ const struct ethtool_ops qlcnic_ethtool_ops = {
.set_phys_id = qlcnic_set_led,
.set_msglevel = qlcnic_set_msglevel,
.get_msglevel = qlcnic_get_msglevel,
+ .get_dump_flag = qlcnic_get_dump_flag,
+ .get_dump_data = qlcnic_get_dump_data,
+ .set_dump = qlcnic_set_dump,
};
--
1.7.4.1
^ permalink raw reply related
* [PATCHv3 net-next-2.6 3/3] qlcnic: Bumped up version number to 5.0.18
From: Anirban Chakraborty @ 2011-05-12 22:48 UTC (permalink / raw)
To: netdev; +Cc: Ben Hutchings, David Miller, Anirban Chakraborty
In-Reply-To: <1305240515-29237-1-git-send-email-anirban.chakraborty@qlogic.com>
Update driver version number
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
---
drivers/net/qlcnic/qlcnic.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/qlcnic/qlcnic.h b/drivers/net/qlcnic/qlcnic.h
index 689adea..480ef5c 100644
--- a/drivers/net/qlcnic/qlcnic.h
+++ b/drivers/net/qlcnic/qlcnic.h
@@ -36,8 +36,8 @@
#define _QLCNIC_LINUX_MAJOR 5
#define _QLCNIC_LINUX_MINOR 0
-#define _QLCNIC_LINUX_SUBVERSION 17
-#define QLCNIC_LINUX_VERSIONID "5.0.17"
+#define _QLCNIC_LINUX_SUBVERSION 18
+#define QLCNIC_LINUX_VERSIONID "5.0.18"
#define QLCNIC_DRV_IDC_VER 0x01
#define QLCNIC_DRIVER_VERSION ((_QLCNIC_LINUX_MAJOR << 16) |\
(_QLCNIC_LINUX_MINOR << 8) | (_QLCNIC_LINUX_SUBVERSION))
--
1.7.4.1
^ permalink raw reply related
* Re: [Bugme-new] [Bug 34322] New: No ECN marking in IPv6
From: David Miller @ 2011-05-12 22:52 UTC (permalink / raw)
To: sgunderson
Cc: eric.dumazet, akpm, netdev, bugzilla-daemon, bugme-daemon,
yoshfuji
In-Reply-To: <20110507095910.GC30492@uio.no>
From: "Steinar H. Gunderson" <sgunderson@bigfoot.com>
Date: Sat, 7 May 2011 11:59:10 +0200
> On Sat, May 07, 2011 at 11:44:46AM +0200, Eric Dumazet wrote:
>> I cooked for you the official patch and made sure it worked with a RED
>> ECN setup, and one ipv6 tcp xmit.
>
> Great, thanks :-) This looks good to me.
Applied, thanks everyone.
^ permalink raw reply
* Re: [PATCH v2] bonding: convert to ndo_fix_features
From: David Miller @ 2011-05-12 22:46 UTC (permalink / raw)
To: mirq-linux; +Cc: netdev, fubar, andy
In-Reply-To: <20110507132217.0CB5A13A69@rere.qmqm.pl>
From: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Date: Sat, 7 May 2011 15:22:17 +0200 (CEST)
> This should also fix updating of vlan_features and propagating changes to
> VLAN devices on the bond.
>
> Side effect: it allows user to force-disable some offloads on the bond
> interface.
>
> Note: NETIF_F_VLAN_CHALLENGED is managed by bond_fix_features() now.
>
> Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Applied.
^ permalink raw reply
* Re: [PATCH] net: introduce netdev_change_features()
From: David Miller @ 2011-05-12 22:40 UTC (permalink / raw)
To: mirq-linux; +Cc: netdev
In-Reply-To: <20110507132217.0938E13A6A@rere.qmqm.pl>
From: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Date: Sat, 7 May 2011 15:22:17 +0200 (CEST)
> It will be needed by bonding and other drivers changing vlan_features
> after ndo_init callback.
>
> As a bonus, this includes kernel-doc for netdev_update_features().
>
> Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Applied.
^ permalink raw reply
* Re: [PATCH] CDC NCM: Add mising short packet in cdc_ncm driver
From: David Miller @ 2011-05-12 22:30 UTC (permalink / raw)
To: alexey.orishko; +Cc: netdev, linux-usb, gregkh, alexey.orishko
In-Reply-To: <1304686890-2543-1-git-send-email-alexey.orishko@stericsson.com>
From: Alexey Orishko <alexey.orishko@gmail.com>
Date: Fri, 6 May 2011 15:01:30 +0200
> Changes:
> - while making NTB, driver shall check if device dwNtbOutMaxSize is higher than
> host value and shall add a short packet if this is the case
> - previous temporary patch for this issue is replaced by this one
>
> Signed-off-by: Alexey Orishko <alexey.orishko@stericsson.com>
Applied to net-next-2.6, thanks.
^ permalink raw reply
* Re: [PATCH 4/10] ipvs: Use IP_VS_RT_MODE_* instead of magic constants.
From: David Miller @ 2011-05-12 22:28 UTC (permalink / raw)
To: ja; +Cc: netdev
In-Reply-To: <alpine.LFD.2.00.1105120212150.2431@ja.ssi.bg>
From: Julian Anastasov <ja@ssi.bg>
Date: Thu, 12 May 2011 02:32:09 +0300 (EEST)
> My simple tests do not show any problems with patches
> 4, 5 and the new 6 and 7. I tested TUN mode for rt_src/rt_dst
> and DR/NAT for rt_dst replacement, related ICMP is relayed properly.
> So, we should be ok but I'll do more tests in the following
> days because the list with possible combinations for testing
> is too long: different forwarding mode (DR/TUN/NAT),
> local or remote real server, local or remote client,
> In or Out related ICMP, Passive or Active FTP...
Julian, I integrated your work and pushed 3 patches to net-next-2.6
1) Original patch #4 with your followup integrated
2) Original patch #5
3) You're replacement for original patch #6 and #7
Let me know if there are any followup fixes that we need to work
on.
Thanks!
^ permalink raw reply
* Re: [PATCH net-next] netdevice.h: Align struct netdevices members
From: David Miller @ 2011-05-12 22:05 UTC (permalink / raw)
To: joe; +Cc: eric.dumazet, netdev
In-Reply-To: <1305001325.19586.110.camel@Joe-Laptop>
From: Joe Perches <joe@perches.com>
Date: Mon, 09 May 2011 21:22:05 -0700
> On Tue, 2011-05-10 at 05:53 +0200, Eric Dumazet wrote:
>> Le lundi 09 mai 2011 à 20:42 -0700, Joe Perches a écrit :
>> > Save a bit of space.
>> Hmm... correct alignements are far more important for this structure.
>
> I agree. I aligned these members on "natural" boundaries.
> 4 consecutive chars rather than 2 chars, unsigned long.
>
>> Did you run benchmarks on 32bit and 64bit platforms ?
>
> Nope.
>
>> BTW we have ____cacheline_aligned_in_smp markers, I am not even sure
>> this patch saves space.
>
> That depends on whether or not CONFIG_SMP is defined and
> all of the changes are before any ____cacheline_aligned markers.
I think this is sane, Eric do you still have objections?
^ permalink raw reply
* Re: [PATCHv6 2/2] tg3: Allow ethtool to enable/disable loopback.
From: David Miller @ 2011-05-12 22:04 UTC (permalink / raw)
To: maheshb; +Cc: mcarlson, netdev, mchan, therbert
In-Reply-To: <1304873508-24307-1-git-send-email-maheshb@google.com>
From: Mahesh Bandewar <maheshb@google.com>
Date: Sun, 8 May 2011 09:51:48 -0700
> This patch adds tg3_set_features() to handle loopback mode. Currently the
> capability is added for the devices which support internal MAC loopback mode.
> So when enabled, it enables internal-MAC loopback.
>
> Signed-off-by: Mahesh Bandewar <maheshb@google.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH] net/irda/ircomm_tty.c: Use flip buffers to deliver data
From: David Miller @ 2011-05-12 22:03 UTC (permalink / raw)
To: alan
Cc: amit.virdi, samuel, alan, eric.dumazet, netdev, linux-kernel,
shiraz.hashim, armando.visconti, viresh.kumar
In-Reply-To: <20110512121751.61d62446@lxorguk.ukuu.org.uk>
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
Date: Thu, 12 May 2011 12:17:51 +0100
> On Thu, 12 May 2011 16:34:40 +0530
> Amit Virdi <amit.virdi@st.com> wrote:
>
>> use tty_insert_flip_string and tty_flip_buffer_push to deliver incoming data
>> packets from the IrDA device instead of delivering the packets directly to the
>> line discipline. Following later approach resulted in warning "Sleeping function
>> called from invalid context".
>>
>> Signed-off-by: Amit Virdi <amit.virdi@st.com>
>
> Acked-by: Alan Cox <alan@linux.intel.com>
Applied to net-next-2.6, thanks.
^ permalink raw reply
* Re: [patch 1/9] [PATCH] qeth: convert to hw_features part 2
From: David Miller @ 2011-05-12 22:02 UTC (permalink / raw)
To: blaschka; +Cc: mirqus, netdev, linux-s390
In-Reply-To: <20110512115959.GA37368@tuxmaker.boeblingen.de.ibm.com>
From: Frank Blaschka <blaschka@linux.vnet.ibm.com>
Date: Thu, 12 May 2011 13:59:59 +0200
> Since this is RX processing there is nothing queued during recovery. But
> you are right for tx csum or TSO we have to think about this. For now
> I would like to complete this patch.
Can you guys resolve this quickly so that I can apply this patch
series?
^ permalink raw reply
* Re: [PATCH] net: af_packet: Don't initialize vnet_hdr
From: David Miller @ 2011-05-12 21:59 UTC (permalink / raw)
To: joe; +Cc: linux-kernel, netdev
In-Reply-To: <1305237348.6124.72.camel@Joe-Laptop>
From: Joe Perches <joe@perches.com>
Date: Thu, 12 May 2011 14:55:48 -0700
> Save an initialization because when this structure
> is used it's completely filled by memcpy_fromiovec.
>
> Add a new variable used for the 0 sized allocation
> when this structure is not used.
>
> Signed-off-by: Joe Perches <joe@perches.com>
>
> ---
>
> On Thu, 2011-05-12 at 17:36 -0400, David Miller wrote:
>> I would rather see the code rearranged such that this sort of
>> hackish scheme isn't necessary.
You misunderstood me.
It's this:
struct virtio_net_hdr vnet_hdr;
if (po->has_vnet_hdr) {
initialize &vnet_hdr
}
...
if (po->has_vnet_hdr) {
use vnet_hdr
}
which I'm talking about when I say "hackish scheme".
The compiler cannot conclusively see that the control flow always
goes to the code that initialized vnet_hdr every time it reaches
the code that uses it.
I want _that_ part rearranged, not what you decided to tackle
here.
For the third time, I'm not applying your patch.
^ permalink raw reply
* Re: [PATCH v2] net: group FCoE related feature flags
From: David Miller @ 2011-05-12 21:55 UTC (permalink / raw)
To: yi.zou; +Cc: netdev, mirq-linux, jeffrey.t.kirsher, devel
In-Reply-To: <20110509215133.4346.14504.stgit@localhost6.localdomain6>
From: Yi Zou <yi.zou@intel.com>
Date: Mon, 09 May 2011 14:53:27 -0700
> Michał Mirosław's patch (http://patchwork.ozlabs.org/patch/94421/) fixes the
> issue (http://patchwork.ozlabs.org/patch/94188/) about not populating FCoE related
> flags correctly on vlan devices. However, only NETIF_F_FCOE_CRC is part of the
> NETIF_F_ALL_TX_OFFLOADS right now, where weed NETIF_F_FCOE_MTU and NETIF_F_FSO
> as well.
>
> Therefore, add NETIF_F_ALL_FCOE to indicate feature flags used by FCoE TX offloads.
> These include NETIF_F_FCOE_CRC, NETIF_F_FCOE_MTU, and NETIF_F_FSO and add them to
> be part of NETIF_F_ALL_TX_OFFLOADS. This would eventually make sure all FCoE needed
> flags are populated properly to vlan devices.
>
> Signed-off-by: Yi Zou <yi.zou@intel.com>
Applied.
^ permalink raw reply
* Re: [PATCH] net: Fix vlan_features propagation
From: David Miller @ 2011-05-12 21:55 UTC (permalink / raw)
To: mirq-linux; +Cc: netdev, kaber
In-Reply-To: <20110506175629.AF59713A6A@rere.qmqm.pl>
From: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Date: Fri, 6 May 2011 19:56:29 +0200 (CEST)
> Fix VLAN features propagation for devices which change vlan_features.
> For this to work, driver needs to make sure netdev_features_changed()
> gets called after the change (it is e.g. after ndo_set_features()).
>
> Side effect is that a user might request features that will never
> be enabled on a VLAN device.
>
> Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Applied.
^ permalink raw reply
* Re: [PATCH] net: af_packet: Don't initialize vnet_hdr
From: Joe Perches @ 2011-05-12 21:55 UTC (permalink / raw)
To: David Miller; +Cc: linux-kernel, netdev
In-Reply-To: <20110512.173608.1652572492952866283.davem@davemloft.net>
Save an initialization because when this structure
is used it's completely filled by memcpy_fromiovec.
Add a new variable used for the 0 sized allocation
when this structure is not used.
Signed-off-by: Joe Perches <joe@perches.com>
---
On Thu, 2011-05-12 at 17:36 -0400, David Miller wrote:
> I would rather see the code rearranged such that this sort of
> hackish scheme isn't necessary.
net/packet/af_packet.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index 549527b..cc1e83d 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -1123,9 +1123,10 @@ static int packet_snd(struct socket *sock,
__be16 proto;
unsigned char *addr;
int ifindex, err, reserve = 0;
- struct virtio_net_hdr vnet_hdr = { 0 };
+ struct virtio_net_hdr vnet_hdr;
int offset = 0;
int vnet_hdr_len;
+ size_t alloc_vnet_hdr_len;
struct packet_sock *po = pkt_sk(sk);
unsigned short gso_type = 0;
@@ -1206,7 +1207,10 @@ static int packet_snd(struct socket *sock,
goto out_unlock;
}
- }
+ alloc_vnet_hdr_len = vnet_hdr.hdr_len;
+ } else
+ alloc_vnet_hdr_len = 0;
+
err = -EMSGSIZE;
if (!gso_type && (len > dev->mtu + reserve + VLAN_HLEN))
@@ -1214,7 +1218,7 @@ static int packet_snd(struct socket *sock,
err = -ENOBUFS;
skb = packet_alloc_skb(sk, LL_ALLOCATED_SPACE(dev),
- LL_RESERVED_SPACE(dev), len, vnet_hdr.hdr_len,
+ LL_RESERVED_SPACE(dev), len, alloc_vnet_hdr_len,
msg->msg_flags & MSG_DONTWAIT, &err);
if (skb == NULL)
goto out_unlock;
^ permalink raw reply related
* Re: [PATCH RESEND net-next] ethtool: bring back missing comma in netdev features strings
From: David Miller @ 2011-05-12 21:50 UTC (permalink / raw)
To: mirqus; +Cc: franco, netdev, maheshb
In-Reply-To: <BANLkTikW=vURi7sAQ9ZJdgy=JDv+JacTQQ@mail.gmail.com>
From: Michał Mirosław <mirqus@gmail.com>
Date: Thu, 12 May 2011 18:45:12 +0200
> 2011/5/12 <franco@lastsummer.de>:
>> The issue was introduced in commit eed2a12f1ed9aabf.
>>
>> Signed-off-by: Franco Fichtner <franco@lastsummer.de>
>> ---
>> net/core/ethtool.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/net/core/ethtool.c b/net/core/ethtool.c
>> index b6f4058..b8c2b10 100644
>> --- a/net/core/ethtool.c
>> +++ b/net/core/ethtool.c
>> @@ -361,7 +361,7 @@ static const char
>> netdev_features_strings[ETHTOOL_DEV_FEATURE_WORDS * 32][ETH_GS
>> /* NETIF_F_NTUPLE */ "rx-ntuple-filter",
>> /* NETIF_F_RXHASH */ "rx-hashing",
>> /* NETIF_F_RXCSUM */ "rx-checksum",
>> - /* NETIF_F_NOCACHE_COPY */ "tx-nocache-copy"
>> + /* NETIF_F_NOCACHE_COPY */ "tx-nocache-copy",
>> /* NETIF_F_LOOPBACK */ "loopback",
>> };
>
> Acked-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Applied, but this patch was significantly mangled by your email
client. Please correct this problem before submitting future
patches, as I will just push them back to you if this happens
again.
Thanks.
^ permalink raw reply
* Re: [PATCH net-next-2.6] garp: remove last synchronize_rcu() call
From: David Miller @ 2011-05-12 21:47 UTC (permalink / raw)
To: eric.dumazet; +Cc: kaber, greearb, netdev, paulmck
In-Reply-To: <1305206957.3795.21.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 12 May 2011 15:29:17 +0200
> [PATCH net-next-2.6] garp: remove last synchronize_rcu() call
>
> When removing last vlan from a device, garp_uninit_applicant() calls
> synchronize_rcu() to make sure no user can still manipulate struct
> garp_applicant before we free it.
>
> Use call_rcu() instead, as a step to further net_device dismantle
> optimizations.
>
> Add the temporary garp_cleanup_module() function to make sure no pending
> call_rcu() are left at module unload time [ this will be removed when
> kfree_rcu() is available ]
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Looks good, applied, thanks Eric.
^ permalink raw reply
* Re: [PATCHv1] e1000e: Allow ethtool to enable/disable loopback.
From: Mahesh Bandewar @ 2011-05-12 21:41 UTC (permalink / raw)
To: Michał Mirosław; +Cc: e1000-devel, netdev, Tom Herbert, David Miller
In-Reply-To: <BANLkTi=YbTgy0cNJRvcg1QkWCv9sNKkvUQ@mail.gmail.com>
On Wed, May 11, 2011 at 10:50 PM, Michał Mirosław <mirqus@gmail.com> wrote:
> W dniu 12 maja 2011 01:11 użytkownik Mahesh Bandewar
> <maheshb@google.com> napisał:
>> On Wed, May 11, 2011 at 12:15 PM, Michał Mirosław <mirqus@gmail.com> wrote:
>>> 2011/5/11 Mahesh Bandewar <maheshb@google.com>:
>>>> This patch adds e1000_set_features() to handle loopback mode. When loopback
>>>> is enabled, it enables internal-MAC loopback.
>>> Please wait for this driver's conversion to hw_features. One comment
>>> below, though.
>> This is not intrusive so should not create problems when that happens.
>
> Fine by me then.
>
>>> [...]
>>>> --- a/drivers/net/e1000e/netdev.c
>>>> +++ b/drivers/net/e1000e/netdev.c
>>> [...]
>>>> +static int e1000_set_features(struct net_device *dev, u32 features)
>>>> +{
>>>> + u32 changed = dev->features ^ features;
>>>> +
>>>> + if ((changed & NETIF_F_LOOPBACK) && netif_running(dev))
>>>> + e1000_set_loopback(dev, features);
>>>> +
>>>> + return 0;
>>>> +}
>>> [...]
>>>
>>> If e1000_set_loopback() fails, this should set dev->features to passed
>>> features (but keeping NETIF_F_LOOPBACK unchanged in dev->features) to
>>> keep the state consistent.
>> set_features() can return the return code of set_loopback() instead of
>> 0; this way the consistency will be maintained.
>
> Only as long as NETIF_F_LOOPBACK is the only bit set in hw_features.
> netdev_update_features() can't really know which features were changed
> and which failed when ndo_set_features callback returns non-zero.
>
This is more of an API shortcoming. Callback will have to revert
changes made (rollback) before returning non-zero value to keep it
consistent.
Thanks,
--mahesh..
> Best Regards,
> Michał Mirosław
>
------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply
* Re: [PATCH net-next] vmxnet3: Use single tx queue when CONFIG_PCI_MSI not defined
From: David Miller @ 2011-05-12 21:37 UTC (permalink / raw)
To: sbhatewara; +Cc: netdev, linux-kernel, pv-drivers
In-Reply-To: <alpine.LRH.2.00.1105100903110.1095@sbhatewara-dev1.eng.vmware.com>
From: Shreyas Bhatewara <sbhatewara@vmware.com>
Date: Tue, 10 May 2011 09:13:56 -0700 (PDT)
>
> Resending this patch with few changes.
>
>
> Avoid multiple queues when MSI or MSI-X not available
>
> Limit number of Tx queues to 1 if MSI/MSI-X support is not configured in
> the kernel. This will make number of tx and rx queues equal when MSI/X
> is not configured thus providing better performance.
>
> Signed-off-by: Bhavesh Davda <bhavesh@vmware.com>
> Signed-off-by: Shreyas N Bhatewara <sbhatewara@vmware.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH net-next] net:set valid name before calling ndo_init()
From: David Miller @ 2011-05-12 21:37 UTC (permalink / raw)
To: eric.dumazet
Cc: panweiping3, therbert, mirq-linux, bhutchings, netdev,
linux-kernel
In-Reply-To: <1305214382.3795.28.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 12 May 2011 17:33:02 +0200
> Le jeudi 12 mai 2011 à 21:39 +0800, Weiping Pan(潘卫平) a écrit :
>> From: Pan Weiping <panweiping3@gmail.com>
>>
>> A bug of bonding was invloved by e815d19ffe02bdfda1260949ef2b1806171,
>> see example 1 and 2.
>>
>
> I cant find e815d19ffe02bdfda1260949ef2b1806171 in net-next-2.6
>
> but I do find 1c5cae815d19ffe02bdfda1260949ef2b1806171
>
> Please always use following when referring to a commit :
>
> ... in commit 1c5cae815d19 (net: call dev_alloc_name from
> register_netdevice) ...
>
> - just limit to _first_ 12 chars, no need to have full length
> - give the commit title
Pan, please fix this commit reference up and resubmit your patch.
^ permalink raw reply
* Re: [PATCH] net: af_packet: Don't initialize vnet_hdr
From: David Miller @ 2011-05-12 21:36 UTC (permalink / raw)
To: joe; +Cc: linux-kernel, netdev
In-Reply-To: <1305236000.6124.67.camel@Joe-Laptop>
From: Joe Perches <joe@perches.com>
Date: Thu, 12 May 2011 14:33:20 -0700
> On Thu, 2011-05-12 at 17:26 -0400, David Miller wrote:
>> From: Joe Perches <joe@perches.com>
>> Date: Thu, 12 May 2011 13:36:10 -0700
>>
>> > Save a memset, initialize only the portion necessary.
>> >
>> > packet_snd either gets this structure completely from
>> > memcpy_fromiovec or uses only the hdr_len set to 0,
>> > so don't always initialize the structure to 0.
>> >
>> > Signed-off-by: Joe Perches <joe@perches.com>
>>
>> On ARM this won't be tightly packed, therefore you'll leave
>> uninitialized pieces of padding in this structure and this
>> thing is an "on-the-wire" network header.
>>
>> I'm not applying this.
>
> I believe that it's only sent when po->has_vnet_hdr
> is set. In that case, it's completely filled from
> memcpy_fromiovec. In the not set po->has_vnet_hdr case,
> only vnet_hdr.hdr_len is accessed by packet_alloc_skb.
I think with the way this code is protecting accesses to vnet_hdr,
it's going to start warning that some parts "may" be use
uninitialized.
It's also slightly ugly to partially initialize these on-stack things.
I would rather see the code rearranged such that this sort of
hackish scheme isn't necessary.
Again, I'm not applying this.
^ permalink raw reply
* Re: [PATCH] net: af_packet: Don't initialize vnet_hdr
From: Joe Perches @ 2011-05-12 21:33 UTC (permalink / raw)
To: David Miller; +Cc: linux-kernel, netdev
In-Reply-To: <20110512.172623.220889608152651989.davem@davemloft.net>
On Thu, 2011-05-12 at 17:26 -0400, David Miller wrote:
> From: Joe Perches <joe@perches.com>
> Date: Thu, 12 May 2011 13:36:10 -0700
>
> > Save a memset, initialize only the portion necessary.
> >
> > packet_snd either gets this structure completely from
> > memcpy_fromiovec or uses only the hdr_len set to 0,
> > so don't always initialize the structure to 0.
> >
> > Signed-off-by: Joe Perches <joe@perches.com>
>
> On ARM this won't be tightly packed, therefore you'll leave
> uninitialized pieces of padding in this structure and this
> thing is an "on-the-wire" network header.
>
> I'm not applying this.
I believe that it's only sent when po->has_vnet_hdr
is set. In that case, it's completely filled from
memcpy_fromiovec. In the not set po->has_vnet_hdr case,
only vnet_hdr.hdr_len is accessed by packet_alloc_skb.
cheers, Joe
^ permalink raw reply
* Re: [PATCH 2/2] sctp: sctp_sendmsg: Don't test known non-null sinfo
From: David Miller @ 2011-05-12 21:31 UTC (permalink / raw)
To: joe; +Cc: vladislav.yasevich, sri, linux-sctp, netdev, linux-kernel
In-Reply-To: <b6372a0ac574e3fd110de57eb3e41d97c73d5423.1305227621.git.joe@perches.com>
From: Joe Perches <joe@perches.com>
Date: Thu, 12 May 2011 12:19:10 -0700
> It's already known non-null above.
>
> Signed-off-by: Joe Perches <joe@perches.com>
Applied.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox