> > Thus, I believe, for IP stack it is wise to have IP header aligned by > > drivers. I warn once, so it do not flood system log with messages. > > It is wise only on systems that need it, and most can (albeit > expensively) handle the unaligned access, so it is absolutely > not a requirement in those cases. > > Look, the point still stands, this thing is going to crap into > people's kernel logs and that is not acceptable. > > Furthermore, there are drivers that do alignment conditionally > based upon whether the platform can handle it transparently or > not. They do this because fixing the alignment might result > in expensive copies. > > So these drivers will always generate warnings, even though it > is entirely intentional. > > This is just a bad idea, sorry. And anyone who is truly interested in > this kind of work can add this as a temporary debugging patch to their > tree during development. > There are several aspects. 1: I agree that there is platforms that can handle unaligned access. But, there are others that can't. And, on platforms that can't unaligned IP header will lead to incorrect data processing. I want to deal with this issue. So, in this case, I can check alignment and, if platform can't handle unaligned loads, issue error message once and drop unaligned frames always. 2: Even for platforms that can do unaligned loads, overhead is not zero. If it is easy to modify driver to align data without overhead for frame copy, it is worth to do so. In this case, warn once don't seems to be that bad. Drivers that intentionally deliver unaligned data will generate one line in syslog, is it critical? This warning may be put under CONFIG_DEBUG_KERNEL. It will help to identify problem in driver for those who have no platform w/o unaligned loads. Comments? - To unsubscribe from this list: send the line "unsubscribe linux-net" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html