[ewg] Re: [ofa-general] [PATCH v2] IB/ipoib: copy small SKBs in CM mode
Roland Dreier
rdreier at cisco.com
Tue May 27 13:00:17 PDT 2008
thanks, applied for 2.6.27...
> + /*
> + * we rely on this condition when copying small skbs and we
> + * pass ownership of the first fragment only.
> + */
> + if (SKB_TSHOLD > IPOIB_CM_HEAD_SIZE) {
> + printk("%s: SKB_TSHOLD(%d) must not be larger then %d\n",
> + THIS_MODULE->name, SKB_TSHOLD, IPOIB_CM_HEAD_SIZE);
> + return -EINVAL;
> + }
I changed this to a build bug, to avoid waiting until runtime to notice
this problem:
+ /*
+ * When copying small received packets, we only copy from the
+ * linear data part of the SKB, so we rely on this condition.
+ */
+ BUILD_BUG_ON(IPOIB_CM_COPYBREAK > IPOIB_CM_HEAD_SIZE);
More information about the ewg
mailing list