lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Tue, 10 May 2011 08:53:46 -0400
From:	Sebastian.Poehn@...den.com
To:	"netdev" <netdev@...r.kernel.org>
Subject: [PATCH 1/3] RFC gianfar: add rx_ntuple feature

Patches created against net-next-2.6!

This  series implements the set_rx_ntuple feature for ethtool. Code is well  tested and should be stable. Some code rework and better integration  into gianfar_ethtool.c have to been done! Note that all rx flow hashing  stuff on hardware will be overwritten!

This part extends some hardware bit-flags and adds some data structures for ntuple conversion and storage.

--- gianfar.h.orig    2011-05-10 11:26:43.113744000 +0200
+++ gianfar.h    2011-05-10 12:59:15.301744599 +0200
@@ -168,6 +168,7 @@ extern const char gfar_driver_version[];
 #define MACCFG2_LENGTHCHECK    0x00000010
 #define MACCFG2_MPEN        0x00000008
 
+#define ECNTRL_FIFM        0x00008000
 #define ECNTRL_INIT_SETTINGS    0x00001000
 #define ECNTRL_TBI_MODE         0x00000020
 #define ECNTRL_REDUCED_MODE    0x00000010
@@ -271,6 +272,7 @@ extern const char gfar_driver_version[];
 #define RCTRL_TUCSEN        0x00000100
 #define RCTRL_PRSDEP_MASK    0x000000c0
 #define RCTRL_PRSDEP_INIT    0x000000c0
+#define RCTRL_PRSFM        0x00000020
 #define RCTRL_PROM        0x00000008
 #define RCTRL_EMEN        0x00000002
 #define RCTRL_REQ_PARSER    (RCTRL_VLEX | RCTRL_IPCSEN | \
@@ -870,6 +872,7 @@ struct gfar {
 #define FSL_GIANFAR_DEV_HAS_BD_STASHING        0x00000200
 #define FSL_GIANFAR_DEV_HAS_BUF_STASHING    0x00000400
 #define FSL_GIANFAR_DEV_HAS_TIMER        0x00000800
+#define FSL_GIANFAR_DEV_HAS_RX_FILER        0x00001000
 
 #if (MAXGROUPS == 2)
 #define DEFAULT_MAPPING     0xAA
@@ -1140,6 +1143,16 @@ static inline void gfar_write_filer(stru
     gfar_write(&regs->rqfpr, fpr);
 }
 
+static inline void gfar_read_filer(struct gfar_private *priv,
+        unsigned int far, unsigned int *fcr, unsigned int *fpr)
+{
+    struct gfar __iomem *regs = priv->gfargrp[0].regs;
+
+    gfar_write(&regs->rqfar, far);
+    *fcr = gfar_read(&regs->rqfcr);
+    *fpr = gfar_read(&regs->rqfpr);
+}
+
 extern void lock_rx_qs(struct gfar_private *priv);
 extern void lock_tx_qs(struct gfar_private *priv);
 extern void unlock_rx_qs(struct gfar_private *priv);
@@ -1157,4 +1170,39 @@ int gfar_set_features(struct net_device 
 
 extern const struct ethtool_ops gfar_ethtool_ops;
 
+#define ESWFULL 160
+#define EHWFULL 161
+#define EOUTOFRANGE 162
+#define PRINT_MAX 100
+#define MAX_FILER_CACHE_IDX (2*(MAX_FILER_IDX))
+
+extern struct interf *queue;
+
+struct and_entry {
+    unsigned int mask; /*The mask value which is valid for a block with*/
+    unsigned int start; /*start*/
+    unsigned int end; /*till end*/
+    unsigned int block; /*Same block values indicate depended entries*/
+};
+
+/*For exactly one device*/
+struct interf {
+    struct ethtool_rx_ntuple_list ntuple_list;
+    char name[IFNAMSIZ]; /*Name from struct net_device*/
+};
+
+/*Table which represents a receive filer table entry */
+struct filer_entry {
+    u32 ctrl; /*The control field from HW*/
+    u32 prop; /*The property field from HW*/
+};
+
+/*Full table*/
+struct filer_table {
+    struct filer_entry fe[MAX_FILER_CACHE_IDX];
+};
+
+int do_action(struct ethtool_rx_ntuple_flow_spec *flow, struct gfar_private *p);
+
+
 #endif /* __GIANFAR_H */
 
Signed-off-by: Sebastian Poehn <sebastian.poehn@...den.com>
DISCLAIMER:

Privileged and/or Confidential information may be contained in this
message. If you are not the addressee of this message, you may not
copy, use or deliver this message to anyone. In such event, you
should destroy the message and kindly notify the sender by reply
e-mail. It is understood that opinions or conclusions that do not
relate to the official business of the company are neither given
nor endorsed by the company.

Thank You.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ