* [PATCH 1/2] fixup! net/macb: Adding comments to various #defs to make interpretation easier
From: Xander Huff @ 2015-01-14 20:21 UTC (permalink / raw)
To: nicolas.ferre, netdev, davem
Cc: jaeden.amero, rich.tollerton, ben.shelton, brad.mouring,
linux-kernel, cyrille.pitchen, Xander Huff
In-Reply-To: <54B690F5.5080308@atmel.com>
Signed-off-by: Xander Huff <xander.huff@ni.com>
---
drivers/net/ethernet/cadence/macb.h | 107 +++++++++---------------------------
1 file changed, 26 insertions(+), 81 deletions(-)
diff --git a/drivers/net/ethernet/cadence/macb.h b/drivers/net/ethernet/cadence/macb.h
index 378b218..d7b93d0 100644
--- a/drivers/net/ethernet/cadence/macb.h
+++ b/drivers/net/ethernet/cadence/macb.h
@@ -275,9 +275,7 @@
#define MACB_THALT_SIZE 1
#define MACB_NCR_TPF_OFFSET 11 /* Transmit pause frame */
#define MACB_NCR_TPF_SIZE 1
-#define MACB_TZQ_OFFSET 12 /* Transmit zero quantum
- * pause frame
- */
+#define MACB_TZQ_OFFSET 12 /* Transmit zero quantum pause frame */
#define MACB_TZQ_SIZE 1
/* Bitfields in NCFGR */
@@ -299,9 +297,7 @@
#define MACB_UNI_SIZE 1
#define MACB_BIG_OFFSET 8 /* Receive 1536 byte frames */
#define MACB_BIG_SIZE 1
-#define MACB_EAE_OFFSET 9 /* External address match
- * enable
- */
+#define MACB_EAE_OFFSET 9 /* External address match enable */
#define MACB_EAE_SIZE 1
#define MACB_CLK_OFFSET 10
#define MACB_CLK_SIZE 2
@@ -313,9 +309,7 @@
#define MACB_RM9200_RMII_SIZE 1 /* AT91RM9200 only */
#define MACB_RBOF_OFFSET 14 /* Receive buffer offset */
#define MACB_RBOF_SIZE 2
-#define MACB_RLCE_OFFSET 16 /* Length field error frame
- * discard
- */
+#define MACB_RLCE_OFFSET 16 /* Length field error frame discard */
#define MACB_RLCE_SIZE 1
#define MACB_DRFCS_OFFSET 17 /* FCS remove */
#define MACB_DRFCS_SIZE 1
@@ -335,41 +329,22 @@
#define GEM_RXCOEN_SIZE 1
/* Constants for data bus width. */
-#define GEM_DBW32 0 /* 32 bit AMBA AHB data bus
- * width
- */
-#define GEM_DBW64 1 /* 64 bit AMBA AHB data bus
- * width
- */
-#define GEM_DBW128 2 /* 128 bit AMBA AHB data bus
- * width
- */
+#define GEM_DBW32 0 /* 32 bit AMBA AHB data bus width */
+#define GEM_DBW64 1 /* 64 bit AMBA AHB data bus width */
+#define GEM_DBW128 2 /* 128 bit AMBA AHB data bus width */
/* Bitfields in DMACFG. */
-#define GEM_FBLDO_OFFSET 0 /* AHB fixed burst length for
- * DMA data operations
- */
+#define GEM_FBLDO_OFFSET 0 /* AHB fixed burst length for DMA data operations */
#define GEM_FBLDO_SIZE 5
-#define GEM_ENDIA_OFFSET 7 /* AHB endian swap mode enable
- * for packet data accesses
- */
+#define GEM_ENDIA_OFFSET 7 /* AHB endian swap mode enable for packet data accesses */
#define GEM_ENDIA_SIZE 1
-#define GEM_RXBMS_OFFSET 8 /* Receiver packet buffer
- * memory size select
- */
+#define GEM_RXBMS_OFFSET 8 /* Receiver packet buffer memory size select */
#define GEM_RXBMS_SIZE 2
-#define GEM_TXPBMS_OFFSET 10 /* Transmitter packet buffer
- * memory size select
- */
+#define GEM_TXPBMS_OFFSET 10 /* Transmitter packet buffer memory size select */
#define GEM_TXPBMS_SIZE 1
-#define GEM_TXCOEN_OFFSET 11 /* Transmitter IP, TCP and
- * UDP checksum generation
- * offload enable
- */
+#define GEM_TXCOEN_OFFSET 11 /* Transmitter IP, TCP and UDP checksum generation offload enable */
#define GEM_TXCOEN_SIZE 1
-#define GEM_RXBS_OFFSET 16 /* DMA receive buffer size in
- * AHB system memory
- */
+#define GEM_RXBS_OFFSET 16 /* DMA receive buffer size in AHB system memory */
#define GEM_RXBS_SIZE 8
#define GEM_DDRP_OFFSET 24 /* disc_when_no_ahb */
#define GEM_DDRP_SIZE 1
@@ -378,13 +353,9 @@
/* Bitfields in NSR */
#define MACB_NSR_LINK_OFFSET 0 /* pcs_link_state */
#define MACB_NSR_LINK_SIZE 1
-#define MACB_MDIO_OFFSET 1 /* status of the mdio_in
- * pin
- */
+#define MACB_MDIO_OFFSET 1 /* status of the mdio_in pin */
#define MACB_MDIO_SIZE 1
-#define MACB_IDLE_OFFSET 2 /* The PHY management logic is
- * idle (i.e. has completed)
- */
+#define MACB_IDLE_OFFSET 2 /* The PHY management logic is idle (i.e. has completed) */
#define MACB_IDLE_SIZE 1
/* Bitfields in TSR */
@@ -396,9 +367,7 @@
#define MACB_TSR_RLE_SIZE 1
#define MACB_TGO_OFFSET 3 /* Transmit go */
#define MACB_TGO_SIZE 1
-#define MACB_BEX_OFFSET 4 /* Transmit frame corruption
- * due to AHB error
- */
+#define MACB_BEX_OFFSET 4 /* Transmit frame corruption due to AHB error */
#define MACB_BEX_SIZE 1
#define MACB_RM9200_BNQ_OFFSET 4 /* AT91RM9200 only */
#define MACB_RM9200_BNQ_SIZE 1 /* AT91RM9200 only */
@@ -424,43 +393,23 @@
#define MACB_RXUBR_SIZE 1
#define MACB_TXUBR_OFFSET 3 /* TX used bit read */
#define MACB_TXUBR_SIZE 1
-#define MACB_ISR_TUND_OFFSET 4 /* Enable trnasmit buffer
- * under run interrupt
- */
+#define MACB_ISR_TUND_OFFSET 4 /* Enable trnasmit buffer under run interrupt */
#define MACB_ISR_TUND_SIZE 1
-#define MACB_ISR_RLE_OFFSET 5 /* Enable retry limit exceeded
- * or late collision interrupt
- */
+#define MACB_ISR_RLE_OFFSET 5 /* Enable retry limit exceeded or late collision interrupt */
#define MACB_ISR_RLE_SIZE 1
-#define MACB_TXERR_OFFSET 6 /* Enable transmit frame
- * corruption due to AHB error
- * interrupt
- */
+#define MACB_TXERR_OFFSET 6 /* Enable transmit frame corruption due to AHB error interrupt */
#define MACB_TXERR_SIZE 1
-#define MACB_TCOMP_OFFSET 7 /* Enable transmit complete
- * interrupt
- */
+#define MACB_TCOMP_OFFSET 7 /* Enable transmit complete interrupt */
#define MACB_TCOMP_SIZE 1
-#define MACB_ISR_LINK_OFFSET 9 /* Enable link change
- * interrupt
- */
+#define MACB_ISR_LINK_OFFSET 9 /* Enable link change interrupt */
#define MACB_ISR_LINK_SIZE 1
-#define MACB_ISR_ROVR_OFFSET 10 /* Enable receive overrun
- * interrupt
- */
+#define MACB_ISR_ROVR_OFFSET 10 /* Enable receive overrun interrupt */
#define MACB_ISR_ROVR_SIZE 1
-#define MACB_HRESP_OFFSET 11 /* Enable hrsep not OK
- * interrupt
- */
+#define MACB_HRESP_OFFSET 11 /* Enable hrsep not OK interrupt */
#define MACB_HRESP_SIZE 1
-#define MACB_PFR_OFFSET 12 /* Enable pause frame with
- * non-zero pause quantum
- * interrupt
- */
+#define MACB_PFR_OFFSET 12 /* Enable pause frame with non-zero pause quantum interrupt */
#define MACB_PFR_SIZE 1
-#define MACB_PTZ_OFFSET 13 /* Enable pause time zero
- * interrupt
- */
+#define MACB_PTZ_OFFSET 13 /* Enable pause time zero interrupt */
#define MACB_PTZ_SIZE 1
/* Bitfields in MAN */
@@ -472,13 +421,9 @@
#define MACB_REGA_SIZE 5
#define MACB_PHYA_OFFSET 23 /* PHY address */
#define MACB_PHYA_SIZE 5
-#define MACB_RW_OFFSET 28 /* Operation. 10 is read. 01
- * is write.
- */
+#define MACB_RW_OFFSET 28 /* Operation. 10 is read. 01 is write. */
#define MACB_RW_SIZE 2
-#define MACB_SOF_OFFSET 30 /* Must be written to 1 for
- * Clause 22 operation
- */
+#define MACB_SOF_OFFSET 30 /* Must be written to 1 for Clause 22 operation */
#define MACB_SOF_SIZE 2
/* Bitfields in USRIO (AVR32) */
--
1.9.1
^ permalink raw reply related
* [PATCH 2/2] fixup! net/macb: improved ethtool statistics support
From: Xander Huff @ 2015-01-14 20:21 UTC (permalink / raw)
To: nicolas.ferre, netdev, davem
Cc: jaeden.amero, rich.tollerton, ben.shelton, brad.mouring,
linux-kernel, cyrille.pitchen, Xander Huff
In-Reply-To: <1421266881-17314-1-git-send-email-xander.huff@ni.com>
Signed-off-by: Xander Huff <xander.huff@ni.com>
---
drivers/net/ethernet/cadence/macb.c | 25 +++--
drivers/net/ethernet/cadence/macb.h | 203 +++++++++---------------------------
2 files changed, 68 insertions(+), 160 deletions(-)
diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
index dd8c202..f60f8f8 100644
--- a/drivers/net/ethernet/cadence/macb.c
+++ b/drivers/net/ethernet/cadence/macb.c
@@ -1832,15 +1832,15 @@ static void gem_update_stats(struct macb *bp)
for (i = 0; i < GEM_STATS_LEN; ++i, ++p) {
u32 offset = gem_statistics[i].offset;
- u64 val = __raw_readl(bp->regs+offset);
+ u64 val = __raw_readl(bp->regs + offset);
bp->ethtool_stats[i] += val;
*p += val;
if (offset == GEM_OCTTXL || offset == GEM_OCTRXL) {
/* Add GEM_OCTTXH, GEM_OCTRXH */
- val = __raw_readl(bp->regs+offset+4);
- bp->ethtool_stats[i] += ((u64)val)<<32;
+ val = __raw_readl(bp->regs+offset + 4);
+ bp->ethtool_stats[i] += ((u64)val) << 32;
*(++p) += val;
}
}
@@ -1891,7 +1891,7 @@ static void gem_get_ethtool_stats(struct net_device *dev,
bp = netdev_priv(dev);
gem_update_stats(bp);
- memcpy(data, &bp->ethtool_stats, sizeof(u64)*GEM_STATS_LEN);
+ memcpy(data, &bp->ethtool_stats, sizeof(u64) * GEM_STATS_LEN);
}
static int gem_get_sset_count(struct net_device *dev, int sset)
@@ -2032,11 +2032,21 @@ const struct ethtool_ops macb_ethtool_ops = {
.get_regs = macb_get_regs,
.get_link = ethtool_op_get_link,
.get_ts_info = ethtool_op_get_ts_info,
+};
+EXPORT_SYMBOL_GPL(macb_ethtool_ops);
+
+const struct ethtool_ops gem_ethtool_ops = {
+ .get_settings = macb_get_settings,
+ .set_settings = macb_set_settings,
+ .get_regs_len = macb_get_regs_len,
+ .get_regs = macb_get_regs,
+ .get_link = ethtool_op_get_link,
+ .get_ts_info = ethtool_op_get_ts_info,
.get_ethtool_stats = gem_get_ethtool_stats,
.get_strings = gem_get_ethtool_strings,
.get_sset_count = gem_get_sset_count,
};
-EXPORT_SYMBOL_GPL(macb_ethtool_ops);
+EXPORT_SYMBOL_GPL(gem_ethtool_ops);
int macb_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
{
@@ -2325,7 +2335,10 @@ static int __init macb_probe(struct platform_device *pdev)
dev->netdev_ops = &macb_netdev_ops;
netif_napi_add(dev, &bp->napi, macb_poll, 64);
- dev->ethtool_ops = &macb_ethtool_ops;
+ if (macb_is_gem(bp))
+ dev->ethtool_ops = &gem_ethtool_ops;
+ else
+ dev->ethtool_ops = &macb_ethtool_ops;
dev->base_addr = regs->start;
diff --git a/drivers/net/ethernet/cadence/macb.h b/drivers/net/ethernet/cadence/macb.h
index d7b93d0..2ea5355 100644
--- a/drivers/net/ethernet/cadence/macb.h
+++ b/drivers/net/ethernet/cadence/macb.h
@@ -82,159 +82,52 @@
#define GEM_SA4B 0x00A0 /* Specific4 Bottom */
#define GEM_SA4T 0x00A4 /* Specific4 Top */
#define GEM_OTX 0x0100 /* Octets transmitted */
-#define GEM_OCTTXL 0x0100 /* Octets transmitted
- * [31:0]
- */
-#define GEM_OCTTXH 0x0104 /* Octets transmitted
- * [47:32]
- */
-#define GEM_TXCNT 0x0108 /* Error-free Frames
- * Transmitted counter
- */
-#define GEM_TXBCCNT 0x010c /* Error-free Broadcast
- * Frames counter
- */
-#define GEM_TXMCCNT 0x0110 /* Error-free Multicast
- * Frames counter
- */
-#define GEM_TXPAUSECNT 0x0114 /* Pause Frames
- * Transmitted Counter
- */
-#define GEM_TX64CNT 0x0118 /* Error-free 64 byte
- * Frames Transmitted
- * counter
- */
-#define GEM_TX65CNT 0x011c /* Error-free 65-127 byte
- * Frames Transmitted
- * counter
- */
-#define GEM_TX128CNT 0x0120 /* Error-free 128-255
- * byte Frames
- * Transmitted counter
- */
-#define GEM_TX256CNT 0x0124 /* Error-free 256-511
- * byte Frames
- * transmitted counter
- */
-#define GEM_TX512CNT 0x0128 /* Error-free 512-1023
- * byte Frames
- * transmitted counter
- */
-#define GEM_TX1024CNT 0x012c /* Error-free 1024-1518
- * byte Frames
- * transmitted counter
- */
-#define GEM_TX1519CNT 0x0130 /* Error-free larger than
- * 1519 byte Frames
- * tranmitted counter
- */
-#define GEM_TXURUNCNT 0x0134 /* TX under run error
- * counter
- */
-#define GEM_SNGLCOLLCNT 0x0138 /* Single Collision Frame
- * Counter
- */
-#define GEM_MULTICOLLCNT 0x013c /* Multiple Collision
- * Frame Counter
- */
-#define GEM_EXCESSCOLLCNT 0x0140 /* Excessive Collision
- * Frame Counter
- */
-#define GEM_LATECOLLCNT 0x0144 /* Late Collision Frame
- * Counter
- */
-#define GEM_TXDEFERCNT 0x0148 /* Deferred Transmission
- * Frame Counter
- */
-#define GEM_TXCSENSECNT 0x014c /* Carrier Sense Error
- * Counter
- */
+#define GEM_OCTTXL 0x0100 /* Octets transmitted [31:0] */
+#define GEM_OCTTXH 0x0104 /* Octets transmitted [47:32] */
+#define GEM_TXCNT 0x0108 /* Error-free Frames Transmitted counter */
+#define GEM_TXBCCNT 0x010c /* Error-free Broadcast Frames counter */
+#define GEM_TXMCCNT 0x0110 /* Error-free Multicast Frames counter */
+#define GEM_TXPAUSECNT 0x0114 /* Pause Frames Transmitted Counter */
+#define GEM_TX64CNT 0x0118 /* Error-free 64 byte Frames Transmitted counter */
+#define GEM_TX65CNT 0x011c /* Error-free 65-127 byte Frames Transmitted counter */
+#define GEM_TX128CNT 0x0120 /* Error-free 128-255 byte Frames Transmitted counter */
+#define GEM_TX256CNT 0x0124 /* Error-free 256-511 byte Frames transmitted counter */
+#define GEM_TX512CNT 0x0128 /* Error-free 512-1023 byte Frames transmitted counter */
+#define GEM_TX1024CNT 0x012c /* Error-free 1024-1518 byte Frames transmitted counter */
+#define GEM_TX1519CNT 0x0130 /* Error-free larger than 1519 byte Frames tranmitted counter */
+#define GEM_TXURUNCNT 0x0134 /* TX under run error counter */
+#define GEM_SNGLCOLLCNT 0x0138 /* Single Collision Frame Counter */
+#define GEM_MULTICOLLCNT 0x013c /* Multiple Collision Frame Counter */
+#define GEM_EXCESSCOLLCNT 0x0140 /* Excessive Collision Frame Counter */
+#define GEM_LATECOLLCNT 0x0144 /* Late Collision Frame Counter */
+#define GEM_TXDEFERCNT 0x0148 /* Deferred Transmission Frame Counter */
+#define GEM_TXCSENSECNT 0x014c /* Carrier Sense Error Counter */
#define GEM_ORX 0x0150 /* Octets received */
-#define GEM_OCTRXL 0x0150 /* Octets received
- * [31:0]
- */
-#define GEM_OCTRXH 0x0154 /* Octets received
- * [47:32]
- */
-#define GEM_RXCNT 0x0158 /* Error-free Frames
- * Received Counter
- */
-#define GEM_RXBROADCNT 0x015c /* Error-free Broadcast
- * Frames Received
- * Counter
- */
-#define GEM_RXMULTICNT 0x0160 /* Error-free Multicast
- * Frames Received
- * Counter
- */
-#define GEM_RXPAUSECNT 0x0164 /* Error-free Pause
- * Frames Received
- * Counter
- */
-#define GEM_RX64CNT 0x0168 /* Error-free 64 byte
- * Frames Received
- * Counter
- */
-#define GEM_RX65CNT 0x016c /* Error-free 65-127 byte
- * Frames Received
- * Counter
- */
-#define GEM_RX128CNT 0x0170 /* Error-free 128-255
- * byte Frames Received
- * Counter
- */
-#define GEM_RX256CNT 0x0174 /* Error-free 256-511
- * byte Frames Received
- * Counter
- */
-#define GEM_RX512CNT 0x0178 /* Error-free 512-1023
- * byte Frames Received
- * Counter
- */
-#define GEM_RX1024CNT 0x017c /* Error-free 1024-1518
- * byte Frames Received
- * Counter
- */
-#define GEM_RX1519CNT 0x0180 /* Error-free larger than
- * 1519 Frames Received
- * Counter
- */
-#define GEM_RXUNDRCNT 0x0184 /* Undersize Frames
- * Received Counter
- */
-#define GEM_RXOVRCNT 0x0188 /* Oversize Frames
- * Received Counter
- */
-#define GEM_RXJABCNT 0x018c /* Jabbers Received
- * Counter
- */
-#define GEM_RXFCSCNT 0x0190 /* Frame Check Sequence
- * Error Counter
- */
-#define GEM_RXLENGTHCNT 0x0194 /* Length Field Error
- * Counter
- */
-#define GEM_RXSYMBCNT 0x0198 /* Symbol Error
- * Counter
- */
-#define GEM_RXALIGNCNT 0x019c /* Alignment Error
- * Counter
- */
-#define GEM_RXRESERRCNT 0x01a0 /* Receive Resource Error
- * Counter
- */
-#define GEM_RXORCNT 0x01a4 /* Receive Overrun
- * Counter
- */
-#define GEM_RXIPCCNT 0x01a8 /* IP header Checksum
- * Error Counter
- */
-#define GEM_RXTCPCCNT 0x01ac /* TCP Checksum Error
- * Counter
- */
-#define GEM_RXUDPCCNT 0x01b0 /* UDP Checksum Error
- * Counter
- */
+#define GEM_OCTRXL 0x0150 /* Octets received [31:0] */
+#define GEM_OCTRXH 0x0154 /* Octets received [47:32] */
+#define GEM_RXCNT 0x0158 /* Error-free Frames Received Counter */
+#define GEM_RXBROADCNT 0x015c /* Error-free Broadcast Frames Received Counter */
+#define GEM_RXMULTICNT 0x0160 /* Error-free Multicast Frames Received Counter */
+#define GEM_RXPAUSECNT 0x0164 /* Error-free Pause Frames Received Counter */
+#define GEM_RX64CNT 0x0168 /* Error-free 64 byte Frames Received Counter */
+#define GEM_RX65CNT 0x016c /* Error-free 65-127 byte Frames Received Counter */
+#define GEM_RX128CNT 0x0170 /* Error-free 128-255 byte Frames Received Counter */
+#define GEM_RX256CNT 0x0174 /* Error-free 256-511 byte Frames Received Counter */
+#define GEM_RX512CNT 0x0178 /* Error-free 512-1023 byte Frames Received Counter */
+#define GEM_RX1024CNT 0x017c /* Error-free 1024-1518 byte Frames Received Counter */
+#define GEM_RX1519CNT 0x0180 /* Error-free larger than 1519 Frames Received Counter */
+#define GEM_RXUNDRCNT 0x0184 /* Undersize Frames Received Counter */
+#define GEM_RXOVRCNT 0x0188 /* Oversize Frames Received Counter */
+#define GEM_RXJABCNT 0x018c /* Jabbers Received Counter */
+#define GEM_RXFCSCNT 0x0190 /* Frame Check Sequence Error Counter */
+#define GEM_RXLENGTHCNT 0x0194 /* Length Field Error Counter */
+#define GEM_RXSYMBCNT 0x0198 /* Symbol Error Counter */
+#define GEM_RXALIGNCNT 0x019c /* Alignment Error Counter */
+#define GEM_RXRESERRCNT 0x01a0 /* Receive Resource Error Counter */
+#define GEM_RXORCNT 0x01a4 /* Receive Overrun Counter */
+#define GEM_RXIPCCNT 0x01a8 /* IP header Checksum Error Counter */
+#define GEM_RXTCPCCNT 0x01ac /* TCP Checksum Error Counter */
+#define GEM_RXUDPCCNT 0x01b0 /* UDP Checksum Error Counter */
#define GEM_DCFG1 0x0280 /* Design Config 1 */
#define GEM_DCFG2 0x0284 /* Design Config 2 */
#define GEM_DCFG3 0x0288 /* Design Config 3 */
@@ -748,7 +641,8 @@ struct gem_stats {
u32 rx_udp_checksum_errors;
};
-/* Describes the name and offset of an individual statistic register, as
+/*
+ * Describes the name and offset of an individual statistic register, as
* returned by `ethtool -S`. Also describes which net_device_stats statistics
* this register should contribute to.
*/
@@ -778,7 +672,8 @@ struct gem_statistic {
.stat_bits = bits \
}
-/* list of gem statistic registers. The names MUST match the
+/*
+ * list of gem statistic registers. The names MUST match the
* corresponding GEM_* definitions.
*/
static const struct gem_statistic gem_statistics[] = {
--
1.9.1
^ permalink raw reply related
* Re: [PATCH net-next v2 0/2] net: Remote checksum offload for VXLAN
From: David Miller @ 2015-01-14 20:21 UTC (permalink / raw)
To: therbert; +Cc: netdev
In-Reply-To: <1421110838-5146-1-git-send-email-therbert@google.com>
From: Tom Herbert <therbert@google.com>
Date: Mon, 12 Jan 2015 17:00:36 -0800
> This patch set adds support for remote checksum offload in VXLAN.
>
> The remote checksum offload is generalized by creating a common
> function (remcsum_adjust) that does the work of modifying the
> checksum in remote checksum offload. This function can be called
> from normal or GRO path. GUE was modified to use this function.
>
> To support RCO is VXLAN we use the 9th bit in the reserved
> flags to indicated remote checksum offload. The start and offset
> values are encoded n a compressed form in the low order (reserved)
> byte of the vni field.
>
> Remote checksum offload is described in
> https://tools.ietf.org/html/draft-herbert-remotecsumoffload-01
Tom's arguments for why he separates RX and TX paths seem completely
reasonable, and match my own understanding of the various tunneling
technologies we support.
Therefore, series applied, thanks!
^ permalink raw reply
* [PATCH 0/8] netfilter updates for net-next
From: Pablo Neira Ayuso @ 2015-01-14 20:34 UTC (permalink / raw)
To: netfilter-devel; +Cc: davem, netdev
Hi David,
The following patchset contains netfilter updates for net-next, just a
bunch of cleanups and small enhancement to selectively flush conntracks
in ctnetlink, more specifically the patches are:
1) Rise default number of buckets in conntrack from 16384 to 65536 in
systems with >= 4GBytes, patch from Marcelo Leitner.
2) Small refactor to save one level on indentation in xt_osf, from
Joe Perches.
3) Remove unnecessary sizeof(char) in nf_log, from Fabian Frederick.
4) Another small cleanup to remove redundant variable in nfnetlink,
from Duan Jiong.
5) Fix compilation warning in nfnetlink_cthelper on parisc, from
Chen Gang.
6) Fix wrong format in debugging for ctseqadj, from Gao feng.
7) Selective conntrack flushing through the mark for ctnetlink, patch
from Kristian Evensen.
8) Remove nf_ct_conntrack_flush_report() exported symbol now that is
not required anymore after the selective flushing patch, again from
Kristian.
You can pull these changes from:
git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git
Thanks!
----------------------------------------------------------------
The following changes since commit f96fe225677b3efb74346ebd56fafe3997b02afa:
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (2014-12-12 16:11:12 -0800)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master
for you to fetch changes up to ae406bd0572be97a46d72e8a5e97c33c3168388c:
netfilter: conntrack: Remove nf_ct_conntrack_flush_report (2015-01-08 12:16:58 +0100)
----------------------------------------------------------------
Chen Gang (1):
netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings
Duan Jiong (1):
netfilter: nfnetlink: remove redundant variable nskb
Fabian Frederick (1):
netfilter: log: remove unnecessary sizeof(char)
Gao feng (1):
netfilter: nf_ct_seqadj: print ack seq in the right host byte order
Joe Perches (1):
netfilter: xt_osf: Use continue to reduce indentation
Kristian Evensen (2):
netfilter: conntrack: Flush connections with a given mark
netfilter: conntrack: Remove nf_ct_conntrack_flush_report
Marcelo Leitner (1):
netfilter: conntrack: adjust nf_conntrack_buckets default value
Documentation/networking/nf_conntrack-sysctl.txt | 3 +-
include/net/netfilter/nf_conntrack.h | 2 -
net/netfilter/nf_conntrack_core.c | 17 +--
net/netfilter/nf_conntrack_netlink.c | 89 ++++++++----
net/netfilter/nf_conntrack_seqadj.c | 6 +-
net/netfilter/nf_log.c | 3 +-
net/netfilter/nfnetlink.c | 15 +-
net/netfilter/nfnetlink_cthelper.c | 4 +-
net/netfilter/xt_osf.c | 169 +++++++++++-----------
9 files changed, 172 insertions(+), 136 deletions(-)
^ permalink raw reply
* [PATCH 4/8] netfilter: nfnetlink: remove redundant variable nskb
From: Pablo Neira Ayuso @ 2015-01-14 20:34 UTC (permalink / raw)
To: netfilter-devel; +Cc: davem, netdev
In-Reply-To: <1421267689-24894-1-git-send-email-pablo@netfilter.org>
From: Duan Jiong <duanj.fnst@cn.fujitsu.com>
Actually after netlink_skb_clone() is called, the nskb and
skb will point to the same thing, but they are used just like
they are different, sometimes this is confusing, so i think
there is no necessary to keep nskb anymore.
Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>
Signed-off-by: Pablo Neira Ayuso <pablo@soleta.eu>
---
net/netfilter/nfnetlink.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/net/netfilter/nfnetlink.c b/net/netfilter/nfnetlink.c
index 13c2e17..a7a7e82 100644
--- a/net/netfilter/nfnetlink.c
+++ b/net/netfilter/nfnetlink.c
@@ -272,7 +272,7 @@ static void nfnl_err_deliver(struct list_head *err_list, struct sk_buff *skb)
static void nfnetlink_rcv_batch(struct sk_buff *skb, struct nlmsghdr *nlh,
u_int16_t subsys_id)
{
- struct sk_buff *nskb, *oskb = skb;
+ struct sk_buff *oskb = skb;
struct net *net = sock_net(skb->sk);
const struct nfnetlink_subsystem *ss;
const struct nfnl_callback *nc;
@@ -283,12 +283,11 @@ static void nfnetlink_rcv_batch(struct sk_buff *skb, struct nlmsghdr *nlh,
if (subsys_id >= NFNL_SUBSYS_COUNT)
return netlink_ack(skb, nlh, -EINVAL);
replay:
- nskb = netlink_skb_clone(oskb, GFP_KERNEL);
- if (!nskb)
+ skb = netlink_skb_clone(oskb, GFP_KERNEL);
+ if (!skb)
return netlink_ack(oskb, nlh, -ENOMEM);
- nskb->sk = oskb->sk;
- skb = nskb;
+ skb->sk = oskb->sk;
nfnl_lock(subsys_id);
ss = rcu_dereference_protected(table[subsys_id].subsys,
@@ -305,7 +304,7 @@ replay:
{
nfnl_unlock(subsys_id);
netlink_ack(skb, nlh, -EOPNOTSUPP);
- return kfree_skb(nskb);
+ return kfree_skb(skb);
}
}
@@ -385,7 +384,7 @@ replay:
nfnl_err_reset(&err_list);
ss->abort(oskb);
nfnl_unlock(subsys_id);
- kfree_skb(nskb);
+ kfree_skb(skb);
goto replay;
}
}
@@ -426,7 +425,7 @@ done:
nfnl_err_deliver(&err_list, oskb);
nfnl_unlock(subsys_id);
- kfree_skb(nskb);
+ kfree_skb(skb);
}
static void nfnetlink_rcv(struct sk_buff *skb)
--
1.7.10.4
^ permalink raw reply related
* [PATCH 5/8] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings
From: Pablo Neira Ayuso @ 2015-01-14 20:34 UTC (permalink / raw)
To: netfilter-devel; +Cc: davem, netdev
In-Reply-To: <1421267689-24894-1-git-send-email-pablo@netfilter.org>
From: Chen Gang <gang.chen.5i5j@gmail.com>
The related code can be simplified, and also can avoid related warnings
(with allmodconfig under parisc):
CC [M] net/netfilter/nfnetlink_cthelper.o
net/netfilter/nfnetlink_cthelper.c: In function ‘nfnl_cthelper_from_nlattr’:
net/netfilter/nfnetlink_cthelper.c:97:9: warning: passing argument 1 o ‘memcpy’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-array-qualifiers]
memcpy(&help->data, nla_data(attr), help->helper->data_len);
^
In file included from include/linux/string.h:17:0,
from include/uapi/linux/uuid.h:25,
from include/linux/uuid.h:23,
from include/linux/mod_devicetable.h:12,
from ./arch/parisc/include/asm/hardware.h:4,
from ./arch/parisc/include/asm/processor.h:15,
from ./arch/parisc/include/asm/spinlock.h:6,
from ./arch/parisc/include/asm/atomic.h:21,
from include/linux/atomic.h:4,
from ./arch/parisc/include/asm/bitops.h:12,
from include/linux/bitops.h:36,
from include/linux/kernel.h:10,
from include/linux/list.h:8,
from include/linux/module.h:9,
from net/netfilter/nfnetlink_cthelper.c:11:
./arch/parisc/include/asm/string.h:8:8: note: expected ‘void *’ but argument is of type ‘const char (*)[]’
void * memcpy(void * dest,const void *src,size_t count);
^
Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@soleta.eu>
---
net/netfilter/nfnetlink_cthelper.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/netfilter/nfnetlink_cthelper.c b/net/netfilter/nfnetlink_cthelper.c
index 9e287cb..a5599fc 100644
--- a/net/netfilter/nfnetlink_cthelper.c
+++ b/net/netfilter/nfnetlink_cthelper.c
@@ -86,7 +86,7 @@ nfnl_cthelper_parse_tuple(struct nf_conntrack_tuple *tuple,
static int
nfnl_cthelper_from_nlattr(struct nlattr *attr, struct nf_conn *ct)
{
- const struct nf_conn_help *help = nfct_help(ct);
+ struct nf_conn_help *help = nfct_help(ct);
if (attr == NULL)
return -EINVAL;
@@ -94,7 +94,7 @@ nfnl_cthelper_from_nlattr(struct nlattr *attr, struct nf_conn *ct)
if (help->helper->data_len == 0)
return -EINVAL;
- memcpy(&help->data, nla_data(attr), help->helper->data_len);
+ memcpy(help->data, nla_data(attr), help->helper->data_len);
return 0;
}
--
1.7.10.4
^ permalink raw reply related
* [PATCH 6/8] netfilter: nf_ct_seqadj: print ack seq in the right host byte order
From: Pablo Neira Ayuso @ 2015-01-14 20:34 UTC (permalink / raw)
To: netfilter-devel; +Cc: davem, netdev
In-Reply-To: <1421267689-24894-1-git-send-email-pablo@netfilter.org>
From: Gao feng <gaofeng@cn.fujitsu.com>
new_start_seq and new_end_seq are network byte order,
print the host byte order in debug message and print
seq number as the type of unsigned int.
Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
Signed-off-by: Pablo Neira Ayuso <pablo@soleta.eu>
---
net/netfilter/nf_conntrack_seqadj.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/netfilter/nf_conntrack_seqadj.c b/net/netfilter/nf_conntrack_seqadj.c
index f6e2ae9..ce3e840c8 100644
--- a/net/netfilter/nf_conntrack_seqadj.c
+++ b/net/netfilter/nf_conntrack_seqadj.c
@@ -98,9 +98,9 @@ static void nf_ct_sack_block_adjust(struct sk_buff *skb,
new_end_seq = htonl(ntohl(sack->end_seq) -
seq->offset_before);
- pr_debug("sack_adjust: start_seq: %d->%d, end_seq: %d->%d\n",
- ntohl(sack->start_seq), new_start_seq,
- ntohl(sack->end_seq), new_end_seq);
+ pr_debug("sack_adjust: start_seq: %u->%u, end_seq: %u->%u\n",
+ ntohl(sack->start_seq), ntohl(new_start_seq),
+ ntohl(sack->end_seq), ntohl(new_end_seq));
inet_proto_csum_replace4(&tcph->check, skb,
sack->start_seq, new_start_seq, 0);
--
1.7.10.4
^ permalink raw reply related
* [PATCH 3/8] netfilter: log: remove unnecessary sizeof(char)
From: Pablo Neira Ayuso @ 2015-01-14 20:34 UTC (permalink / raw)
To: netfilter-devel; +Cc: davem, netdev
In-Reply-To: <1421267689-24894-1-git-send-email-pablo@netfilter.org>
From: Fabian Frederick <fabf@skynet.be>
sizeof(char) is always 1.
Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
net/netfilter/nf_log.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c
index 43c926c..0d8448f 100644
--- a/net/netfilter/nf_log.c
+++ b/net/netfilter/nf_log.c
@@ -425,8 +425,7 @@ static int netfilter_log_sysctl_init(struct net *net)
nf_log_sysctl_table[i].procname =
nf_log_sysctl_fnames[i];
nf_log_sysctl_table[i].data = NULL;
- nf_log_sysctl_table[i].maxlen =
- NFLOGGER_NAME_LEN * sizeof(char);
+ nf_log_sysctl_table[i].maxlen = NFLOGGER_NAME_LEN;
nf_log_sysctl_table[i].mode = 0644;
nf_log_sysctl_table[i].proc_handler =
nf_log_proc_dostring;
--
1.7.10.4
^ permalink raw reply related
* [PATCH 8/8] netfilter: conntrack: Remove nf_ct_conntrack_flush_report
From: Pablo Neira Ayuso @ 2015-01-14 20:34 UTC (permalink / raw)
To: netfilter-devel; +Cc: davem, netdev
In-Reply-To: <1421267689-24894-1-git-send-email-pablo@netfilter.org>
From: Kristian Evensen <kristian.evensen@gmail.com>
The only user of nf_ct_conntrack_flush_report() was ctnetlink_del_conntrack().
After adding support for flushing connections with a given mark, this function
is no longer called.
Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
include/net/netfilter/nf_conntrack.h | 2 --
net/netfilter/nf_conntrack_core.c | 6 ------
2 files changed, 8 deletions(-)
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h
index f0daed2..74f271a 100644
--- a/include/net/netfilter/nf_conntrack.h
+++ b/include/net/netfilter/nf_conntrack.h
@@ -191,8 +191,6 @@ __nf_conntrack_find(struct net *net, u16 zone,
int nf_conntrack_hash_check_insert(struct nf_conn *ct);
bool nf_ct_delete(struct nf_conn *ct, u32 pid, int report);
-void nf_conntrack_flush_report(struct net *net, u32 portid, int report);
-
bool nf_ct_get_tuplepr(const struct sk_buff *skb, unsigned int nhoff,
u_int16_t l3num, struct nf_conntrack_tuple *tuple);
bool nf_ct_invert_tuplepr(struct nf_conntrack_tuple *inverse,
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index da58cd4..5a6990b 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -1426,12 +1426,6 @@ void nf_ct_free_hashtable(void *hash, unsigned int size)
}
EXPORT_SYMBOL_GPL(nf_ct_free_hashtable);
-void nf_conntrack_flush_report(struct net *net, u32 portid, int report)
-{
- nf_ct_iterate_cleanup(net, kill_all, NULL, portid, report);
-}
-EXPORT_SYMBOL_GPL(nf_conntrack_flush_report);
-
static int untrack_refs(void)
{
int cnt = 0, cpu;
--
1.7.10.4
^ permalink raw reply related
* [PATCH 1/8] netfilter: conntrack: adjust nf_conntrack_buckets default value
From: Pablo Neira Ayuso @ 2015-01-14 20:34 UTC (permalink / raw)
To: netfilter-devel; +Cc: davem, netdev
In-Reply-To: <1421267689-24894-1-git-send-email-pablo@netfilter.org>
From: Marcelo Leitner <mleitner@redhat.com>
Manually bumping either nf_conntrack_buckets or nf_conntrack_max has
become a common task as our Linux servers tend to serve more and more
clients/applications, so let's adjust nf_conntrack_buckets this to a
more updated value.
Now for systems with more than 4GB of memory, nf_conntrack_buckets
becomes 65536 instead of 16384, resulting in nf_conntrack_max=256k
entries.
Signed-off-by: Marcelo Ricardo Leitner <mleitner@redhat.com>
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
Documentation/networking/nf_conntrack-sysctl.txt | 3 ++-
net/netfilter/nf_conntrack_core.c | 11 ++++++++---
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/Documentation/networking/nf_conntrack-sysctl.txt b/Documentation/networking/nf_conntrack-sysctl.txt
index 70da508..f55599c 100644
--- a/Documentation/networking/nf_conntrack-sysctl.txt
+++ b/Documentation/networking/nf_conntrack-sysctl.txt
@@ -11,7 +11,8 @@ nf_conntrack_buckets - INTEGER (read-only)
Size of hash table. If not specified as parameter during module
loading, the default size is calculated by dividing total memory
by 16384 to determine the number of buckets but the hash table will
- never have fewer than 32 or more than 16384 buckets.
+ never have fewer than 32 and limited to 16384 buckets. For systems
+ with more than 4GB of memory it will be 65536 buckets.
nf_conntrack_checksum - BOOLEAN
0 - disabled
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index a116748..da58cd4 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -1624,13 +1624,18 @@ int nf_conntrack_init_start(void)
for (i = 0; i < CONNTRACK_LOCKS; i++)
spin_lock_init(&nf_conntrack_locks[i]);
- /* Idea from tcp.c: use 1/16384 of memory. On i386: 32MB
- * machine has 512 buckets. >= 1GB machines have 16384 buckets. */
if (!nf_conntrack_htable_size) {
+ /* Idea from tcp.c: use 1/16384 of memory.
+ * On i386: 32MB machine has 512 buckets.
+ * >= 1GB machines have 16384 buckets.
+ * >= 4GB machines have 65536 buckets.
+ */
nf_conntrack_htable_size
= (((totalram_pages << PAGE_SHIFT) / 16384)
/ sizeof(struct hlist_head));
- if (totalram_pages > (1024 * 1024 * 1024 / PAGE_SIZE))
+ if (totalram_pages > (4 * (1024 * 1024 * 1024 / PAGE_SIZE)))
+ nf_conntrack_htable_size = 65536;
+ else if (totalram_pages > (1024 * 1024 * 1024 / PAGE_SIZE))
nf_conntrack_htable_size = 16384;
if (nf_conntrack_htable_size < 32)
nf_conntrack_htable_size = 32;
--
1.7.10.4
^ permalink raw reply related
* [PATCH 2/8] netfilter: xt_osf: Use continue to reduce indentation
From: Pablo Neira Ayuso @ 2015-01-14 20:34 UTC (permalink / raw)
To: netfilter-devel; +Cc: davem, netdev
In-Reply-To: <1421267689-24894-1-git-send-email-pablo@netfilter.org>
From: Joe Perches <joe@perches.com>
Invert logic in test to use continue.
This routine already uses continue, use it a bit more to
minimize > 80 column long lines and unnecessary indentation.
No change in compiled object file.
Other miscellanea:
o Remove trailing whitespace
o Realign arguments to multiline statement
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
net/netfilter/xt_osf.c | 169 ++++++++++++++++++++++++------------------------
1 file changed, 85 insertions(+), 84 deletions(-)
diff --git a/net/netfilter/xt_osf.c b/net/netfilter/xt_osf.c
index c529161..0778855 100644
--- a/net/netfilter/xt_osf.c
+++ b/net/netfilter/xt_osf.c
@@ -225,6 +225,8 @@ xt_osf_match_packet(const struct sk_buff *skb, struct xt_action_param *p)
rcu_read_lock();
list_for_each_entry_rcu(kf, &xt_osf_fingers[df], finger_entry) {
+ int foptsize, optnum;
+
f = &kf->finger;
if (!(info->flags & XT_OSF_LOG) && strcmp(info->genre, f->genre))
@@ -233,110 +235,109 @@ xt_osf_match_packet(const struct sk_buff *skb, struct xt_action_param *p)
optp = _optp;
fmatch = FMATCH_WRONG;
- if (totlen == f->ss && xt_osf_ttl(skb, info, f->ttl)) {
- int foptsize, optnum;
+ if (totlen != f->ss || !xt_osf_ttl(skb, info, f->ttl))
+ continue;
- /*
- * Should not happen if userspace parser was written correctly.
- */
- if (f->wss.wc >= OSF_WSS_MAX)
- continue;
+ /*
+ * Should not happen if userspace parser was written correctly.
+ */
+ if (f->wss.wc >= OSF_WSS_MAX)
+ continue;
- /* Check options */
+ /* Check options */
- foptsize = 0;
- for (optnum = 0; optnum < f->opt_num; ++optnum)
- foptsize += f->opt[optnum].length;
+ foptsize = 0;
+ for (optnum = 0; optnum < f->opt_num; ++optnum)
+ foptsize += f->opt[optnum].length;
- if (foptsize > MAX_IPOPTLEN ||
- optsize > MAX_IPOPTLEN ||
- optsize != foptsize)
- continue;
+ if (foptsize > MAX_IPOPTLEN ||
+ optsize > MAX_IPOPTLEN ||
+ optsize != foptsize)
+ continue;
- check_WSS = f->wss.wc;
+ check_WSS = f->wss.wc;
- for (optnum = 0; optnum < f->opt_num; ++optnum) {
- if (f->opt[optnum].kind == (*optp)) {
- __u32 len = f->opt[optnum].length;
- const __u8 *optend = optp + len;
- int loop_cont = 0;
+ for (optnum = 0; optnum < f->opt_num; ++optnum) {
+ if (f->opt[optnum].kind == (*optp)) {
+ __u32 len = f->opt[optnum].length;
+ const __u8 *optend = optp + len;
+ int loop_cont = 0;
- fmatch = FMATCH_OK;
+ fmatch = FMATCH_OK;
- switch (*optp) {
- case OSFOPT_MSS:
- mss = optp[3];
- mss <<= 8;
- mss |= optp[2];
+ switch (*optp) {
+ case OSFOPT_MSS:
+ mss = optp[3];
+ mss <<= 8;
+ mss |= optp[2];
- mss = ntohs((__force __be16)mss);
- break;
- case OSFOPT_TS:
- loop_cont = 1;
- break;
- }
+ mss = ntohs((__force __be16)mss);
+ break;
+ case OSFOPT_TS:
+ loop_cont = 1;
+ break;
+ }
- optp = optend;
- } else
- fmatch = FMATCH_OPT_WRONG;
+ optp = optend;
+ } else
+ fmatch = FMATCH_OPT_WRONG;
- if (fmatch != FMATCH_OK)
- break;
- }
+ if (fmatch != FMATCH_OK)
+ break;
+ }
- if (fmatch != FMATCH_OPT_WRONG) {
- fmatch = FMATCH_WRONG;
+ if (fmatch != FMATCH_OPT_WRONG) {
+ fmatch = FMATCH_WRONG;
- switch (check_WSS) {
- case OSF_WSS_PLAIN:
- if (f->wss.val == 0 || window == f->wss.val)
- fmatch = FMATCH_OK;
- break;
- case OSF_WSS_MSS:
- /*
- * Some smart modems decrease mangle MSS to
- * SMART_MSS_2, so we check standard, decreased
- * and the one provided in the fingerprint MSS
- * values.
- */
+ switch (check_WSS) {
+ case OSF_WSS_PLAIN:
+ if (f->wss.val == 0 || window == f->wss.val)
+ fmatch = FMATCH_OK;
+ break;
+ case OSF_WSS_MSS:
+ /*
+ * Some smart modems decrease mangle MSS to
+ * SMART_MSS_2, so we check standard, decreased
+ * and the one provided in the fingerprint MSS
+ * values.
+ */
#define SMART_MSS_1 1460
#define SMART_MSS_2 1448
- if (window == f->wss.val * mss ||
- window == f->wss.val * SMART_MSS_1 ||
- window == f->wss.val * SMART_MSS_2)
- fmatch = FMATCH_OK;
- break;
- case OSF_WSS_MTU:
- if (window == f->wss.val * (mss + 40) ||
- window == f->wss.val * (SMART_MSS_1 + 40) ||
- window == f->wss.val * (SMART_MSS_2 + 40))
- fmatch = FMATCH_OK;
- break;
- case OSF_WSS_MODULO:
- if ((window % f->wss.val) == 0)
- fmatch = FMATCH_OK;
- break;
- }
+ if (window == f->wss.val * mss ||
+ window == f->wss.val * SMART_MSS_1 ||
+ window == f->wss.val * SMART_MSS_2)
+ fmatch = FMATCH_OK;
+ break;
+ case OSF_WSS_MTU:
+ if (window == f->wss.val * (mss + 40) ||
+ window == f->wss.val * (SMART_MSS_1 + 40) ||
+ window == f->wss.val * (SMART_MSS_2 + 40))
+ fmatch = FMATCH_OK;
+ break;
+ case OSF_WSS_MODULO:
+ if ((window % f->wss.val) == 0)
+ fmatch = FMATCH_OK;
+ break;
}
+ }
- if (fmatch != FMATCH_OK)
- continue;
+ if (fmatch != FMATCH_OK)
+ continue;
- fcount++;
+ fcount++;
- if (info->flags & XT_OSF_LOG)
- nf_log_packet(net, p->family, p->hooknum, skb,
- p->in, p->out, NULL,
- "%s [%s:%s] : %pI4:%d -> %pI4:%d hops=%d\n",
- f->genre, f->version, f->subtype,
- &ip->saddr, ntohs(tcp->source),
- &ip->daddr, ntohs(tcp->dest),
- f->ttl - ip->ttl);
+ if (info->flags & XT_OSF_LOG)
+ nf_log_packet(net, p->family, p->hooknum, skb,
+ p->in, p->out, NULL,
+ "%s [%s:%s] : %pI4:%d -> %pI4:%d hops=%d\n",
+ f->genre, f->version, f->subtype,
+ &ip->saddr, ntohs(tcp->source),
+ &ip->daddr, ntohs(tcp->dest),
+ f->ttl - ip->ttl);
- if ((info->flags & XT_OSF_LOG) &&
- info->loglevel == XT_OSF_LOGLEVEL_FIRST)
- break;
- }
+ if ((info->flags & XT_OSF_LOG) &&
+ info->loglevel == XT_OSF_LOGLEVEL_FIRST)
+ break;
}
rcu_read_unlock();
--
1.7.10.4
^ permalink raw reply related
* [PATCH 7/8] netfilter: conntrack: Flush connections with a given mark
From: Pablo Neira Ayuso @ 2015-01-14 20:34 UTC (permalink / raw)
To: netfilter-devel; +Cc: davem, netdev
In-Reply-To: <1421267689-24894-1-git-send-email-pablo@netfilter.org>
From: Kristian Evensen <kristian.evensen@gmail.com>
This patch adds support for selective flushing of conntrack mappings.
By adding CTA_MARK and CTA_MARK_MASK to a delete-message, the mark (and
mask) is checked before a connection is deleted while flushing.
Configuring the flush is moved out of ctnetlink_del_conntrack(), and
instead of calling nf_conntrack_flush_report(), we always call
nf_ct_iterate_cleanup(). This enables us to only make one call from the
new ctnetlink_flush_conntrack() and makes it easy to add more filter
parameters.
Filtering is done in the ctnetlink_filter_match()-function, which is
also called from ctnetlink_dump_table(). ctnetlink_dump_filter has been
renamed ctnetlink_filter, to indicated that it is no longer only used
when dumping conntrack entries.
Moreover, reject mark filters with -EOPNOTSUPP if no ct mark support is
available.
Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
net/netfilter/nf_conntrack_netlink.c | 89 ++++++++++++++++++++++++----------
1 file changed, 64 insertions(+), 25 deletions(-)
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
index 1bd9ed9..d1c2394 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -749,13 +749,47 @@ static int ctnetlink_done(struct netlink_callback *cb)
return 0;
}
-struct ctnetlink_dump_filter {
+struct ctnetlink_filter {
struct {
u_int32_t val;
u_int32_t mask;
} mark;
};
+static struct ctnetlink_filter *
+ctnetlink_alloc_filter(const struct nlattr * const cda[])
+{
+#ifdef CONFIG_NF_CONNTRACK_MARK
+ struct ctnetlink_filter *filter;
+
+ filter = kzalloc(sizeof(*filter), GFP_KERNEL);
+ if (filter == NULL)
+ return ERR_PTR(-ENOMEM);
+
+ filter->mark.val = ntohl(nla_get_be32(cda[CTA_MARK]));
+ filter->mark.mask = ntohl(nla_get_be32(cda[CTA_MARK_MASK]));
+
+ return filter;
+#else
+ return ERR_PTR(-EOPNOTSUPP);
+#endif
+}
+
+static int ctnetlink_filter_match(struct nf_conn *ct, void *data)
+{
+ struct ctnetlink_filter *filter = data;
+
+ if (filter == NULL)
+ return 1;
+
+#ifdef CONFIG_NF_CONNTRACK_MARK
+ if ((ct->mark & filter->mark.mask) == filter->mark.val)
+ return 1;
+#endif
+
+ return 0;
+}
+
static int
ctnetlink_dump_table(struct sk_buff *skb, struct netlink_callback *cb)
{
@@ -768,10 +802,6 @@ ctnetlink_dump_table(struct sk_buff *skb, struct netlink_callback *cb)
int res;
spinlock_t *lockp;
-#ifdef CONFIG_NF_CONNTRACK_MARK
- const struct ctnetlink_dump_filter *filter = cb->data;
-#endif
-
last = (struct nf_conn *)cb->args[1];
local_bh_disable();
@@ -798,12 +828,9 @@ restart:
continue;
cb->args[1] = 0;
}
-#ifdef CONFIG_NF_CONNTRACK_MARK
- if (filter && !((ct->mark & filter->mark.mask) ==
- filter->mark.val)) {
+ if (!ctnetlink_filter_match(ct, cb->data))
continue;
- }
-#endif
+
rcu_read_lock();
res =
ctnetlink_fill_info(skb, NETLINK_CB(cb->skb).portid,
@@ -1001,6 +1028,25 @@ static const struct nla_policy ct_nla_policy[CTA_MAX+1] = {
.len = NF_CT_LABELS_MAX_SIZE },
};
+static int ctnetlink_flush_conntrack(struct net *net,
+ const struct nlattr * const cda[],
+ u32 portid, int report)
+{
+ struct ctnetlink_filter *filter = NULL;
+
+ if (cda[CTA_MARK] && cda[CTA_MARK_MASK]) {
+ filter = ctnetlink_alloc_filter(cda);
+ if (IS_ERR(filter))
+ return PTR_ERR(filter);
+ }
+
+ nf_ct_iterate_cleanup(net, ctnetlink_filter_match, filter,
+ portid, report);
+ kfree(filter);
+
+ return 0;
+}
+
static int
ctnetlink_del_conntrack(struct sock *ctnl, struct sk_buff *skb,
const struct nlmsghdr *nlh,
@@ -1024,11 +1070,9 @@ ctnetlink_del_conntrack(struct sock *ctnl, struct sk_buff *skb,
else if (cda[CTA_TUPLE_REPLY])
err = ctnetlink_parse_tuple(cda, &tuple, CTA_TUPLE_REPLY, u3);
else {
- /* Flush the whole table */
- nf_conntrack_flush_report(net,
- NETLINK_CB(skb).portid,
- nlmsg_report(nlh));
- return 0;
+ return ctnetlink_flush_conntrack(net, cda,
+ NETLINK_CB(skb).portid,
+ nlmsg_report(nlh));
}
if (err < 0)
@@ -1076,21 +1120,16 @@ ctnetlink_get_conntrack(struct sock *ctnl, struct sk_buff *skb,
.dump = ctnetlink_dump_table,
.done = ctnetlink_done,
};
-#ifdef CONFIG_NF_CONNTRACK_MARK
+
if (cda[CTA_MARK] && cda[CTA_MARK_MASK]) {
- struct ctnetlink_dump_filter *filter;
+ struct ctnetlink_filter *filter;
- filter = kzalloc(sizeof(struct ctnetlink_dump_filter),
- GFP_ATOMIC);
- if (filter == NULL)
- return -ENOMEM;
+ filter = ctnetlink_alloc_filter(cda);
+ if (IS_ERR(filter))
+ return PTR_ERR(filter);
- filter->mark.val = ntohl(nla_get_be32(cda[CTA_MARK]));
- filter->mark.mask =
- ntohl(nla_get_be32(cda[CTA_MARK_MASK]));
c.data = filter;
}
-#endif
return netlink_dump_start(ctnl, skb, nlh, &c);
}
--
1.7.10.4
^ permalink raw reply related
* Re: [RFC PATCH v2 1/2] net: af_packet support for direct ring access in user space
From: David Miller @ 2015-01-14 20:35 UTC (permalink / raw)
To: john.fastabend
Cc: netdev, danny.zhou, nhorman, dborkman, john.ronciak, hannes,
brouer
In-Reply-To: <20150113043509.29985.33515.stgit@nitbit.x32>
From: John Fastabend <john.fastabend@gmail.com>
Date: Mon, 12 Jan 2015 20:35:11 -0800
> + if ((region.direction != DMA_BIDIRECTIONAL) &&
> + (region.direction != DMA_TO_DEVICE) &&
> + (region.direction != DMA_FROM_DEVICE))
> + return -EFAULT;
...
> + if ((umem->nmap == npages) &&
> + (0 != dma_map_sg(dev->dev.parent, umem->sglist,
> + umem->nmap, region.direction))) {
> + region.iova = sg_dma_address(umem->sglist) + offset;
I am having trouble seeing how this can work.
dma_map_{single,sg}() mappings need synchronization after a DMA
transfer takes place.
For example if the DMA occurs to the device, then that region can
be cached in the PCI controller's internal caches and thus future
cpu writes into that memory region will not be seen, until a
dma_sync_*() is invoked.
That isn't going to happen when the device transmit queue is
being completely managed in userspace.
And this takes us back to the issue of protection, I don't think
it is addressed properly yet.
CAP_NET_ADMIN privileges do not mean "can crap all over memory"
yet with this feature that can still happen.
If we are dealing with a device which cannot provide strict protection
to only the process's locked local pages, you have to do something
to implement that protection.
And you have _exactly_ one option to do that, abstracting the page
addresses and eating a system call to trigger the sends, so that you
can read from the user's (fake) descriptors and write into the real
descriptors (translating the DMA addresses along the way) and
triggering the TX doorbell.
I am not going to consider seriously an implementation that says "yeah
sometimes the user can crap onto other people's memory", this isn't
MS-DOS, it's a system where proper memory protections are mandatory
rather than optional.
^ permalink raw reply
* Re: [PATCH 0/5 net-next v4] VXLAN Group Policy Extension
From: David Miller @ 2015-01-14 20:37 UTC (permalink / raw)
To: tgraf
Cc: jesse, stephen, pshelar, therbert, alexei.starovoitov,
nicolas.dichtel, netdev, dev
In-Reply-To: <cover.1421165078.git.tgraf@suug.ch>
From: Thomas Graf <tgraf@suug.ch>
Date: Tue, 13 Jan 2015 17:20:41 +0100
> Implements supports for the Group Policy VXLAN extension [0] to provide
> a lightweight and simple security label mechanism across network peers
> based on VXLAN. The security context and associated metadata is mapped
> to/from skb->mark. This allows further mapping to a SELinux context
> using SECMARK, to implement ACLs directly with nftables, iptables, OVS,
> tc, etc.
>
> The extension is disabled by default and should be run on a distinct
> port in mixed Linux VXLAN VTEP environments. Liberal VXLAN VTEPs
> which ignore unknown reserved bits will be able to receive VXLAN-GBP
> frames.
Thomas, unfortunately Tom's vxlan RCO patches were ready before your's
in my queue so I applied his work first. You'll have to therefore
respin this series on top of it.
Thanks.
^ permalink raw reply
* Re: [PATCH net] openvswitch: packet messages need their own probe attribtue
From: Jesse Gross @ 2015-01-14 20:40 UTC (permalink / raw)
To: Thomas Graf
Cc: Florian Westphal, David Miller, Sander Eikelenboom,
Pravin B Shelar, netdev, dev@openvswitch.org, Jarno Rajahalme
In-Reply-To: <20150114135619.GC564@casper.infradead.org>
On Wed, Jan 14, 2015 at 5:56 AM, Thomas Graf <tgraf@suug.ch> wrote:
> User space is currently sending a OVS_FLOW_ATTR_PROBE for both flow
> and packet messages. This leads to an out-of-bounds access in
> ovs_packet_cmd_execute() because OVS_FLOW_ATTR_PROBE >
> OVS_PACKET_ATTR_MAX.
>
> Introduce a new OVS_PACKET_ATTR_PROBE with the same numeric value
> as OVS_FLOW_ATTR_PROBE to grow the range of accepted packet attributes
> while maintaining to be binary compatible with existing OVS binaries.
>
> Fixes: 05da589 ("openvswitch: Add support for OVS_FLOW_ATTR_PROBE.")
> Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
> Tracked-down-by: Florian Westphal <fw@strlen.de>
> Signed-off-by: Thomas Graf <tgraf@suug.ch>
This is kind of a nasty bug, thanks for fixing it.
Reviewed-by: Jesse Gross <jesse@nicira.com>
^ permalink raw reply
* Re: [net-next PATCH v2 03/12] net: flow: implement flow cache for get routines
From: David Miller @ 2015-01-14 20:50 UTC (permalink / raw)
To: john.fastabend
Cc: tgraf, simon.horman, sfeldma, netdev, gerlitz.or, jhs, andy
In-Reply-To: <20150113213621.13874.40461.stgit@nitbit.x32>
From: John Fastabend <john.fastabend@gmail.com>
Date: Tue, 13 Jan 2015 13:36:22 -0800
> One oddity in the rhashtable implementation is there is no way
> AFAICS to do delayed free's so we use rcu_sync heavily. This should be
> fine, get operations shouldn't be a used heavily.
Thomas please provide some feedback on this, thanks.
^ permalink raw reply
* Re: non-OVS based vxlan config broken on 3.19-rc ?!
From: Or Gerlitz @ 2015-01-14 20:55 UTC (permalink / raw)
To: thomas Graf
Cc: Or Gerlitz, tom Herbert, Marcelo Leitner, Jesse Gross,
netdev@vger.kernel.org
In-Reply-To: <20150114155208.GA24550@casper.infradead.org>
On Wed, Jan 14, 2015 at 5:52 PM, thomas Graf <tgraf@suug.ch> wrote:
> On 01/14/15 at 05:18pm, Or Gerlitz wrote:
>> Guys, just realized that non-OVS based vxlan config is broken with
>> 3.19-rc... I see that it works for me on 3.18.2 and breaks on 3.19-rc3
>> (Linus tree). Tested over mlx4 (both offloaded and non offloaded modes) and
>> igb, see below the simplest form I can see it breaks on 3.19-rcand works on
>> 3.18
>>
>> Looking on tcpdump and stats, the arp reply arrives to the 3.19-rc host NIC
>> driver but is dropped along the stack beforehanded to the vxlan driver, not
>> sure where and why...
>
> As additional data point: I tested the VXLAN-GBP with iproute2 based tunnels
> on net-next and that works fine. Driver used was a e1000 in KVM.
mm, so net-next.git (3.20 candidate code) and 3.18 works, but @ least
for me 3.19-rc doesn't - could you check if net.git works for you on
iproute2 based tunnels in that env? just vxlan is enough.
^ permalink raw reply
* Re: [PATCH net-next] bridge: fix setlink/dellink notifications
From: roopa @ 2015-01-14 20:57 UTC (permalink / raw)
To: Thomas Graf
Cc: netdev, shemminger, vyasevic, john.fastabend, jhs, sfeldma, jiri,
wkok
In-Reply-To: <20150114194137.GC2105@casper.infradead.org>
On 1/14/15, 11:41 AM, Thomas Graf wrote:
> On 01/13/15 at 10:48pm, roopa@cumulusnetworks.com wrote:
>> 2) Generate one notification from master and the other notification from
>> self (This seems to be ideal):
>> For master: the master driver will send notification (bridge in this
>> example)
>> For self: the self driver will send notification (rocker in the above
>> example. It can use helpers from rtnetlink.c to do so. Like the
>> ndo_dflt_bridge_getlink api).
>>
>> This patch implements 2) (leaving the 'rtnl_bridge_notify' around to be used
>> with 'self').
>>
>> CC'ing others who might be affected by this change for review.
>>
>> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
> I haven't digested this line by line yet but I agree that what you
> describe above would be a good end state.
>
> If I read the patch correctly then we would omit one notification
> for the master case.
yes, correct.
> Were both notifications exactly identical
> previously?
> This has the chance of breaking existing users terribly.
yes AFAICT, because
rtnl_bridge_notify() from rtnetlink.c for bridge results in calling
br_fill_ifinfo() via ndo_bridge_getlink()
and the notification from bridge driver br_ifinfo_notify() also ends up
calling br_fill_ifinfo().
Thanks,
Roopa
^ permalink raw reply
* Re: [PATCH 0/5 net-next v4] VXLAN Group Policy Extension
From: Thomas Graf @ 2015-01-14 20:57 UTC (permalink / raw)
To: David Miller
Cc: jesse, stephen, pshelar, therbert, alexei.starovoitov,
nicolas.dichtel, netdev, dev
In-Reply-To: <20150114.153744.360580056667123059.davem@davemloft.net>
On 01/14/15 at 03:37pm, David Miller wrote:
> From: Thomas Graf <tgraf@suug.ch>
> Date: Tue, 13 Jan 2015 17:20:41 +0100
>
> > Implements supports for the Group Policy VXLAN extension [0] to provide
> > a lightweight and simple security label mechanism across network peers
> > based on VXLAN. The security context and associated metadata is mapped
> > to/from skb->mark. This allows further mapping to a SELinux context
> > using SECMARK, to implement ACLs directly with nftables, iptables, OVS,
> > tc, etc.
> >
> > The extension is disabled by default and should be run on a distinct
> > port in mixed Linux VXLAN VTEP environments. Liberal VXLAN VTEPs
> > which ignore unknown reserved bits will be able to receive VXLAN-GBP
> > frames.
>
> Thomas, unfortunately Tom's vxlan RCO patches were ready before your's
> in my queue so I applied his work first. You'll have to therefore
> respin this series on top of it.
Sure, no problem.
^ permalink raw reply
* Re: [PATCH 1/2] net/macb: Adding comments to various #defs to make interpretation easier
From: David Miller @ 2015-01-14 21:02 UTC (permalink / raw)
To: brad.mouring
Cc: ben.shelton, jaeden.amero, linux-kernel, netdev, nicolas.ferre,
rich.tollerton, xander.huff
In-Reply-To: <OFE030E01C.93929A2C-ON86257DCD.00524615-86257DCD.0052461A@ni.com>
HTML encoded emails will be rejected by the list server, and also
completely not read by me.
^ permalink raw reply
* Re: [PATCH 2/2] net/macb: improved ethtool statistics support
From: David Miller @ 2015-01-14 21:04 UTC (permalink / raw)
To: nicolas.ferre
Cc: xander.huff, netdev, jaeden.amero, rich.tollerton, ben.shelton,
brad.mouring, linux-kernel, cyrille.pitchen
In-Reply-To: <54B690F5.5080308@atmel.com>
From: Nicolas Ferre <nicolas.ferre@atmel.com>
Date: Wed, 14 Jan 2015 16:53:25 +0100
> I see some issues with this patch: can you hold it a little bit please
> (aka NAK)?
I already applied these patches last night to my net-next tree, so
relative fixups against that will need to be submitted.
Submitting new versions of these patches therefore isn't going to
work.
^ permalink raw reply
* Re: [PATCH 1/2] fixup! net/macb: Adding comments to various #defs to make interpretation easier
From: David Miller @ 2015-01-14 21:09 UTC (permalink / raw)
To: xander.huff
Cc: nicolas.ferre, netdev, jaeden.amero, rich.tollerton, ben.shelton,
brad.mouring, linux-kernel, cyrille.pitchen
In-Reply-To: <1421266881-17314-1-git-send-email-xander.huff@ni.com>
As I mentioned, this won't do.
I've already applied your original patches to net-next, therefore you will
have to submit fixups relative to that.
^ permalink raw reply
* [ 2375.793397] WARNING: CPU: 0 PID: 1149 at net/netlink/genetlink.c:1037 genl_unbind+0xc0/0xd0()
From: Jeff Layton @ 2015-01-14 21:13 UTC (permalink / raw)
To: netdev; +Cc: Johannes Berg
While running the trinity fuzzer in a KVM guest, I ^C'ed it at an
(apparent) inopportune moment, and saw a bunch of these WARN_ONs pop:
[ 2375.793396] ------------[ cut here ]------------
[ 2375.793397] WARNING: CPU: 0 PID: 1149 at net/netlink/genetlink.c:1037 genl_unbind+0xc0/0xd0()
[ 2375.793417] Modules linked in: af_key crypto_user nfnetlink vmw_vsock_vmci_transport vmw_vmci vsock nfc af_802154 ieee802154 bluetooth rfkill pppoe pppox ppp_generic slhc irda crc_ccitt rds rose atm netrom appletalk ipx p8023 p8022 psnap ax25 ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 xt_conntrack ebtable_nat ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw snd_hda_codec_generic snd_hda_intel snd_hda_controller snd_hda_codec snd_hwdep snd_pcm iosf_mbi crct10dif_pclmul snd_timer crc32_pclmul ppdev crc32c_intel snd ghash_clmulni_intel pa
rport_pc joydev parport serio_raw pcspkr virtio_balloon soundcore virtio_console pvpanic i2c_piix4 virtio_blk virtio_net qxl drm_kms_helper ttm virtio_pci ata_generic virtio_ring drm pata_acpi virtio floppy
[ 2375.793424] CPU: 0 PID: 1149 Comm: trinity-main Tainted: G W 3.19.0-rc4+ #26
[ 2375.793424] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140709_153950- 04/01/2014
[ 2375.793426] 0000000000000000 000000002a81588d ffff8800b932bd18 ffffffff8186adb8
[ 2375.793427] 0000000000000000 0000000000000000 ffff8800b932bd58 ffffffff810ac9da
[ 2375.793428] ffffffff81f8c940 0000000000000000 ffffffff81f8c940 000000000000000f
[ 2375.793429] Call Trace:
[ 2375.793431] [<ffffffff8186adb8>] dump_stack+0x4c/0x65
[ 2375.793432] [<ffffffff810ac9da>] warn_slowpath_common+0x8a/0xc0
[ 2375.793433] [<ffffffff810acb0a>] warn_slowpath_null+0x1a/0x20
[ 2375.793435] [<ffffffff8175e580>] genl_unbind+0xc0/0xd0
[ 2375.793436] [<ffffffff8175cbdd>] netlink_release+0x19d/0x3f0
[ 2375.793437] [<ffffffff81700aaf>] sock_release+0x1f/0x90
[ 2375.793439] [<ffffffff81700b32>] sock_close+0x12/0x20
[ 2375.793440] [<ffffffff81275098>] __fput+0xf8/0x220
[ 2375.793441] [<ffffffff8127520e>] ____fput+0xe/0x10
[ 2375.793443] [<ffffffff810d29f4>] task_work_run+0xb4/0xe0
[ 2375.793444] [<ffffffff810b040d>] do_exit+0x37d/0xcf0
[ 2375.793445] [<ffffffff810b0e24>] do_group_exit+0x54/0xe0
[ 2375.793447] [<ffffffff810b0ec4>] SyS_exit_group+0x14/0x20
[ 2375.793448] [<ffffffff81874ff5>] tracesys_phase2+0xd4/0xd9
[ 2375.793449] ---[ end trace be07601dc6d6ab5c ]---
trinity was run with no arguments. I had it happen a couple of times
while running it, but it doesn't happen every time. It seems to be
somewhat contingent on signaling it at the right time.
--
Jeff Layton <jlayton@primarydata.com>
^ permalink raw reply
* Re: [PATCH 1/2] fixup! net/macb: Adding comments to various #defs to make interpretation easier
From: Xander Huff @ 2015-01-14 21:18 UTC (permalink / raw)
To: David Miller
Cc: nicolas.ferre, netdev, jaeden.amero, rich.tollerton, ben.shelton,
brad.mouring, linux-kernel, cyrille.pitchen
In-Reply-To: <20150114.160929.619787519481343067.davem@davemloft.net>
On 1/14/2015 3:09 PM, David Miller wrote:
>
> As I mentioned, this won't do.
>
> I've already applied your original patches to net-next, therefore you will
> have to submit fixups relative to that.
>
These fixup commits are relative to an updated net-next, specifically "237de6e
Merge branch 'hip04'".
Do you need them relative to (what I'm seeing is the latest) "2733135 Merge
branch 'vxlan_rco'"?
^ permalink raw reply
* Re: [PATCH net] openvswitch: packet messages need their own probe attribtue
From: Pravin Shelar @ 2015-01-14 21:22 UTC (permalink / raw)
To: Thomas Graf
Cc: Florian Westphal, David Miller, Sander Eikelenboom, netdev,
dev@openvswitch.org, Jarno Rajahalme
In-Reply-To: <20150114135619.GC564@casper.infradead.org>
On Wed, Jan 14, 2015 at 5:56 AM, Thomas Graf <tgraf@suug.ch> wrote:
> User space is currently sending a OVS_FLOW_ATTR_PROBE for both flow
> and packet messages. This leads to an out-of-bounds access in
> ovs_packet_cmd_execute() because OVS_FLOW_ATTR_PROBE >
> OVS_PACKET_ATTR_MAX.
>
> Introduce a new OVS_PACKET_ATTR_PROBE with the same numeric value
> as OVS_FLOW_ATTR_PROBE to grow the range of accepted packet attributes
> while maintaining to be binary compatible with existing OVS binaries.
>
> Fixes: 05da589 ("openvswitch: Add support for OVS_FLOW_ATTR_PROBE.")
> Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
> Tracked-down-by: Florian Westphal <fw@strlen.de>
> Signed-off-by: Thomas Graf <tgraf@suug.ch>
> ---
Looks good.
Acked-by: Pravin B Shelar <pshelar@nicira.com>
^ 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