@@ -123,46 +123,6 @@ static struct xsk_umem *create_umem_non_privileged(int sock_fd)
123
123
return umem ;
124
124
}
125
125
126
- /* Should use this to replace create_umem_non_privileged() once
127
- * xsk_umem__create() and xsk_umem__create_with_fd() are deprecated.
128
- */
129
- static struct xsk_umem * create_umem_non_privileged_by_opts (int sock_fd )
130
- {
131
- struct xsk_ring_cons cq ;
132
- struct xsk_ring_prod fq ;
133
- struct xsk_umem * umem ;
134
- void * b ;
135
-
136
- if (posix_memalign (& b , getpagesize (), UMEM_SIZE )) {
137
- perror ("posix_memalign failed" );
138
- exit (EXIT_FAILURE );
139
- }
140
-
141
- /* Opts initialized with fd unset */
142
- DECLARE_LIBXDP_OPTS (xsk_umem_opts , opts ,
143
- .size = UMEM_SIZE ,
144
- .fill_size = XSK_RING_PROD__DEFAULT_NUM_DESCS ,
145
- .comp_size = XSK_RING_CONS__DEFAULT_NUM_DESCS ,
146
- .frame_size = XSK_UMEM__DEFAULT_FRAME_SIZE ,
147
- );
148
- /* This variant requires CAP_NET_RAW, so should fail. */
149
- umem = xsk_umem__create_opts (b , & fq , & cq , & opts );
150
- if (umem ) {
151
- perror ("xsk_umem__create_opts succeeded" );
152
- exit (EXIT_FAILURE );
153
- }
154
-
155
- /* This variant shouldn't need any capabilities, so should pass. */
156
- opts .fd = sock_fd ;
157
- umem = xsk_umem__create_opts (b , & fq , & cq , & opts );
158
- if (!umem ) {
159
- perror ("xsk_umem__create_opts failed" );
160
- exit (EXIT_FAILURE );
161
- }
162
-
163
- return umem ;
164
- }
165
-
166
126
static struct xsk_socket * create_xsk_non_privileged (const char * ifname ,
167
127
struct xsk_umem * umem ,
168
128
int queue_id )
0 commit comments